If (Parameters = "uint8MSB"): value = code_8bit_uint() If (Parameters = "int64s"): value = code_64bit_int() If (Parameters = "int64"): value = code_64bit_int() If (Parameters = "int32s"): value = code_32bit_int() If (Parameters = "int32"): value = code_32bit_int() If (Parameters = "int16s"): value = code_16bit_int() If (Parameters = "int16"): value = code_16bit_int() If (Parameters = "int8MSB"): value = code_8bit_int() Or Parameters = "float32s" or Parameters = "float64s"):ĭecoder = omRegisters(data.registers, byteorder=Endian.Big, wordorder=Endian.Little)ĭecoder = omRegisters(data.registers, byteorder=Endian.Big, wordorder=Endian.Big) # Added option to swap words (little endian)Įlif (Parameters = "int32s" or Parameters = "uint32s" or Parameters = "int64s" or Parameters = "uint64s" If (Parameters = "int16s" or Parameters = "uint16s"):ĭecoder = omRegisters(data.registers, byteorder=Endian.Little, wordorder=Endian.Big) # Added option to swap bytes (little endian) I don't know how this exactly works but to me it seems that it hangs here: So apparently it got stuck on the processing of the reply in Domoticz. If I use a laptop and run a Modbus TCP Server, I can see the Modbus request from Domoticz and I can also see the reply. If have set up the communication in the Hardware like this: 09:51:52.152 (Test read) Modbus error decoding or received no data (TCP/IP)!, check your settings! 09:51:42.050 Status: (Test read) Entering work loop. 09:51:42.065 (Test read) Modbus RTU/ASCII/TCP - Universal READ loaded. 09:51:42.063 (Test read) Sensor Type: Pressure 09:51:42.063 (Test read) Debug logging mask set to: NONE If I use domoticz, I always get this error message in the log file: If I use a laptop with QMODMaster, I can reach the PLC via Modbus TCP. Apparently you need to add a "/Device ID after the IP address. 10:09:09.261 Error: (Status ) 'onHeartbeat' failed 'TypeError':'can only concatenate str (not "int") to str'. I can at least select Modbus read from the drop downlist,but somehow it doesn't work.
#SHORTBUS MODBUS SERVER INSTALL#
Sudo pip3 install -U pymodbus pymodbusTCP bash: syntax error near unexpected token `)' :~ $ cd /home/pi/.local/lib/python2.7/site-packages/) :~ $ sudo cp six.py /usr/lib/python3.5Ĭp: cannot stat 'six.py': No such file or directory Requirement already satisfied, skipping upgrade: pyserial>=3.4 in /usr/local/lib /python3.7/dist-packages (from pymodbus) (3.4) Requirement already up-to-date: pymodbusTCP in /usr/local/lib/python3.7/dist-pac kages (0.1.8) Requirement already up-to-date: pymodbus in /usr/local/lib/python3.7/dist-packag es (2.2.0) :~ $ sudo pip3 install -U pymodbus pymodbusTCP Pymodbus 2.2.0 has requirement six=1.11.0, but you'll have six 1.12.0 which is incompatible. I keepgetting this error during install on latest version Domoticz: