MBW.BlueRiiot2MQTT icon indicating copy to clipboard operation
MBW.BlueRiiot2MQTT copied to clipboard

Occasional long update delay

Open danps1 opened this issue 2 years ago • 4 comments

I have your cloud polling/mqtt integration set up and working well - thanks very much for writing it! I have been tracking the “measurement delay” - the time between the reading being taken, and then showing up in MQTT / HA. On the whole it is less than 2 minute which is great, but occasionally it takes MUCH MUCH longer…

My guess is that the integration has polled just before the reading is taken, and then doesn’t retry again for quite some time? Is there some change that I could make to have this retry much sooner if there isn’t any updated value? Thanks Dan

danps1 avatar Aug 25 '21 11:08 danps1

Could you be in a location with bad sigfox reception?

If that's the case, it could be that your BR device is missing its own checkins, meaning this updater will miss it too.

I believe the logic from me is that if an update is missed, then the tool will retry and gradually back off with increasing delays. So if I understand all this correctly - your device must not be making an update.

If you want to troubleshoot more, set this environment variable, and get me the logs on the next missed update :)

Logging__MinimumLevel__MBW.BlueRiiot2MQTT.Service.PoolUpdater: Debug

LordMike avatar Aug 25 '21 20:08 LordMike

Hi, I'll set up the debug logging and see if I can capture what is happening. Just a quick comment on the sigfox reception - this is not at all impossible that I have bad signal, but I don't think is the issue here. The "measurement delay" that I am showing the the graph above is essentially the delta between the timestamp on the measurement, and the now() when the mqtt update is received. I think the issue could be related to the retry algorithm you mention, because if I force a sync or restart the add-on, I can get the value from the blueriiot cloud to sync quicker. Will attach the logs once captured. Thanks!

danps1 avatar Aug 25 '21 23:08 danps1

Sorry - quick question - I am running the HASSIO Add-on - is there a way to set the logging level on there, or should I be setting up a seperate docker container instead?

danps1 avatar Aug 26 '21 00:08 danps1

There's no way on the HASSIO container unfortunately.. :/

LordMike avatar Aug 26 '21 08:08 LordMike