AI System Status is showing disconnected every time after rebooting Home Assistant
reesion opened this issue · comments
What trouble are you having?
AI System Status (binary_sensor.ai_system_status) is showing disconnected every time after rebooting Home Assistant. I will need to restart the ai-trigger container to bring the status back to "connected"
Have you tried with the sample files?
No
Have you tried the steps in the troubleshooting guide?
https://github.com/danecreekphotography/node-deepstackai-trigger/wiki/Troubleshooting
Ye
Log entries
Please copy and paste all the log messages from the Docker output
Installation details
- OS: [e.g. Mac, Windows 10]
Debian - Docker setup [e.g. sample docker-compose.yaml, Portainer, UnRAID, etc]
Portainer with docker-compose.yaml
Additional context
Add any other context about the problem here.
Do you have retain
set to true
in the MQTT section of your settings file?
No. I didn't have that set but I have now set it and that seems to fix the issue.
Thank you very much.
Thinking about this a bit more I don't think this is a real fix. The system should be sending "online" MQTT messages periodically. I'll think about this a bit more.
Agreed, the 'retain' is not a good fix. I've had lingering trigger events in MQTT ( BlueIris/admin ) with 'retain' that cause BI to crash during start-up. Took me a good long while to find that issue.
Notes to myself:
Currently online is published here:
This should probably move inside MqttManager and just be done inside a timer that keeps firing every whatever seconds. If I wanted to get fancy the interval could get specified in the settings file.
Ok I have a build for you to try @reesion. Change your Docker config so instead of pulling latest
it pulls issue423
. Then use some sort of MQTT tool (if you are on Windows the MQTT Explorer app from Windows Store is amazing) to clear out the retained status message.
Then fire up everything. You should see a new "online" message pop in every 60 seconds. If you kill HA and restart it will pick up the proper online status at the next health message arrival (within 60 seconds).
Noice!!! Thanks. I'll get this released as v5.8.0 later today and let you know when it's out so you can flip back to latest
.
Thank you