Missing/Duplicated MQTT Messages

edited October 29 in Local MQTT

I'm having some issues with the local MQTT, mostly the feed works fine, supplying an electricity reading every 10s which is great. When I switched to parsing the timestamp data though I noticed gaps in the feed, this is demonstrated in the following sample of 10s readings (some data deleted to make it a bit more readable):

{"electricitymeter":{"timestamp":"2022-10-28T11:08:05Z","energy":{<...>,"import":{"cumulative":14803.247,<...>,"power":{"value":0.080,"units":"kW"}}}

{"electricitymeter":{"timestamp":"2022-10-28T11:08:15Z","energy":{<...>,"import":{"cumulative":14803.247,<...>,"power":{"value":0.088,"units":"kW"}}}

{"electricitymeter":{"timestamp":"2022-10-28T11:08:15Z","energy":{<...>,"import":{"cumulative":14803.247,<...>,"power":{"value":0.088,"units":"kW"}}}

{"electricitymeter":{"timestamp":"2022-10-28T11:08:35Z","energy":{<...>,"import":{"cumulative":14803.248,<...>,"power":{"value":0.079,"units":"kW"}}}

Notice that instead of a new message being sent at 11:08:25, the 11:08:15 message is resent a second time at 11:08:25. Does anyone else have this issue? Note that if you don't parse the timestamp and just use the message arrival time this will hide the error, but you're using an invalid power reading for that duplicated timestamp.

I'm using mosquitto_sub to output these messages, so there's really nothing between the CAD and the printout that could be causing this error, seems to be a bug in the meter or CAD, depending on which one generates the timestamp?

Comments

  • Confirmed with QoS 2 by the way, so it's definitely the CAD putting out the wrong message, though this may be caused by the meter depending on how it's implemented? I have an Elster AS300P with AM110R comms unit.

Sign In or Register to comment.