wez / govee2mqtt

Govee2MQTT: Connect Govee lights and devices to Home Assistant
MIT License
426 stars 24 forks source link

G2M devices show as unavailable until G2M restart #227

Open ctml91 opened 3 months ago

ctml91 commented 3 months ago

Govee Device SKU

H6159, H7060

Govee2MQTT Version

2024.04.29-30cf7732

Describe the issue

Randomly devices disappear and stop updating from Govee2Mqtt. In HA the devices appear as unavailable (2 x H6159, 2 x H7060), restarting Govee2Mqtt alone fixes the issue and the devices then appear as available from HA.

One theory I have is my flood lights which are on a separate smart switch (because it's on an extension cord shared with some other dumb devices that need on/off functionality) gets turned off from the external switch then perhaps G2M doesn't handle an existing Govee device dropping from network and it breaks mqtt functionality for all devices that are still on the network?

image image

Before the restart of G2M, container logs show requesting updates but nothing is propagated to HA.

[2024-06-18T14:31:57 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T18:16:56.095531334Z })
[2024-06-18T14:32:58 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T18:17:57.019590886Z })
[2024-06-18T14:46:59 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T18:31:57.971872732Z })
[2024-06-18T14:48:02 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T18:32:58.954010829Z })
[2024-06-18T15:02:03 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T18:47:00.022675795Z })
[2024-06-18T15:03:04 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T18:48:03.102197597Z })
[2024-06-18T15:17:06 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T19:02:04.103864292Z })
[2024-06-18T15:18:07 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T19:03:05.274809888Z })
[2024-06-18T15:32:08 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T19:17:06.333180101Z })
[2024-06-18T15:33:09 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T19:18:07.259712240Z })
[2024-06-18T15:47:10 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T19:32:08.251889479Z })
[2024-06-18T15:48:12 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T19:33:09.245823806Z })

Startup Diagnostics

This is as far back as the logs show. Since restart fixes, logs after restart are not as useful.

[2024-06-17T22:04:22 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T01:49:18.917655689Z })
[2024-06-17T22:14:23 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T01:59:19.814602776Z })
[2024-06-17T22:19:24 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:04:22.716778870Z })
[2024-06-17T22:22:03 INFO  govee::service::hass] powerSwitch for B21BC33734323015: OFF
[2024-06-17T22:22:03 INFO  govee::service::state] Using LAN API to set Front Flood Lights (B2:1B:C3:37:34:32:30:15 H7060) power state
[2024-06-17T22:22:03 INFO  govee::service::hass] powerSwitch for 3E61C53734321029: OFF
[2024-06-17T22:22:03 INFO  govee::service::state] Using LAN API to set Back Flood Lights (3E:61:C5:37:34:32:10:29 H7060) power state
[2024-06-17T22:22:13 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B21BC33734323015/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-17T22:22:13 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/3E61C53734321029/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-17T22:29:25 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:14:23.771404014Z })
[2024-06-17T22:34:26 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:19:24.731861081Z })
[2024-06-17T22:44:27 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:29:25.702968971Z })
[2024-06-17T22:49:21 INFO  govee::service::hass] powerSwitch for B21BC33734323015: OFF
[2024-06-17T22:49:21 INFO  govee::service::state] Using LAN API to set Front Flood Lights (B2:1B:C3:37:34:32:30:15 H7060) power state
[2024-06-17T22:49:21 INFO  govee::service::hass] powerSwitch for 3E61C53734321029: OFF
[2024-06-17T22:49:21 INFO  govee::service::state] Using LAN API to set Back Flood Lights (3E:61:C5:37:34:32:10:29 H7060) power state
[2024-06-17T22:49:28 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:34:26.726419010Z })
[2024-06-17T22:49:31 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B21BC33734323015/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-17T22:49:31 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/3E61C53734321029/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-17T22:59:29 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:44:27.720931264Z })
[2024-06-17T23:04:32 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:49:28.659756548Z })
[2024-06-17T23:13:01 INFO  govee::service::hass] powerSwitch for B21BC33734323015: OFF
[2024-06-17T23:13:01 INFO  govee::service::state] Using LAN API to set Front Flood Lights (B2:1B:C3:37:34:32:30:15 H7060) power state
[2024-06-17T23:13:01 INFO  govee::service::hass] dreamViewToggle for B30CC6313030124B: OFF
[2024-06-17T23:13:01 INFO  govee::service::hass] powerSwitch for B30CC6313030124B: OFF
[2024-06-17T23:13:01 INFO  govee::service::hass] powerSwitch for 3E61C53734321029: OFF
[2024-06-17T23:13:01 INFO  govee::service::hass] gradientToggle for B30CC6313030124B: OFF
[2024-06-17T23:13:01 INFO  govee::service::state] Using LAN API to set Back Flood Lights (3E:61:C5:37:34:32:10:29 H7060) power state
[2024-06-17T23:13:02 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B30CC6313030124B/command/dreamViewToggle", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: request https://openapi.api.govee.com/router/api/v1/device/control status 200: OK: parsing https://openapi.api.govee.com/router/api/v1/device/control response: Failed with status 400 Bad Request Bad Request: Request to https://openapi.api.govee.com/router/api/v1/device/control failed with code 400 Bad Request The device does not has DreamView. Full response: {"requestId":"uuid","msg":"The device does not has DreamView","code":400,"capability":{"type":"devices.capabilities.toggle","instance":"dreamViewToggle","state":{"status":"failure","errorCode":400,"errorMsg":"The device does not has DreamView"},"value":0}}
[2024-06-17T23:13:02 INFO  govee::service::state] Using Platform API to set TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) power state
[2024-06-17T23:13:02 INFO  govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: OnOff, instance: "powerSwitch", value: Number(0), state: Object {"status": String("success")} } }
[2024-06-17T23:13:03 INFO  govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: Toggle, instance: "gradientToggle", value: Number(0), state: Object {"status": String("success")} } }
[2024-06-17T23:13:07 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-17T23:13:07 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:04:32.530877267Z })
[2024-06-17T23:13:07 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-17T23:13:07 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:04:32.530877267Z })
[2024-06-17T23:13:08 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-17T23:13:08 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:04:32.530877267Z })
[2024-06-17T23:13:11 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/3E61C53734321029/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-17T23:13:11 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B21BC33734323015/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-17T23:14:33 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T02:59:29.599664206Z })
[2024-06-17T23:28:34 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:13:08.378470715Z })
[2024-06-17T23:29:35 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:14:33.577989456Z })
[2024-06-17T23:43:36 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:28:34.588675585Z })
[2024-06-17T23:44:37 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:29:35.819388766Z })
[2024-06-17T23:58:38 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:43:36.788530294Z })
[2024-06-17T23:59:41 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:44:37.711126700Z })
[2024-06-18T00:00:00 INFO  govee::service::hass] powerSwitch for B21BC33734323015: OFF
[2024-06-18T00:00:00 INFO  govee::service::state] Using LAN API to set Front Flood Lights (B2:1B:C3:37:34:32:30:15 H7060) power state
[2024-06-18T00:00:00 INFO  govee::service::hass] powerSwitch for B30CC6313030124B: OFF
[2024-06-18T00:00:00 INFO  govee::service::state] Using Platform API to set TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) power state
[2024-06-18T00:00:00 INFO  govee::service::hass] powerSwitch for 3E61C53734321029: OFF
[2024-06-18T00:00:00 INFO  govee::service::state] Using LAN API to set Back Flood Lights (3E:61:C5:37:34:32:10:29 H7060) power state
[2024-06-18T00:00:00 INFO  govee::service::hass] gradientToggle for B30CC6313030124B: OFF
[2024-06-18T00:00:00 INFO  govee::service::hass] dreamViewToggle for B30CC6313030124B: OFF
[2024-06-18T00:00:03 INFO  govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: OnOff, instance: "powerSwitch", value: Number(0), state: Object {"status": String("success")} } }
[2024-06-18T00:00:03 INFO  govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: Toggle, instance: "gradientToggle", value: Number(0), state: Object {"status": String("success")} } }
[2024-06-18T00:00:03 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B30CC6313030124B/command/dreamViewToggle", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: request https://openapi.api.govee.com/router/api/v1/device/control status 200: OK: parsing https://openapi.api.govee.com/router/api/v1/device/control response: Failed with status 400 Bad Request Bad Request: Request to https://openapi.api.govee.com/router/api/v1/device/control failed with code 400 Bad Request The device does not has DreamView. Full response: {"requestId":"uuid","msg":"The device does not has DreamView","code":400,"capability":{"type":"devices.capabilities.toggle","instance":"dreamViewToggle","state":{"status":"failure","errorCode":400,"errorMsg":"The device does not has DreamView"},"value":0}}
[2024-06-18T00:00:08 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-18T00:00:08 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:58:38.696779788Z })
[2024-06-18T00:00:08 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-18T00:00:08 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:58:38.696779788Z })
[2024-06-18T00:00:08 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-18T00:00:08 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:58:38.696779788Z })
[2024-06-18T00:00:10 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B21BC33734323015/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-18T00:00:10 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/3E61C53734321029/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-18T00:14:43 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T03:59:42.267162252Z })
[2024-06-18T00:15:44 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:00:08.984551575Z })
[2024-06-18T00:29:45 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:14:43.331748400Z })
[2024-06-18T00:30:46 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:15:44.295403618Z })
[2024-06-18T00:44:47 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:29:45.334172425Z })
[2024-06-18T00:45:48 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:30:46.305232890Z })
[2024-06-18T00:59:49 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:44:47.258683375Z })
[2024-06-18T01:00:00 INFO  govee::service::hass] powerSwitch for B21BC33734323015: OFF
[2024-06-18T01:00:00 INFO  govee::service::state] Using LAN API to set Front Flood Lights (B2:1B:C3:37:34:32:30:15 H7060) power state
[2024-06-18T01:00:00 INFO  govee::service::hass] powerSwitch for 3E61C53734321029: OFF
[2024-06-18T01:00:00 INFO  govee::service::state] Using LAN API to set Back Flood Lights (3E:61:C5:37:34:32:10:29 H7060) power state
[2024-06-18T01:00:00 INFO  govee::service::hass] gradientToggle for B30CC6313030124B: OFF
[2024-06-18T01:00:00 INFO  govee::service::hass] dreamViewToggle for B30CC6313030124B: OFF
[2024-06-18T01:00:00 INFO  govee::service::hass] powerSwitch for B30CC6313030124B: OFF
[2024-06-18T01:00:03 INFO  govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: Toggle, instance: "gradientToggle", value: Number(0), state: Object {"status": String("success")} } }
[2024-06-18T01:00:04 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B30CC6313030124B/command/dreamViewToggle", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: request https://openapi.api.govee.com/router/api/v1/device/control status 200: OK: parsing https://openapi.api.govee.com/router/api/v1/device/control response: Failed with status 400 Bad Request Bad Request: Request to https://openapi.api.govee.com/router/api/v1/device/control failed with code 400 Bad Request The device does not has DreamView. Full response: {"requestId":"uuid","msg":"The device does not has DreamView","code":400,"capability":{"type":"devices.capabilities.toggle","instance":"dreamViewToggle","state":{"status":"failure","errorCode":400,"errorMsg":"The device does not has DreamView"},"value":0}}
[2024-06-18T01:00:04 INFO  govee::service::state] Using Platform API to set TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) power state
[2024-06-18T01:00:05 INFO  govee::platform_api] control_device result: ControlDeviceResponse { request_id: "uuid", code: 200, message: "success", capability: ControlDeviceResponseCapability { kind: OnOff, instance: "powerSwitch", value: Number(0), state: Object {"status": String("success")} } }
[2024-06-18T01:00:08 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-18T01:00:08 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:45:48.271410390Z })
[2024-06-18T01:00:09 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-18T01:00:09 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:45:48.271410390Z })
[2024-06-18T01:00:10 INFO  govee::service::state] Polling TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) to get latest state after control
[2024-06-18T01:00:10 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:45:48.271410390Z })
[2024-06-18T01:00:10 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/B21BC33734323015/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-18T01:00:10 ERROR govee::service::hass] While dispatching Message { topic: "gv2mqtt/switch/3E61C53734321029/command/powerSwitch", payload: "OFF", qos: AtMostOnce, retain: false, mid: 0 }: timed out waiting for status
[2024-06-18T01:14:50 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T04:59:49.247795612Z })
[2024-06-18T01:15:52 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:00:12.362897484Z })
[2024-06-18T01:29:53 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:14:51.867397197Z })
[2024-06-18T01:30:54 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:15:52.813364388Z })
[2024-06-18T01:44:55 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:29:53.817808451Z })
[2024-06-18T01:45:56 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:30:54.762837050Z })
[2024-06-18T01:59:57 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:44:55.696400760Z })
[2024-06-18T02:00:58 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:45:56.705005131Z })
[2024-06-18T02:14:59 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T05:59:57.669292463Z })
[2024-06-18T02:16:00 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T06:00:58.694215791Z })
[2024-06-18T02:30:03 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T06:14:59.609631232Z })
[2024-06-18T02:31:04 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T06:16:02.702362178Z })
[2024-06-18T02:45:05 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T06:30:03.733287928Z })
[2024-06-18T02:46:06 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T06:31:04.703830101Z })
[2024-06-18T03:00:07 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T06:45:05.794369087Z })
[2024-06-18T03:01:08 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T06:46:06.749805539Z })
[2024-06-18T03:15:09 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T07:00:07.779896800Z })
[2024-06-18T03:16:12 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T07:01:08.751844374Z })
[2024-06-18T03:30:13 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T07:15:09.743425673Z })
[2024-06-18T03:31:14 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 9000, color: DeviceColor { r: 255, g: 255, b: 255 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-06-18T07:16:12.408183072Z })
[2024-06-18T03:45:15 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) Some(DeviceState { on: false, light_on: Some(false), online: Some(true), kelvin: 0, color: DeviceColor { r: 0, g: 0, b: 255 }, brightness: 15, scene: None, source: "PLATFORM API", updated: 2024-06-18T07:30:13.582804325Z })

Additional Logs

After Restart of G2M (this happened when all devices were online during day)

# podman logs govee2mqtt
[2024-06-18T16:01:05 INFO  govee::commands::serve] Starting service. version 2024.04.29-30cf7732
[2024-06-18T16:01:05 INFO  govee::commands::serve] Querying platform API for device list
[2024-06-18T16:01:05 INFO  govee::commands::serve] Starting LAN discovery
[2024-06-18T16:01:05 INFO  govee::commands::serve] Waiting 10 seconds for LAN API discovery
[2024-06-18T16:01:15 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-06-18T16:01:15 INFO  govee::commands::serve] TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199)
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-06-18T16:01:15 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-06-18T16:01:15 INFO  govee::commands::serve]
[2024-06-18T16:01:15 INFO  govee::commands::serve] Front Flood Lights (B2:1B:C3:37:34:32:30:15 H7060)
[2024-06-18T16:01:15 INFO  govee::commands::serve]   LAN API: ip=192.168.2.200
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-06-18T16:01:15 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..4)
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Quirk { sku: "H7060", icon: "mdi:light-flood-down", 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-06-18T16:01:15 INFO  govee::commands::serve]
[2024-06-18T16:01:15 INFO  govee::commands::serve] Back Flood Lights (3E:61:C5:37:34:32:10:29 H7060)
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-06-18T16:01:15 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..4)
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Quirk { sku: "H7060", icon: "mdi:light-flood-down", 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-06-18T16:01:15 WARN  govee::commands::serve]   This device should be available via the LAN API, but didn't respond to probing yet. Possible causes:
[2024-06-18T16:01:15 WARN  govee::commands::serve]   1) LAN API needs to be enabled in the Govee Home App.
[2024-06-18T16:01:15 WARN  govee::commands::serve]   2) The device is offline.
[2024-06-18T16:01:15 WARN  govee::commands::serve]   3) A network configuration issue is preventing communication.
[2024-06-18T16:01:15 INFO  govee::commands::serve]
[2024-06-18T16:01:15 INFO  govee::commands::serve] DreamView T1 (89:36:D0:32:32:36:0A:42 H6199)
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-06-18T16:01:15 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-06-18T16:01:15 INFO  govee::commands::serve]
[2024-06-18T16:01:15 INFO  govee::commands::serve] Ceiling TV Light (7A:A5:D4:AD:FC:9E:6F:91 H6159)
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-06-18T16:01:15 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=None
[2024-06-18T16:01:15 INFO  govee::commands::serve]   Quirk { sku: "H6159", icon: "mdi:led-strip-variant", 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-06-18T16:01:15 WARN  govee::commands::serve]   This device should be available via the LAN API, but didn't respond to probing yet. Possible causes:
[2024-06-18T16:01:15 WARN  govee::commands::serve]   1) LAN API needs to be enabled in the Govee Home App.
[2024-06-18T16:01:15 WARN  govee::commands::serve]   2) The device is offline.
[2024-06-18T16:01:15 WARN  govee::commands::serve]   3) A network configuration issue is preventing communication.
[2024-06-18T16:01:15 INFO  govee::commands::serve]
[2024-06-18T16:01:15 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-06-18T16:01:26 INFO  govee::service::hass] Wait 3.2s for hass to settle on 64 entity configs
[2024-06-18T16:01:30 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-06-18T16:01:35 INFO  govee::service::state] requesting update via Platform API TV Light Strip (B3:0C:C6:31:30:30:12:4B H6199) None
[2024-06-18T16:01:36 INFO  govee::service::state] requesting update via Platform API Back Flood Lights (3E:61:C5:37:34:32:10:29 H7060) None
[2024-06-18T16:01:36 INFO  govee::service::state] requesting update via Platform API DreamView T1 (89:36:D0:32:32:36:0A:42 H6199) None
[2024-06-18T16:01:36 INFO  govee::service::state] requesting update via Platform API Ceiling TV Light (7A:A5:D4:AD:FC:9E:6F:91 H6159) None

image

Home Assistant Logs

No response

Anything else?

No response

dasmith83 commented 3 months ago

I experience the same, but I've only noticed it when restarting HA in general. After HA boots, the devices remain unavailable, until I restart the Govee Add-on

wez commented 3 months ago

I noticed that there was a recent update to the mqtt broker addon to increase the number of messages that it can handle, I suspect that updating that will improve your experience with this issue.

jordanLswartz commented 3 months ago

I have the exact same issue where every time I restart home assistant, my Govee light will be unavailable until I restart the Govee to MQTT Bridge plugin. I'm using the most current version of Mosquitto broker (6.4.1) and still having this issue.

fleshinachair commented 2 months ago

same issue here

jdavis7765 commented 2 months ago

Same issue here, need to restart the bridge after every home assistant reboot.

Edit: I created an automation in nodered to restart the govee addon a few minutes after HA has started as a work around.