Comments (6)
I wanted to do this because after a power outage, this addon loads faster than the mqtt addon.
While I can agree this should probably be fixed, I'm more interested in this described issue because this should not be a problem. The script is designed to start without MQTT being started and simply wait for it (it's a feature of the script for a very long time and logs that the MQTT broker is unreachable). Only once the MQTT broker starts and the connection is established does it being to publish data. Connection monitoring of MQTT has been since the early says of the script.
I just tested this behavior in my lab setup of Hass.io by setting the MQTT on manual start and leaving ring-mqtt on autostart (so obviously ring-mqtt starts before MQTT broker). The addon properly logged that the MQTT broker was unreachable and continues to log it's reconnection attempts. After 120 seconds I started the MQTT broker and indeed, ring-mqtt script/addon connected to MQTT broker immediately and started publishing data. About 60 seconds later it appeared in the UI, no automations needed.
If you are seeing different behavior you should describe it so that it can be fixed. No automations should be required.
from ring-mqtt.
Ok, so I gave it some time after a restart and the ring alarm is still unavailable.
The log seems like there was actually an mqtt connection:
2020-02-26T17:44:38.932Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/alarm_control_panel/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/alarm_state disarmed
2020-02-26T17:44:38.934Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/alarm_control_panel/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/attributes {"tamper_status":"ok"}
2020-02-26T17:44:38.936Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz/motion_state ON
2020-02-26T17:44:38.937Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz/attributes {"battery_level":100,"tamper_status":"ok"}
2020-02-26T17:44:38.940Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/motion_state OFF
2020-02-26T17:44:38.941Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/attributes {"battery_level":100,"tamper_status":"ok"}
2020-02-26T17:44:38.944Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/motion_state ON
2020-02-26T17:44:38.945Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/attributes {"battery_level":100,"tamper_status":"ok"}
2020-02-26T17:44:48.006Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/motion_state ON
2020-02-26T17:44:48.006Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/attributes {"battery_level":100,"tamper_status":"ok"}
2020-02-26T17:45:31.272Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/cccccccc-cccc-cccc-cccc-cccccccccccc/motion_state OFF
2020-02-26T17:45:31.274Z ring-mqtt ring/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/alarm/binary_sensor/cccccccc-cccc-cccc-cccc-cccccccccccc/attributes {"battery_level":100,"tamper_status":"ok"}
In the end, following an add-on restart, the ring alarm becomes available again.
from ring-mqtt.
I've done another reboot for other reasons and now it worked.
The log output for the ring addon is identical. I have yet to determine why this happens.
from ring-mqtt.
Yep, the log above clearly shows that ring-mqtt had made the connection and was sending config and state updates.
By any chance did the reboot where it didn't work involve an upgrade? The script actually sends the discovery data 10 times, once every 30 seconds, after in connects to MQTT, but I've noticed that recent Hass.io upgrades are starting to take quite a long time for the service to start (I think they took almost 4 minutes on my RPi3B last week). Maybe I should extend the time after initial startup.
Also, did you configure the recommended mqtt birth messages. The script listens for these to know when Home Assistant itself has connected to MQTT and is ready to receive messages, but if you don't set this up there's no way for the script to know.
from ring-mqtt.
Also, you might want to rebuild your addon if you installed in the last few days. There was one minor bug that could have caused devices to be set to "offline" status even when they were online. I just committed a fix for that yesterday. I don't think your particular case would have been impacted by it (it was more if the connection to Ring had gone online then offline) but maybe it could be in there. You don't have to do anything other than click the "Rebuild" option in the addon and restart it to get the latest code.
from ring-mqtt.
I changed the slug to use an underscore because I agree that this was a good idea due to the issue you noted so I'm going to go ahead and close this.
If you continue to have issues with devices not showing after a reboot please feel free to open an issue on the Github page for the addon because it is definitely expected to work in all cases without manual or automated restarts, it's a design goal.
from ring-mqtt.
Related Issues (20)
- Snapshot Fails For Generic Camera HOT 2
- 5.6.1 - Bridge addition breaking new version HOT 1
- mqtt connection issue after upgrade from 5.5.1 to 5.6.2 HOT 8
- Not seeing Alarm control panel to change modes of Ring via MQTT HOT 11
- Mqtt not finding ring alarm and smart lighting HOT 51
- Live Stream turning on by itself
- No Docker Hub image for v5.6.3 HOT 3
- Issues running Ring-mqtt and another mqtt docker HOT 1
- New camera models (ring-api project) are not showing up HOT 3
- Bug: Some HA discovery topics have no name HOT 7
- Error Configuration file could not be read. HOT 1
- Bug: Doorbell found, but no device added HOT 3
- MyQ Garage door not status not showing in HA via this addin HOT 1
- Support: Do I need Mosquitto broker installed? HOT 3
- Stopped working after adding new Eufy Cams with go2rtc. Will not stream. HOT 2
- Disarm fire alarm event does not change alarm panel to disarmed status HOT 29
- Support: My devices are not showing up HA HOT 3
- ERROR - Uncaught Exception ring-mqtt Cannot read properties of undefined (reading 'toString') HOT 6
- Choppy audio in Homekit HOT 1
- How do I get mosquitto self-signed data into the docker container? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ring-mqtt.