Hi
I am trying to setup an install on a pi using the emonsd feb 24 - I would like to use modbus TCP but I am getting the following errors.
2025-04-21 04:23:31,866 DEBUG MainThread EmonModbusTcpInterfacer args: 192.168.0.20 - 502
2025-04-21 04:23:31,867 ERROR MainThread modbusTCP connection failed ModbusTcpClient.__init__() takes 2 positional arguments but 3 were given
2025-04-21 04:23:31,867 INFO MainThread Connection to ModbusTCP client failed. Will try again
2025-04-21 04:23:31,868 DEBUG MainThread Setting ModbusTCP register: ['00001', '00002', '00003', '00004', '00005', '00033', '00034', '00035', '00036', '00037', '00049', '00050', '00051', '00052', '00053']
2025-04-21 04:23:31,869 DEBUG MainThread Setting ModbusTCP nodeId: 2
2025-04-21 04:23:31,869 DEBUG MainThread Setting ModbusTCP pubchannels: ['ToEmonCMS']
2025-04-21 04:23:31,869 DEBUG MainThread Setting ModbusTCP interval: 10
2025-04-21 04:23:41,872 WARNING ModbusTCP Exception caught in ModbusTCP thread. Traceback (most recent call last):
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 31, in wrapper
return func(*args)
^^^^^^^^^^^
File "/opt/openenergymonitor/emonhub/src/emonhub_interfacer.py", line 105, in run
rxc = self.read()
^^^^^^^^^^^
File "/opt/openenergymonitor/emonhub/src/interfacers/EmonModbusTcpInterfacer.py", line 88, in read
self._con.close()
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'close'
2025-04-21 04:23:42,006 WARNING MainThread ModbusTCP thread is dead.
2025-04-21 04:23:42,007 WARNING MainThread Attempting to restart thread ModbusTCP (thread has been restarted 30 times...)
2025-04-21 04:23:42,010 INFO MainThread Setting emoncmsorg senddata: 1
2025-04-21 04:23:42,010 INFO MainThread Setting emoncmsorg sendnames: 1
2025-04-21 04:23:42,011 INFO MainThread Setting DS18B20 read_interval: 10
2025-04-21 04:23:42,012 INFO MainThread Creating EmonModbusTcpInterfacer 'ModbusTCP'
2025-04-21 04:23:42,013 INFO MainThread pymodbus installed
2025-04-21 04:23:42,013 DEBUG MainThread EmonModbusTcpInterfacer args: 192.168.0.20 - 502
Could anyone advise?
Thanks
Dave