Im a newbie to emonCMS and so far am really enjoying it! I have just recently had 26kW of Solar PV installed which is fed to a 3 phase SMA Sunny TriPower25000 inverter. Currently I have some CT’s reading the generation, but I wanted to pull the data from the ModBus interface if possible.
I’ve configured the emonHub ModBus TCP Interfacer with the IP and port number. I’ve also added the node details for the register. When I restart the emonHub, all is working well and emonCMS is publishing my new node and items as per the configuration. The only trouble is all values are reporting -1 which clearly isn’t right.
I have a link for the register details of the SMA inverter. I note that there is a Device 1 and Device 2, I’ve configured the registers for Device 1 as this is what the TCP interfacer reads by default and that there is possibly a limitation currently that it can only read device id 1.
The actual details I need are on device id 2 according to the SMA documentation, so if this is a limitation currently, I am a bit stuck until it’s resolved, but I wanted to prove the communication method in the mean time.
Would anybody be able to take a look at my configuration below and the SMA documentation to tell me where I am going wrong please?
[[ModbusTCP]] # this interfacer retrieves register information from modbusTCP clients # retrieve register information from modbus TCP documentation for your inverter. Type = EmonModbusTcpInterfacer [[[init_settings]]] modbus_IP = 192.168.5.198 # ip address of client to retrieve data from modbus_port = 502 # Portclient listens on [[[runtimesettings]]] # List of starting registers for items listed above register = 30001,30003,30005,30007,30051,30193 # nodeid used to match with node definition in nodes section below. Can be set to any integer value not previously used. nodeId = 27 # 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 = 10
and in the nodes section…
[] nodename = smatripower [[[rx]]] # list of names of items being retrieved # This example retrieves the Inverter status, AC power in watts being produced, AC Lifetime KWh produced, # KWh produced for current day,.... names = sma_profile_number,device_id,serial_no,data_change,device_class,system_time datacodes = h,h,h,h,h,h scales = 1,1,1,1,1,1 units =
link for SMA register details
Help appreciated as always