New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem after restart host computer #1182
Comments
Hello, do you have set "publish self state every N seconds" or how it was called, flag? If you restart your host (RPI), and then toggle value of a switch, does it also gets discovered? Or, to be clear, are they removed from config (so you have to rediscover) or maybe it's just that they are shown as unavailable? |
Yes, I have check checkbox Flag 2 - [MQTT] Broadcast self state every N (def: 60) seconds (delay configurable by 'mqtt_broadcastInterval' and 'mqtt_broadcastItemsPerSec' commands)
If I toogle value of state on switch UI, the state of switch will be unavailable on Home Assistant.
I don't understand. I don't have configuration in configuration.yml, but the switches exists in Settings -> Integration -> MQTT, but all switches are unavailable. |
I have installed MQTT on RPI host. I think that, if MQTT server is available for some time (restart time), after restart the switch not reconnect to mqtt, but on switch UI I see connected to MQTT. |
I have additional info. If I turn off my router and next turn on for some minutes, switches works. Problem only exists when host (RPI) is restarted. |
I had a similar issue, and setting flag 21 did the trick for me:
|
Doesn't works for me 😒 I set the Flag 21, restart switch, restart host, problem exists. |
I'm facing the same issue, currently looking at a Home assistant automation that restarts the devices when they show as "unavailable" if the system uptime is less then 5 mins. Its more of a work around as i'm not sure what else to do at present |
I have had the same problem, Once published discovery information is stored on the MQTT-broker, if the MQTT-broker (and Home-Assistant) restarts this information is lost. Actually, |
This Flag helped me, but not solved the problem. I set 27 Flag on my switches. Now if I restart host, I must restart switches (but I don't have to go to Config->Home Assistant Configuration and click Home assistant Discovery). |
I guess flag 27 worked for me because I got home assistant running on my router. Restarting MQTT broker and home assistant usually means restarting the whole router for me. As a workaround you could start home assistant discovery from time to time by a script, e.g. in
Be warned, I have not tested it. It should schedule a discovery every 10 seconds with a delay of 5 seconds. Better solution would be an event that is fired by the MQTT driver, or a modification of flag 27, so it sends discovery information on re-connection to the MQTT broker. |
Hello,
I have 5 switch with installed OpenBK firmware. I using Home assistant with MQTT installed in Dockers on my RPI. All switches works perfect, but I found 1 problem.
If I restart my host (my RPI), all my switches are unavaible. I must go to Config->Home Assistant Configuration and click Home assistant discovery. If I do this everything works great.
Why I must click discovery if I restart my host computer? Can I do something (for example set some flag)?
Please help.
The text was updated successfully, but these errors were encountered: