Open morrisb74 opened 5 months ago
Maybe that "Wait X s for hass" delay should be longer?
Try setting the debug level to mosquitto_rs=trace,info
so that you can see what is being sent.
The critical mqtt message is sent to gv2mqtt/availability
to tell hass that the addon is online and available.
If you see that being sent by the addon but hass doesn't think things are online, then it is possible that it is a timing issue with hass.
Another interesting message is homeassistant/status
which is hass telling everybody else that it is online. govee2mqtt should re-publish its availability when hass sends that message.
b9845f46_govee2mqtt_2024-01-25T16-55-08.162Z.log
Here you go
INFO govee::service::hass Wait 1.65s for hass to settle on 33 entity configs
DEBUG mosquitto_rs::lowlevel Client govee2mqtt/a50707b4e51347e184e513bd63c534ba sending PUBLISH (d0, q0, r0, m99, 'gv2mqtt/availability', ... (6 bytes))
DEBUG mosquitto_rs::lowlevel Client govee2mqtt/a50707b4e51347e184e513bd63c534ba received PUBLISH (d0, q0, r0, m0, 'homeassistant/status', ... (6 bytes))
INFO govee::service::hass Home Assistant status changed: online
INFO govee::service::hass Wait 1.65s for hass to settle on 33 entity configs
DEBUG mosquitto_rs::lowlevel Client govee2mqtt/a50707b4e51347e184e513bd63c534ba sending PUBLISH (d0, q0, r0, m153, 'gv2mqtt/availability', ... (6 bytes))
looks like govee2mqtt is sending the right things at the right times; the issue must be local to your install somehow. Is there a problem with your broker? Is there a problem with hass?
Broker is EMQX and Hass is working properly (HA-Green)
Hello, first of all thx. for your time and effort for this cool addon!
Same here on my environment (Raspi4 8GB), sometimes after Hass restart my lamp (H6072) ist not available. After restart the addon if Hass is alive a couple of minutes, everything works like a charm. Using Mosquitto broker (v6.4.0)...
Version Hass:
is there anything in home assistant's mqtt integration logs that might explain what is happening?
Same here on a VM with HAOS. I'll check the log but don't see anything. I'll chek more next time.
I don't see anything in log :
Mosquito :
Govee2Mqtt :
Restarte HA à 11:50:45
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
I have the same problem.
I have the same problem.
I use an automation to restart govee2mqtt after a HA restart to “fix” the problem.
I have the same problem.
I use an automation to restart govee2mqtt after a HA restart to “fix” the problem.
Me too. This might help some people:
alias: Reload MQTT if Govee Unavailable
description: ""
trigger:
- platform: state
entity_id:
- sensor.coving_rgb_light_status
to: unavailable
- platform: homeassistant
event: start
condition: []
action:
- service: homeassistant.reload_config_entry
metadata: {}
data:
entry_id: 01eb971ec0960879de5840ac238200df # mqtt device entry id
mode: single
Here is mine, which just restarts it 30 secs after HA: (So you can pick and choose your poison :D )
alias: Restart Govee2MQTT
description: "Restart Govee2MQTT after HA Restart"
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: binary_sensor.govee_to_mqtt_bridge_running
state: "on"
action:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- service: hassio.addon_restart
data:
addon: b9845f46_govee2mqtt
mode: single
same problem here! thanks for the automation suggestions
Same problem here
I too have the same problem and resolved this by creating an automation to restart Govee2mqtt after HA starts.
There must be a Home Assistant service dependency somewhere in the Govee2mqtt start up that is not being met immediately after HA restart but I also cannot glean it from the logs to help troubleshoot this Issue.
Same problem here, but I'm running this in its Docker container. I love this integration - except when it doesn't work and I have to restart it. Do you know if there is anything to look for here?
There hasn’t been an update for a while. A few automations have been posted here, you might be able to use those.
There hasn’t been an update for a while. A few automations have been posted here, you might be able to use those.
Those only work with HAOS... happy to continue logs or other testing...
I have the same issue. After a month of working perfectly, now going unavailable frequently.
Same issue here, running core on docker. I've always resolved it by manually restarting the MQTT integration, but that got old so I decided to log a bug and found this. Good idea with the automations, I'll try that.
I ended up going down the path of using this:
https://github.com/AlexxIT/SSHCommand
Since I'm running in Docker, it does what I need it to do. It keeps the "partner" factor happy, so I don't lose control over the Govee automations. :)
Glad that works for you, but I am also in Docker, and I don't have to touch g2mqtt, just the mqtt integration. Which is....odd, but works without those kind of shenanigans.
Same problem with docker container. When launching the docker compose file with all my services, the govee2mqtt service is still unavailable from HA after the start up.
My workaround is to force the launch of the container when HA docker is up and running using depends_on and a healthcheck. Example of my docker-compose.yml:
homeassistant:
container_name: home-assistant
depends_on:
- mosquitto
- postgres
image: homeassistant/home-assistant:stable
restart: always
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/manifest.json"]
interval: 40s
timeout: 10s
retries: 2
network_mode: host
govee2mqtt:
image: ghcr.io/wez/govee2mqtt:latest
container_name: govee2mqtt
restart: always
depends_on:
homeassistant:
condition: service_healthy
environment:
- GOVEE_MQTT_HOST=127.0.0.1
- GOVEE_MQTT_PORT=1883
- GOVEE_TEMPERATURE_SCALE=C
- RUST_LOG_STYLE=always
- TZ=Europe/Madrid
network_mode: host
I use an interval of 40s in the healthcheck, but maybe it's necessary to increase or decrease the value
Govee Device SKU
NA
Govee2MQTT Version
2024.01.24-ea3cd430
Describe the issue
Several times after a restart i noticed that the Govee devices became unavailable (also the local API ones)
Startup Diagnostics
Additional Logs
No response
Home Assistant Logs
No response
Anything else?
After a restart of the addon the become available again