Python Imports of Other Modules

Posted on
Mon Feb 07, 2022 7:39 pm
Brian Gaiser offline
Posts: 38
Joined: Jul 28, 2013

Python Imports of Other Modules

Hey Folks! (Jay?).

I'm getting ready to integrate INDIGO to my Schneider Solar inverters and charge controllers and such. After much reading/study and experimenting outside of Indigo with Python and interesting technologies... I want to use pyModbusTCP.

I've finally got it working in scripts on my Mac laptop.. now to get it working in INDIGO... eventually as a plugin... But for now... I just want to read a Modbus Value into a variable in INDIGO.
MY holdup is simple -- how do I get Indigo's built-in python to add pyModbusTCP? I have it working on the MacOS that INDGO is running on...I think.

Here's the statement:

from pyModbusTCP.client import ModbusClient.

That throws errors in the log;

Feb 7, 2022 at 8:30:23 PM
Schedule Get MPPT Volts
Script Error embedded script: Python argument types in
VariableCmds.updateValue(VariableCmds, int)
did not match C++ signature:
updateValue(_VariableCmds {lvalue}, boost::python::api::object elem, CCString value)
Script Error Exception Traceback (most recent call shown last):

embedded script, line 74, at top level
ArgumentError: Python argument types in
VariableCmds.updateValue(VariableCmds, int)
did not match C++ signature:
updateValue(_VariableCmds {lvalue}, boost::python::api::object elem, CCString value)

Any help appreciated.

Posted on
Mon Feb 07, 2022 7:42 pm
Brian Gaiser offline
Posts: 38
Joined: Jul 28, 2013

Re: Python Imports of Other Modules

Of course it could be this line:

indigo.variable.updateValue(523103581, value=resulta) # "MPPTA_Volts"

The value should be type str.

Posted on
Mon Feb 07, 2022 7:47 pm
Brian Gaiser offline
Posts: 38
Joined: Jul 28, 2013

Re: Python Imports of Other Modules

Ok. Nevermind. I had to str() the variable. IT WORKS!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests