govee2mqtt: After HA restart devices become unavailable

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

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
GOVEE_API_KEY=REDACTED
GOVEE_MQTT_HOST=a0d7b954-emqx
GOVEE_TEMPERATURE_SCALE=C
GOVEE_EMAIL=REDACTED
GOVEE_PASSWORD=REDACTED
GOVEE_MQTT_PASSWORD=REDACTED
GOVEE_MQTT_USER=govee2mqtt
GOVEE_MQTT_PORT=1883
++ cd /app
++ exec /app/govee serve
[2024-01-25T16:25:11 INFO  govee::commands::serve] Starting service. version 2024.01.24-ea3cd430
[2024-01-25T16:25:11 INFO  govee::commands::serve] Querying platform API for device list
[2024-01-25T16:25:12 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-01-25T16:25:13 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-01-25T16:25:13 INFO  govee::commands::serve] Starting LAN discovery
[2024-01-25T16:25:13 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-01-25T16:25:13 INFO  govee::commands::serve] Waiting 10 seconds for LAN API discovery
[2024-01-25T16:25:23 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-01-25T16:25:23 INFO  govee::commands::serve] Office Heater (6B:9B:60:74:xx:xx:xx:xxH713A)
[2024-01-25T16:25:23 INFO  govee::commands::serve]   Platform API: devices.types.heater. supports_rgb=false supports_brightness=false
[2024-01-25T16:25:23 INFO  govee::commands::serve]                 color_temp=None segment_rgb=None
[2024-01-25T16:25:23 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-25T16:25:23 INFO  govee::commands::serve]   Quirk { sku: "H713A", icon: "mdi:heat-wave", supports_rgb: false, supports_brightness: false, color_temp_range: None, avoid_platform_api: false, ble_only: false, lan_api_capable: false, device_type: Heater, platform_temperature_sensor_units: Some(Farenheit), platform_humidity_sensor_units: None, iot_api_supported: false, show_as_preset_buttons: None }
[2024-01-25T16:25:23 INFO  govee::commands::serve] 
[2024-01-25T16:25:23 INFO  govee::commands::serve] Aura Lamp (3C:DD:C2:32:xx:xx:xx:xxH6052)
[2024-01-25T16:25:23 INFO  govee::commands::serve]   LAN API: ip=x.y.z.c
[2024-01-25T16:25:23 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-25T16:25:23 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-01-25T16:25:23 INFO  govee::commands::serve]   Undoc: room=Some("Second Bedroom") supports_iot=true ble_only=false
[2024-01-25T16:25:23 INFO  govee::commands::serve]   Quirk { sku: "H6052", icon: "mdi:light-bulb", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: false, ble_only: false, lan_api_capable: true, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None }
[2024-01-25T16:25:23 INFO  govee::commands::serve] 
[2024-01-25T16:25:23 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-01-25T16:25:28 INFO  govee::service::hass] Wait 1.65s for hass to settle on 33 entity configs
[2024-01-25T16:25:30 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-01-25T16:25:43 INFO  govee::service::state] requesting update via Platform API Office Heater (6B:9B:60:74:F4:35:37:9E

Additional Logs

No response

Home Assistant Logs

No response

Anything else?

After a restart of the addon the become available again

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Comments: 20 (3 by maintainers)

Most upvoted comments

Here is mine, which just restarts it 30 secs after HA: (So you can pick and choose your poison 😄 )

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

I have the same problem.

I use an automation to restart govee2mqtt after a HA restart to “fix” the problem.

same problem here! thanks for the automation suggestions

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