Hi
I’m playing about with the modbus TCP interfacer that’s built in with the current version of EmonCMS, though I am getting a “WARNING MainThread ModbusTCP thread is dead”
As you’ll see, I’ve tried to reduce the one register to get it running.
In EmonHUB config I have the following…
[[ModbusTCP]]
# this interfacer retrieves register information from modbusTCP clients
# retrieve register information from modbus TCP documentation for your inverter.
# Information here is designed for Fronius Symo 3 phase inverter.
Type = EmonModbusTcpInterfacer
[[[init_settings]]]
modbus_IP = 192.168.10.33 # ip address of client to retrieve data from
modbus_port = 502 # Portclient listens on
[[[runtimesettings]]]
# list of names of items being retrieved
# rName = DC_Current_1,DC_Voltage_1,DC_Current_2,DC_Voltage_2,Power,AC_Current,Frequency,Temperature,Residual_Current,Total_Yield,Daily_Yield
rName = Daily_Yield
# List of starting registers for items listed above
# register = 30769,30771,30957,30959,30775,30795,30803,30953,31247,30513,30517
register = 30517
# List of # of registers used for each item
# nReg = 1,1,1,1,1,1,1,1,1,1,1
nReg = 1
# Data type for each item above
# rType = float32,float32,float32,float32,float32,unint32,unint32,float32,float32,uint64,uint64
rType = uint64
# nodeid used to match with node definition in nodes section below. Can be set to any integer value not previously used.
nodeId = 15
# Channel to publish data to should leave as ToEmonCMS
pubchannels = ToEmonCMS,
# time in seconds between checks, This is in addition to emonhub_interfacer.run() sleep time of .01
# use this value to set the frequency of data retrieval from modbus client
interval = 1
AND LATER DOWN THE PAGE....
[[15]]
nodename = Inverter
[[[rx]]]
names = Daily_Yield
datacodes = Q
scales = 1
units = Wh
Regards
Dave