wez / govee2mqtt

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

H6073 not being controlled #20

Closed borisb13 closed 9 months ago

borisb13 commented 9 months ago

I had no problem setting this up, and the device did automatically show up in MQTT integration. However, the On/Off switch doesn't do anything. It toggles 'on' for a few seconds, and then resets back to 'off'. In fact, none of the other switches (or segments) work either.

I checked the MQTT Bridge logs, and it seems to be successfully sending the command: [2024-01-06T21:10:23 INFO govee::service::hass] Command for Govee RGB (91:FF:D3:34:38:39:3C:7F): {"state":"ON"}

There are a couple of things in my config that could be causing problems:

  1. The Govee device is on a different subnet from my Home Assistant instance, but it's fully pingable. It has a static IP, and I've added it to the MQTT bridge options (log shows GOVEE_LAN_SCAN=10.0.10.105).

  2. Looking at the MQTT logs, the Govee API is returning the device info, but the MAC looks wrong. Here's the log excerpt:

[2024-01-06T21:02:27 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-01-06T21:02:27 INFO  govee::commands::serve] Govee RGB (91:FF:D3:34:38:39:3C:7F) sku=H6073
[2024-01-06T21:02:27 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-06T21:02:27 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-01-06T21:02:27 INFO  govee::commands::serve]   Undoc: room=Some("Living Room") supports_iot=true ble_only=false

and that MAC address in definitely not the one that's showing up on my LAN. I'm not sure if there's a different internal MAC they're using, but I figured I'd mention it.

And I should also mention that up until now, I was using your old Govee LAN Control HACS add-on, and that was working just fine. I did remove it before setting up this one, but I figured it's important to know that the device could be successfully controlled via LAN Control

wez commented 9 months ago

set the debug level to govee=trace and restart the addon; that will increase the logging verbosity significantly and may reveal more information.

borisb13 commented 9 months ago

I'm not really seeing any errors. Here's the initial log after I rebooted and tried to turn on the lights twice:

[2024-01-06T23:24:51 INFO  govee::commands::serve] 
[2024-01-06T23:24:51 INFO  govee::commands::serve] Starting LAN discovery
[2024-01-06T23:24:51 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-06T23:24:51 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-06T23:24:51 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-01-06T23:24:53 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-06T23:24:53 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-06T23:24:56 TRACE govee::cache] cache hit for community-login
[2024-01-06T23:24:56 TRACE govee::cache] cache hit for one-click-shortcuts
[2024-01-06T23:24:56 TRACE govee::cache] cache miss for scene-list-H6073-91:FF:D3:34:38:39:3C:7F
[2024-01-06T23:24:56 TRACE govee::cache] cache miss for scene-list-diy-H6073-91:FF:D3:34:38:39:3C:7F
[2024-01-06T23:24:56 TRACE govee::cache] cache hit for scenes-H6073
[2024-01-06T23:24:56 TRACE govee::service::hass] register_with_hass: register entities
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/sensor/global-version/config -> {"availability_topic":"gv2mqtt/availability","name":"Version","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee to MQTT","manufacturer":"Wez Furlong","model":"govee2mqtt","sw_version":"2024.01.06-5915ee93","identifiers":["gv2mqtt"]},"unique_id":"global-version","entity_category":"diagnostic","state_topic":"gv2mqtt/sensor/global-version/state","unit_of_measurement":null}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F/config -> {"availability_topic":"gv2mqtt/availability","name":null,"origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state","optimistic":false,"supported_color_modes":["rgb","color_temp"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"effect_list":["Afternoon","Aurora","Birthday","Candy","Cherry blossoms","Christmas","Desert","Enthusiastic","Excited","Father's Day","Fire","Forest","Glacier","Halloween","Heartbeat","Leisure","Longing","Moonlight","Morning","Mother's Day","Music: Calm","Music: Dynamic","Night","Party","Quiet","Rainbow","Star","Sun","Sunset Glow","Sweet","Thanksgiving","Universe","Valentine's Day","Warm"],"min_mireds":111,"max_mireds":500,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/switch/gv2mqtt-91FFD3343:393C7F-powerSwitch/config -> {"availability_topic":"gv2mqtt/availability","name":"Power Switch","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-powerSwitch","command_topic":"gv2mqtt/switch/91FFD3343:393C7F/command/powerSwitch","state_topic":"gv2mqtt/switch/91FFD3343:393C7F/powerSwitch/state"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/switch/gv2mqtt-91FFD3343:393C7F-gradientToggle/config -> {"availability_topic":"gv2mqtt/availability","name":"Gradient Toggle","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-gradientToggle","command_topic":"gv2mqtt/switch/91FFD3343:393C7F/command/gradientToggle","state_topic":"gv2mqtt/switch/91FFD3343:393C7F/gradientToggle/state"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-0/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 001","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-0","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/0","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/0","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-1/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 002","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-1","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/1","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/1","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-2/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 003","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-2","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/2","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/2","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-3/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 004","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-3","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/3","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/3","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-4/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 005","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-4","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/4","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/4","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-5/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 006","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-5","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/5","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/5","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-6/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 007","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-6","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/6","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/6","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-7/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 008","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-7","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/7","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/7","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-8/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 009","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-8","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/8","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/8","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-9/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 010","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-9","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/9","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/9","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-10/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 011","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-10","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/10","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/10","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-11/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 012","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-11","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/11","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/11","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-12/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 013","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-12","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/12","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/12","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-13/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 014","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-13","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/13","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/13","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:56 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD3343:393C7F-14/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 015","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-5915ee93","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD3343:393C7F"]},"unique_id":"gv2mqtt-91FFD3343:393C7F-14","schema":"json","command_topic":"gv2mqtt/light/91FFD3343:393C7F/command/14","state_topic":"gv2mqtt/light/91FFD3343:393C7F/state/14","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-06T23:24:57 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-06T23:24:57 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-06T23:24:57 TRACE govee::service::hass] register_with_hass: mark as online
[2024-01-06T23:24:57 TRACE govee::service::hass] gv2mqtt/availability -> online
[2024-01-06T23:24:57 TRACE govee::service::hass] register_with_hass: reporting state
[2024-01-06T23:24:57 TRACE govee::service::hass] gv2mqtt/sensor/global-version/state -> 2024.01.06-5915ee93
[2024-01-06T23:24:57 TRACE govee::service::hass] gv2mqtt/light/91FFD3343:393C7F/state -> {"state":"OFF"}
[2024-01-06T23:24:57 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Govee RGB (91:FF:D3:34:38:39:3C:7F) gradientToggle
[2024-01-06T23:24:57 TRACE govee::service::hass] register_with_hass: done
[2024-01-06T23:24:57 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-01-06T23:25:05 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-06T23:25:05 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-06T23:25:11 INFO  govee::commands::serve] requesting update via IoT MQTT Govee RGB (91:FF:D3:34:38:39:3C:7F) None
[2024-01-06T23:25:21 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-06T23:25:21 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-06T23:25:34 INFO  govee::service::hass] Command for Govee RGB (91:FF:D3:34:38:39:3C:7F): {"state":"ON"}
[2024-01-06T23:25:53 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-06T23:25:53 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-06T23:26:25 INFO  govee::service::hass] Command for Govee RGB (91:FF:D3:34:38:39:3C:7F): {"state":"ON"}
wez commented 9 months ago

re: MAC, 91:FF:D3:34:38:39:3C:7F is a device id rather than a MAC address; it's too long to be a MAC address. On some devices it may contain part of the BLE MAC, but I don't think you can make any relation between it and the wifi mac.

borisb13 commented 9 months ago

Makes sense. And did you see anything in that log that would point to why it's not working?

wez commented 9 months ago

I've been looking through and comparing to the code. There's a lack of positive logging to show that things are being sent somewhere, but, I don't think there are gaps in the flow. By that I mean that we should be logging errors if we can't figure out how or where to send data, and logging errors if we don't get back data from the LAN connection. What I'm also not seeing from the logs you shared is the device status getting routed over MQTT to home assistant, so I'm not sure if nothing is happening or this is just a subset of the logs that doesn't have that.

So, I've made a couple of commits to add more trace logging. Please check for updates in the addon store, then update to the new build and try turning the light on and off, and/or change its color or brightness. Let's see what gets logged this time!

One thing that I added in the logging was the detected LAN device info on startup; please be sure to include that section in what you share here.

borisb13 commented 9 months ago

Thanks. I've done that, but the logs are weird. They seem to be cut off at the top, and only the last 100 lines or so are being displayed. I was able to get the initial snippet, right after restart:

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=core-mosquitto
GOVEE_LAN_SCAN=10.0.10.105
GOVEE_EMAIL=REDACTED
GOVEE_PASSWORD=REDACTED
GOVEE_MQTT_PASSWORD=REDACTED
GOVEE_MQTT_USER=addons
GOVEE_MQTT_PORT=1883
++ cd /app
++ exec /app/govee serve
[2024-01-07T00:31:00 INFO  govee::commands::serve] Starting service. version 2024.01.06-fc7ae219
[2024-01-07T00:31:00 INFO  govee::commands::serve] Querying platform API for device list
[2024-01-07T00:31:00 TRACE govee::cache] cache hit for device-list
[2024-01-07T00:31:00 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-01-07T00:31:00 TRACE govee::cache] cache hit for account-info

[2024-01-07T00:31:00 TRACE govee::cache] cache hit for iot-key
[
[2024-01-07T00:31:01 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-01-07T00:31:01 INFO  govee::commands::serve] Starting LAN discovery
[2024-01-07T00:31:01 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-01-07T00:31:01 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:31:01 TRACE govee::lan_api] Send disco packet to 239.255.255.250

a few seconds later, I got this:

                tem_cali: None,
                hum_min: None,
                hum_max: None,
                hum_warning: None,
                hum_cali: None,
                net_waring: None,
                upload_rate: None,
                battery: None,
                wifi_level: None,
            },
            ext_resources: ExtResources {
                sku_url: Some(
                    "https://d1f2504ijhdyjw.cloudfront.net/sku-img/e2f25f0f73173ecfae554c1e655696a5-add_list_type_device_6073.png",
                ),
                head_on_img_new: Some(
                    "",
                ),
                head_on_img: Some(
                    "https://d1f2504ijhdyjw.cloudfront.net/sku-img/4d42eaa11e676fa69344fb0da16d3bf5-new_light_title_6073_on.png",
                ),
                head_off_img: Some(
                    "https://d1f2504ijhdyjw.cloudfront.net/sku-img/c36c83868fc165ec0f7c3ec0da96bb66-new_light_title_6073_off.png",
                ),
                head_off_img_new: Some(
                    "",
                ),
                ext: Some(
                    "",
                ),
                ic: Some(
                    0,
                ),
            },
            last_device_data: LastDeviceData {
                online: false,
                tem: None,
                hum: None,
                last_time: None,
                avg_day_tem: None,
                avg_day_hum: None,
            },
        },
        device_name: "Govee RGB",
        goods_type: 58,
        group_id: 8038907,
        pact_code: Some(
            1,
        ),
        pact_type: Some(
            1,
        ),
        share: Some(
            0,
        ),
        sku: "H6073",
        spec: "",
        support_scene: false,
        version_hard: "3.02.01",
        version_soft: "1.00.13",
    },
}
[2024-01-07T00:31:05 INFO  govee::commands::serve] 
[2024-01-07T00:31:05 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-01-07T00:31:07 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:31:07 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:31:10 TRACE govee::cache] cache hit for community-login
[2024-01-07T00:31:10 TRACE govee::cache] cache hit for one-click-shortcuts
[2024-01-07T00:31:10 TRACE govee::cache] cache hit for scene-list-H6073-91:FF:D3:34:38:39:3C:7F
[2024-01-07T00:31:10 TRACE govee::cache] cache hit for scene-list-diy-H6073-91:FF:D3:34:38:39:3C:7F
[2024-01-07T00:31:10 TRACE govee::cache] cache hit for scenes-H6073
[2024-01-07T00:31:10 TRACE govee::service::hass] register_with_hass: register entities
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/sensor/global-version/config -> {"availability_topic":"gv2mqtt/availability","name":"Version","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee to MQTT","manufacturer":"Wez Furlong","model":"govee2mqtt","sw_version":"2024.01.06-fc7ae219","identifiers":["gv2mqtt"]},"unique_id":"global-version","entity_category":"diagnostic","state_topic":"gv2mqtt/sensor/global-version/state","unit_of_measurement":null}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F/config -> {"availability_topic":"gv2mqtt/availability","name":null,"origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command","state_topic":"gv2mqtt/light/91FFD33438393C7F/state","optimistic":false,"supported_color_modes":["rgb","color_temp"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"effect_list":["Afternoon","Aurora","Birthday","Candy","Cherry blossoms","Christmas","Desert","Enthusiastic","Excited","Father's Day","Fire","Forest","Glacier","Halloween","Heartbeat","Leisure","Longing","Moonlight","Morning","Mother's Day","Music: Calm","Music: Dynamic","Night","Party","Quiet","Rainbow","Star","Sun","Sunset Glow","Sweet","Thanksgiving","Universe","Valentine's Day","Warm"],"min_mireds":111,"max_mireds":500,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/switch/gv2mqtt-91FFD33438393C7F-powerSwitch/config -> {"availability_topic":"gv2mqtt/availability","name":"Power Switch","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-powerSwitch","command_topic":"gv2mqtt/switch/91FFD33438393C7F/command/powerSwitch","state_topic":"gv2mqtt/switch/91FFD33438393C7F/powerSwitch/state"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/switch/gv2mqtt-91FFD33438393C7F-gradientToggle/config -> {"availability_topic":"gv2mqtt/availability","name":"Gradient Toggle","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-gradientToggle","command_topic":"gv2mqtt/switch/91FFD33438393C7F/command/gradientToggle","state_topic":"gv2mqtt/switch/91FFD33438393C7F/gradientToggle/state"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-0/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 001","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-0","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/0","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/0","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-1/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 002","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-1","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/1","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/1","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-2/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 003","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-2","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/2","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/2","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-3/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 004","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-3","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/3","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/3","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-4/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 005","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-4","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/4","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/4","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-5/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 006","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-5","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/5","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/5","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-6/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 007","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-6","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/6","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/6","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-7/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 008","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-7","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/7","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/7","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-8/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 009","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-8","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/8","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/8","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-9/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 010","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-9","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/9","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/9","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-10/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 011","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-10","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/10","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/10","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-11/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 012","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-11","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/11","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/11","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-12/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 013","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-12","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/12","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/12","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-13/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 014","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-13","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/13","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/13","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:10 TRACE govee::service::hass] homeassistant/light/gv2mqtt-91FFD33438393C7F-14/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 015","origin":{"name":"gv2mqtt","sw_version":"2024.01.06-fc7ae219","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee RGB","manufacturer":"Govee","model":"H6073","suggested_area":"Living Room","via_device":"gv2mqtt","identifiers":["gv2mqtt-91FFD33438393C7F"]},"unique_id":"gv2mqtt-91FFD33438393C7F-14","schema":"json","command_topic":"gv2mqtt/light/91FFD33438393C7F/command/14","state_topic":"gv2mqtt/light/91FFD33438393C7F/state/14","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-07T00:31:11 TRACE govee::service::hass] register_with_hass: mark as online
[2024-01-07T00:31:11 TRACE govee::service::hass] gv2mqtt/availability -> online
[2024-01-07T00:31:11 TRACE govee::service::hass] register_with_hass: reporting state
[2024-01-07T00:31:11 TRACE govee::service::hass] gv2mqtt/sensor/global-version/state -> 2024.01.06-fc7ae219
[2024-01-07T00:31:11 TRACE govee::service::hass] gv2mqtt/light/91FFD33438393C7F/state -> {"state":"OFF"}
[2024-01-07T00:31:11 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Govee RGB (91:FF:D3:34:38:39:3C:7F) gradientToggle
[2024-01-07T00:31:11 TRACE govee::service::hass] register_with_hass: done
[2024-01-07T00:31:11 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-01-07T00:31:15 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:31:15 TRACE govee::lan_api] Send disco packet to 239.255.255.250

and after I tried turning the light on, this was added:

[2024-01-07T00:31:25 INFO  govee::commands::serve] requesting update via IoT MQTT Govee RGB (91:FF:D3:34:38:39:3C:7F) None
[2024-01-07T00:31:31 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:31:31 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:32:03 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:32:03 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:33:03 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:33:03 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:34:03 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:34:03 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:35:03 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:35:03 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:36:00 INFO  govee::service::hass] Command for Govee RGB (91:FF:D3:34:38:39:3C:7F): {"state":"ON"}
[2024-01-07T00:36:03 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:36:03 TRACE govee::lan_api] Send disco packet to 239.255.255.250
borisb13 commented 9 months ago

I should also mention that I'm running HA in a VM, and using the Mosquito MQTT add-on. I have other devices that are set up on MQTT, and they're working without issues, so I know that configuration is valid fwiw

wez commented 9 months ago

Let's change the debug level a bit: govee::lan_api=trace,info

borisb13 commented 9 months ago

Here's the new log:

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=core-mosquitto
GOVEE_LAN_SCAN=10.0.10.105
GOVEE_EMAIL=REDACTED
GOVEE_PASSWORD=REDACTED
GOVEE_MQTT_PASSWORD=REDACTED
GOVEE_MQTT_USER=addons
GOVEE_MQTT_PORT=1883
++ cd /app
++ exec /app/govee serve
[2024-01-07T00:48:02 INFO  govee::commands::serve] Starting service. version 2024.01.06-fc7ae219
[2024-01-07T00:48:02 INFO  govee::commands::serve] Querying platform API for device list
[2024-01-07T00:48:02 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-01-07T00:48:03 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-01-07T00:48:03 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-01-07T00:48:03 INFO  govee::commands::serve] Starting LAN discovery
[2024-01-07T00:48:03 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:48:03 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:48:05 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:48:05 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:48:07 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-01-07T00:48:07 INFO  govee::commands::serve] Govee RGB (91:FF:D3:34:38:39:3C:7F) sku=H6073
[2024-01-07T00:48:07 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-07T00:48:07 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-01-07T00:48:07 INFO  govee::commands::serve]   Undoc: room=Some("Living Room") supports_iot=true ble_only=false
[2024-01-07T00:48:07 INFO  govee::commands::serve] 
[2024-01-07T00:48:07 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-01-07T00:48:09 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:48:09 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:48:13 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-01-07T00:48:17 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:48:17 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:48:27 INFO  govee::commands::serve] requesting update via IoT MQTT Govee RGB (91:FF:D3:34:38:39:3C:7F) None
[2024-01-07T00:48:33 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:48:33 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:49:05 TRACE govee::lan_api] Send disco packet to 10.0.10.105
[2024-01-07T00:49:05 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-07T00:49:13 INFO  govee::service::hass] Command for Govee RGB (91:FF:D3:34:38:39:3C:7F): {"state":"ON"}
wez commented 9 months ago

OK, what that says to me is that your device isn't being controlled via the LAN API; we'll only deem that working if we get responses from discovery and then subsequently device status requests, and we're not getting those there.

So... what's happening? I think we're probably trying use the platform API to control the device. The request must be successful because we don't log an error, and it must be happening, because we don't log an error that we don't know how to route the command.

My theory is: the cloud received the control request, but it is not making it to your device for some reason. Most likely cause: your network settings are preventing it from reaching the device.

Can your 10.0.10.105 reach the public internet (well, really just AWS)? That is required for the platform and IoT APIs to work.

I know you said that 10.0.10.105 was pingable from the hass box, but does UDP route correctly for ports 4001, 4002, 4003? https://github.com/wez/govee2mqtt/blob/main/docs/LAN.md has more background on that. It might be worth breaking out tcpdump to see what's happening on those ports.

borisb13 commented 9 months ago

I don't have any individual port routing for that IP, but I have a firewall rule to allow all traffic between subnets. And yes, that IP definitely has internet access.

As I said earlier, before I installed this add-on, I had your Govee LAN Control set up, and it worked successfully. At the time I originally set it up, I enabled LAN Control in the Govee app. But I just double checked the Govee app to make sure that LAN Control was still enabled, and that option isn't even showing up any more. I assume that I need to get that figured out before we continue troubleshooting, right?

borisb13 commented 9 months ago

OK, problem solved. I had to reboot the device, remove it from the Govee app, and then re-pair it. After that was done, the LAN Control switch was available again (and already turned on). I then restarted this add-on, and everything is being controlled properly.

Thanks for all your help

Leopoldpaul commented 9 months ago

I have a similar problem but with a H6052. I used the Lan control Hacs Integration before and I switched to the new one the device updates its state in Home Assistant if I change it manually, but if I try to control it through HA, nothing happens. log.txt

wez commented 9 months ago

@Leopoldpaul please file a separate issue of your own, it helps me to track and keep on top of things. I'm going to close this issue as it is resolved for the OP