Modbus TCP with two meters

Hi, I have a WEM3080T (for single phase solar) and a WEM3080 (for airconditioning load) and have used modbus tcp with home assistant which was very easy to set up following your guide and using code in github.

Both meters have the same firmware: ATVi.75.97.5@MX1290

The 3 phase meter is connected and returning data.

The single phase meter (loaded after the WEM3080T in the yaml) returns 0 values (WEM3080 data ends in _AC) 



I tried changing the slave to 2 but it made no difference:

Here is my WEM3080 yaml. It would be great if you could tell me where I am going wrong:

# Example Modbus configuration.yaml entry for Aircon meter
- name: hub11
type: tcp
host: 192.168.1.41
port: 502
sensors:
- name: Modbus_Voltage_AC
slave: 1
address: 0
input_type: holding
unit_of_measurement: V
device_class: voltage
state_class: measurement
count: 1
scale: 0.01
offset: 0
precision: 1
data_type: uint16
- name: Modbus_Current_AC
slave: 1
address: 1
input_type: holding
unit_of_measurement: A
device_class: current
state_class: measurement
count: 1
scale: 0.01
offset: 0
precision: 1
data_type: uint16
- name: Modbus_Power_AC
slave: 1
address: 2
input_type: holding
unit_of_measurement: W
device_class: power
state_class: measurement
count: 2
scale: 1
offset: 0
precision: 0
data_type: int32
scan_interval: 1
- name: Modbus_ImportEnergy_AC
slave: 1
address: 4
input_type: holding
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
count: 2
scale: 0.0003125
offset: 0
precision: 3
data_type: uint32
- name: Modbus_ExportGrid_AC
slave: 1
address: 6
input_type: holding
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
count: 2
scale: 0.0003125
offset: 0
precision: 3
data_type: uint32


Thread Status
6
349
3
2
0

Sort replies by:

1. There is only one meter under the current device (ip), so there is no restriction on slaveID. By default, use 1.
2. Please set scan_interval: above 6, because the current default minimum data update interval of the meter is 6s, scan_interval: 6
3. There are no other problems found in your configuration file, you can refer to the configuration of this single-phase meter and take a closer look: modbus1.yaml
4. At present, your single phase meter returns 0 values may have something to do with your scan_interval set to 1
Please modify it according to the above suggestions and see if it solves the problem

Thanks for looking at this. I  set the scan_interval to 6 on all sensors. It made no difference.

The sensors are created in Home assistant, I could change a value on the Developers tab and it took but was quickly overwitten back to 0 on the next refresh.

I found  a modbus monitor for my Android phone. It received responses from the meter (but I had no idea what I was looking at in the numeric data). 

At this stage I am out of ideas so any further help would be appreciated.



I had another go at this. I removed the modbus connection for the wem380t and exactly copied the wem380 yaml you have here to my configuration.yaml (changing inly the ip address)

https://github.com/lewei50/Solar-PV-Monitoring/blob/master/Yaml%20in%20Home%20Assistant/ModbusTCP/modbus1.yaml

noting worked

I then changed the scan interval to 6. then to 12

Still nothing works 

Everything works perfectly with the WEM3080T

I can only assume that there is some firmware bug running ATVi.75.97.5@MX1290 with modbus tcp on the WEM380.

I look forward to hearing further.



Hi I have forwarded this issue to my colleague, but it is the middle-autumn holiday in China, we will be back to work next Tuesday.

I had another go at this. I removed the modbus connection for the wem380t and exactly copied the wem380 yaml you have here to my configuration.yaml (changing inly the ip address)https://github.com/lewei50/Solar-PV-Monitoring/blob/master/Yaml%20in%20Home%20Assistant/ModbusTCP/modbus1.yamlnoting workedI then changed the scan interval to 6. then to 12Still nothing works Everything works perfectly with the WEM3080TI can only assume that there is some firmware bug running ATVi.75.97.5@MX129

Hi:

There is indeed a bug in i.75.94-i.75.96(i.75.96 is OK), which does not reply to the modbus/tcp request in WEM3080(single phase power meter).

The WEM3080T would not be affected.


We have just upgraded the FW to i.75.97.7 to fix this bug.

Please upgrade to the latest version here https://imeter.club/topic/11

I had another go at this. I removed the modbus connection for the wem380t and exactly copied the wem380 yaml you have here to my configuration.yaml (changing inly the ip address)https://github.com/lewei50/Solar-PV-Monitoring/blob/master/Yaml%20in%20Home%20Assistant/ModbusTCP/modbus1.yamlnoting workedI then changed the scan interval to 6. then to 12Still nothing works Everything works perfectly with the WEM3080TI can only assume that there is some firmware bug running ATVi.75.97.5@MX129

Thank you test as working perfectly now. 

You offer such great support, Thank you!

Looks like you are new here. Register for free, learn and contribute.