Bug : Invalid ModbusTCP data in Home Assistant

I am having an issue with occassional incorrect Energy readings from the Iammeter into Home Assistant using ModbusTCP.

Mostly it works as expected. But intermittently, I am getting a zero reading in Home Assistant instead of the all time cumulative kWh reading. This causes little spike to zero in the entities history graph. But the big issue is that when you use these in the Energy Dashboard, has the energy dashboard seeing this as a big interval reading and massively over stating the energy kWh for that period. 

You can see more details and a workaround to the issue as well as a way to manually correct the data here :-

https://community.home-assistant.io/t/data-spikes-in-the-energy-dashboard/469843/4


However, I am raising it here as I am wondering if this is something that can be fix at the source and if Iammeter can fix the Modbus implementation?? I am taking a wild guess, but wondering if the issue is cause when there is a problem reading the meter for some reason, it returns a zero which causes the problem rather than returning some sort of NA value that can be ignored.


Anyway help would be appreciated.

Thread Status
5
82
2
0
0

Sort replies by:

I understand this issue that you talk about completely.
When the energy meter is powered up and the tcp server is ready. it needs a little time to prepare the first valid measurement result(around 0.5 seconds) before it accepts the Modbus/TCP polling.
If the Modbus/TCP polling comes early, it will return zero data for the first polling result.
This probability is very low but indeed exists.

We will consider upgrading our firmware to prevent such zero data returns in the first polling.

In fact, I do not understand why HA do not add some simple filter when they read the kWh data(such as rejecting the obvious abnormal data, such as zero), even if these kWh data are more important than some instant reading(they will be used in some further calculation, daily, monthly).

Thanks @Laolin.

I posted reply to you on the Home Assistant forum. So see details there, but my issue does not seem to be related to power up. But maybe some sort of reset of the Iammeter does itself?? Which seems to happen routinely (I don't remember seeing a "Runtime" of much more than about 600 seconds which is 10 hours).

As a result, I think that a Firmware updated to fix this would be very useful.

Note, as per my post on Home Assistant, and if you follow Tom_I's link to how to setup a filter, I assume that is the "filter" you are talking about (maybe not exactly the same). My filter is slightly different, and I just filter out the zero's. I suspect this will work, but it will need more time for the issue to reoccur on a meter that I have setup the filter for. However, the Firmware fix will be a better way to handle it, because it is difficutl and reduntant to create filters for all meter elements. And if I use one of these new filters, I will loose the historical data.

I understand this issue that you talk about completely.When the energy meter is powered up and the tcp server is ready. it needs a little time to prepare the first valid measurement result(around 0.5 seconds) before it accepts the Modbus/TCP polling.If the Modbus/TCP polling comes early, it will return zero data for the first polling result.This probability is very low but indeed exists.We will consider upgrading our firmware to prevent such zero data returns in the first polling.In fact, I do n

Sorry, my description is not accurate before, it is not "power up", but a reboot.
There is an auto reboot logic in this firmware, the time is around 10 hours.
Anyway, we will provide a new FW version for this issue this week,thanks for your feedback.

Thanks @Laolin.I posted reply to you on the Home Assistant forum. So see details there, but my issue does not seem to be related to power up. But maybe some sort of reset of the Iammeter does itself?? Which seems to happen routinely (I don't remember seeing a "Runtime" of much more than about 600 seconds which is 10 hours).As a result, I think that a Firmware updated to fix this would be very useful.Note, as per my post on Home Assistant, and if you follow Tom_I's link to how to setup a filter,

Please refer to the latest version

https://imeter.club/topic/11#content24

Thanks @Laolin.I posted reply to you on the Home Assistant forum. So see details there, but my issue does not seem to be related to power up. But maybe some sort of reset of the Iammeter does itself?? Which seems to happen routinely (I don't remember seeing a "Runtime" of much more than about 600 seconds which is 10 hours).As a result, I think that a Firmware updated to fix this would be very useful.Note, as per my post on Home Assistant, and if you follow Tom_I's link to how to setup a filter,

Thanks. I have upgraded. I assume this is fix the issue. But I will report back here if I see the issue again.


Please refer to the latest versionhttps://imeter.club/topic/11#content24
Looks like you are new here. Register for free, learn and contribute.