You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have setup a Pi Zero W to act as a gateway to feed my regular server which runs HA.
It works neatly, good job really, nodejs is not officially supported anymore but that's fine. I installed v15.13.0. It's the only thing the Pi does.
I have setup 4 Ruuvitags with a Home Assistant (MQTT) target.
The problem is that after a couple of hours (I have seen anywhere between 2 and 30 hours) all MQTT broadcasts will stop except for one tag.
The logs confirm that (only that one tag is logged being broadcast), as well as my MQTT server.
According to the web interface (and logs), all tags are still being read correctly (BT -> Gateway is good), only the broadcast (publishing) to MQTT fails
Some interesting bits:
Turning off and on the target is enough to put things back in order
Same behavior if I make one target per tag (instead of one for the four), eventually only one tag will be sent to MQTT
The only tag which keeps broadcasting is the first one which was discovered
Extra info: I broadcast at a 60 seconds interval
I did another experiment where I have one Home Assistant (MQTT) target (first in the list) and a regular MQTT target. After a couple of hours all stopped broacasting except the first tag via the Home Assistant (MQTT) target. Turning off and on the regular MQTT target allowed it to work again (the Home Assistant (MQTT) target remain not working except for that one tag, until I also turn it off and on again).
Any idea on where in the code I could add a debug line which would show the tags being iterated for broacasting to MQTT and which would show they are skipped ?
The text was updated successfully, but these errors were encountered:
More debugging:
It appears that the tags which stop broacasting are entering the branch: if (1 * target.interval > 0 && Date.now() - tagField.ts > 1000 * target.interval) in index.js
[2021-04-09T07:28:06.301Z] [ERROR] Data older than interval : 1617953286300 / 1617953226289 / 60
[2021-04-09T07:28:06.302Z] [ERROR] Data older than interval : 1617953286302 / 1617953226289 / 60
[2021-04-09T07:28:06.303Z] [ERROR] Data older than interval : 1617953286303 / 1617953226289 / 60
[2021-04-09T07:29:06.337Z] [ERROR] Data older than interval : 1617953346337 / 1617953286322 / 60
[2021-04-09T07:29:06.339Z] [ERROR] Data older than interval : 1617953346339 / 1617953286322 / 60
[2021-04-09T07:29:06.340Z] [ERROR] Data older than interval : 1617953346340 / 1617953286322 / 60
That's ${Date.now()} / ${tagField.ts} / ${target.interval}
Somehow tagField.ts value becomes identical for all the tags (minus the first detected one). It keeps being updated (to what value?), but lags just above my 60s interval, which results in those tags being dropped.
I have setup a Pi Zero W to act as a gateway to feed my regular server which runs HA.
It works neatly, good job really, nodejs is not officially supported anymore but that's fine. I installed v15.13.0. It's the only thing the Pi does.
I have setup 4 Ruuvitags with a Home Assistant (MQTT) target.
The problem is that after a couple of hours (I have seen anywhere between 2 and 30 hours) all MQTT broadcasts will stop except for one tag.
Some interesting bits:
Extra info: I broadcast at a 60 seconds interval
I did another experiment where I have one Home Assistant (MQTT) target (first in the list) and a regular MQTT target. After a couple of hours all stopped broacasting except the first tag via the Home Assistant (MQTT) target. Turning off and on the regular MQTT target allowed it to work again (the Home Assistant (MQTT) target remain not working except for that one tag, until I also turn it off and on again).
Any idea on where in the code I could add a debug line which would show the tags being iterated for broacasting to MQTT and which would show they are skipped ?
The text was updated successfully, but these errors were encountered: