I have an issiue, where a Modbus slave is returning wrong values. If I test with a modbus program. I get a 5 digit value 5xxxx. This is expected.
My sensor in Homeassistant. Is showing a negative value of -7xxx.
I have 2 identical devices, and one of them shows correctly, one of them does not. I’ve tried deleting the sensor, renaming, also renaming the modbus device. Tried reading a different holding register, that holds the same value but with no luck. It keeps showing this wrong value.
The weird thing is, when the value in the modbus device increases, so does the read value in home assistant. So it seems like, it reads the correct value, but shows the wrong value. Tried deleting the sensor, tried resetting statistics. All efforts has failed.
Can anyone give me a hint, what to try next.
Tried changing the datatype. from default, to all other options, the result in HA is the same. Enabled debugging, but the log shows no errors.
Both Are the Same ND Meter Cube 400. They are connected in the same switch. The Registers, firmware ect. Are Identical. It has been working earlier.
The only thing that I think might have something to do with it, was that I needed to Restore the HA Appliance. And it was then offline for 14 days.
Nothing has ever changed. It’s running Modbus TCP. Below is the Snippet of the config on both meters, be aware, that all the datatype and all differences, are added by me trying to debug it.
Just set scale swap ect. No change. But I noticed a weird thing. The Test sensor that reads another register, that shows the same value, is also negative, but another digit.
I needs to be mentioned, that the other registers I read from the same device works fine. Here’s all the yaml behind the device.
Just set scale swap ect. No change. But I noticed a weird thing. The Test sensor that reads another register, that shows the same value, is also negative, but another digit.
I’m having a kind of similar problem:
I’m reading the power of a Solar Inverter via Modbus.
During night the Inverter goes off and the sensor value jumps to high negative value.
That causes problems with displaying and further calulations…