wez / govee2mqtt

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

H6141 IOT API issues - #113

Open Voteq opened 9 months ago

Voteq commented 9 months ago

Govee Device SKU

H6141

Govee2MQTT Version

2024.01.24-ea3cd430

Describe the issue

I am having trouble controlling the H6141 LED Strips via the integration. Unfortunately I have 4 sets of these in the house and would like to try and get them working before I go an spend a load of money unnessecarily on new LED's so any help appreciated.

It seems that the IOT API device status request can retrieve the current status of the LED's (ON / OFF) but I cannot get it to show the colour or brightness for a device. Also controlling the device doesn't seem to work in HA either for any of the settings.

If the device is turned off via the app or alexa, when I click the power button in HA the toggle turns on and shortly after the toggle goes off again. (There are two power options, one "power switch" and another which is the actual LED strip with the toggle next to it, neither work.)

Heres a few tests I have done:

The device I am testing in the log is: Media Wall Lights

I also have the H605C (Dreamview TV Lights) and H6159 which both seem to work absolutely fine through the new API.

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=core-mosquitto GOVEE_TEMPERATURE_SCALE=C 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-26T09:27:50 INFO govee::commands::serve] Starting service. version 2024.01.24-ea3cd430 [2024-01-26T09:27:50 INFO govee::commands::serve] Querying platform API for device list [2024-01-26T09:27:51 INFO govee::commands::serve] Querying undocumented API for device + room list [2024-01-26T09:27:53 INFO govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted. [2024-01-26T09:27:53 INFO govee::commands::serve] Starting LAN discovery [2024-01-26T09:27:53 INFO govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted. [2024-01-26T09:27:53 INFO govee::commands::serve] Waiting 10 seconds for LAN API discovery [2024-01-26T09:28:03 INFO govee::commands::serve] Devices returned from Govee's APIs [2024-01-26T09:28:03 INFO govee::commands::serve] Office LEDS (18:2A:A4:C1:38:F1:AC:62 H6154) [2024-01-26T09:28:03 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-01-26T09:28:03 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-01-26T09:28:03 INFO govee::commands::serve] Undoc: room=Some("Office") supports_iot=true ble_only=false [2024-01-26T09:28:03 INFO govee::commands::serve] Quirk { sku: "H6154", 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: false, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: false, show_as_preset_buttons: None } [2024-01-26T09:28:03 INFO govee::commands::serve] [2024-01-26T09:28:03 INFO govee::commands::serve] TV Lights (71:55:D5:37:32:32:39:50 H605C) [2024-01-26T09:28:03 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-01-26T09:28:03 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=Some(0..15) [2024-01-26T09:28:03 INFO govee::commands::serve] Undoc: room=Some("Living Room") supports_iot=true ble_only=false [2024-01-26T09:28:03 INFO govee::commands::serve] [2024-01-26T09:28:03 INFO govee::commands::serve] Shelf lights (6F:40:D4:AD:FC:FA:88:BC H6159) [2024-01-26T09:28:03 INFO govee::commands::serve] LAN API: ip=192.168.7.234 [2024-01-26T09:28:03 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-01-26T09:28:03 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-01-26T09:28:03 INFO govee::commands::serve] Undoc: room=Some("Adults Room") supports_iot=true ble_only=false [2024-01-26T09:28:03 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-01-26T09:28:03 INFO govee::commands::serve] [2024-01-26T09:28:03 INFO govee::commands::serve] Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) [2024-01-26T09:28:03 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-01-26T09:28:03 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-01-26T09:28:03 INFO govee::commands::serve] Undoc: room=Some("Adults Room") supports_iot=true ble_only=false [2024-01-26T09:28:03 INFO govee::commands::serve] Quirk { sku: "H6141", icon: "mdi:led-strip-variant", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: true, ble_only: false, lan_api_capable: false, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-01-26T09:28:03 INFO govee::commands::serve] [2024-01-26T09:28:03 INFO govee::commands::serve] Regans TV (48:02:A4:C1:38:13:F1:49 H6141) [2024-01-26T09:28:03 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-01-26T09:28:03 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-01-26T09:28:03 INFO govee::commands::serve] Undoc: room=None supports_iot=true ble_only=true [2024-01-26T09:28:03 INFO govee::commands::serve] Quirk { sku: "H6141", icon: "mdi:led-strip-variant", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: true, ble_only: false, lan_api_capable: false, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-01-26T09:28:03 INFO govee::commands::serve] [2024-01-26T09:28:03 INFO govee::commands::serve] Sofa Lights (59:68:A4:C1:38:C7:D3:81 H6141) [2024-01-26T09:28:03 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-01-26T09:28:03 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-01-26T09:28:03 INFO govee::commands::serve] Undoc: room=Some("Living Room") supports_iot=true ble_only=false [2024-01-26T09:28:03 INFO govee::commands::serve] Quirk { sku: "H6141", icon: "mdi:led-strip-variant", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: true, ble_only: false, lan_api_capable: false, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-01-26T09:28:03 INFO govee::commands::serve] [2024-01-26T09:28:03 INFO govee::commands::serve] Sideboard Lights (09:08:A4:C1:38:D4:66:8A H6141) [2024-01-26T09:28:03 INFO govee::commands::serve] Platform API: devices.types.light. supports_rgb=true supports_brightness=true [2024-01-26T09:28:03 INFO govee::commands::serve] color_temp=Some((2000, 9000)) segment_rgb=None [2024-01-26T09:28:03 INFO govee::commands::serve] Undoc: room=Some("Living Room") supports_iot=true ble_only=false [2024-01-26T09:28:03 INFO govee::commands::serve] Quirk { sku: "H6141", icon: "mdi:led-strip-variant", supports_rgb: true, supports_brightness: true, color_temp_range: Some((2000, 9000)), avoid_platform_api: true, ble_only: false, lan_api_capable: false, device_type: Light, platform_temperature_sensor_units: None, platform_humidity_sensor_units: None, iot_api_supported: true, show_as_preset_buttons: None } [2024-01-26T09:28:03 INFO govee::commands::serve] [2024-01-26T09:28:03 INFO govee::service::http] http server addr is 0.0.0.0:8056 [2024-01-26T09:28:21 INFO govee::service::hass] Wait 2.35s for hass to settle on 47 entity configs [2024-01-26T09:28:23 INFO govee::service::state] requesting update via Platform API Office LEDS (18:2A:A4:C1:38:F1:AC:62 H6154) None [2024-01-26T09:28:24 INFO govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted. [2024-01-26T09:28:24 INFO govee::service::state] requesting update via Platform API TV Lights (71:55:D5:37:32:32:39:50 H605C) None [2024-01-26T09:28:24 INFO govee::service::state] requesting update via IoT MQTT Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) None [2024-01-26T09:28:24 INFO govee::service::state] requesting update via IoT MQTT Regans TV (48:02:A4:C1:38:13:F1:49 H6141) None [2024-01-26T09:28:24 INFO govee::service::state] requesting update via IoT MQTT Sofa Lights (59:68:A4:C1:38:C7:D3:81 H6141) None [2024-01-26T09:28:24 INFO govee::service::state] requesting update via IoT MQTT Sideboard Lights (09:08:A4:C1:38:D4:66:8A H6141) None

Additional Logs

[2024-01-26T10:06:26 INFO govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted. [2024-01-26T10:06:32 INFO govee::service::state] requesting update via IoT MQTT Sideboard Lights (09:08:A4:C1:38:D4:66:8A H6141) None [2024-01-26T10:06:32 INFO govee::service::state] requesting update via IoT MQTT Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) None [2024-01-26T10:06:32 INFO govee::service::state] requesting update via IoT MQTT Sofa Lights (59:68:A4:C1:38:C7:D3:81 H6141) None [2024-01-26T10:06:32 INFO govee::service::state] requesting update via IoT MQTT Regans TV (48:02:A4:C1:38:13:F1:49 H6141) None [2024-01-26T10:06:32 INFO govee::service::state] requesting update via Platform API Office LEDS (18:2A:A4:C1:38:F1:AC:62 H6154) None [2024-01-26T10:06:33 INFO govee::service::state] requesting update via Platform API TV Lights (71:55:D5:37:32:32:39:50 H605C) None [2024-01-26T10:20:44 INFO govee::service::hass] Command for Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141): {"state":"OFF"} [2024-01-26T10:20:44 INFO govee::service::state] Using IoT API to set Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) light power state [2024-01-26T10:20:52 INFO govee::service::hass] powerSwitch for CD13A4C138B1B83D: OFF [2024-01-26T10:20:52 INFO govee::service::state] Using IoT API to set Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) power state [2024-01-26T10:21:01 INFO govee::service::hass] Command for Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141): {"state":"ON","brightness":51} [2024-01-26T10:21:01 INFO govee::service::state] Using IoT API to set Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) brightness [2024-01-26T10:21:06 INFO govee::service::hass] Command for Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141): {"state":"ON","color":{"r":255,"g":40,"b":51}} [2024-01-26T10:21:06 INFO govee::service::state] Using IoT API to set Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) color [2024-01-26T10:21:09 INFO govee::service::hass] Command for Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141): {"state":"ON","color_temp":189} [2024-01-26T10:21:09 INFO govee::service::state] Using IoT API to set Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) color temperature [2024-01-26T10:21:11 INFO govee::service::hass] Command for Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141): {"state":"ON","color_temp":157} [2024-01-26T10:21:11 INFO govee::service::state] Using IoT API to set Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) color temperature [2024-01-26T10:21:11 INFO govee::service::hass] Command for Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141): {"state":"ON","color_temp":500} [2024-01-26T10:21:11 INFO govee::service::state] Using IoT API to set Media Wall Lights (CD:13:A4:C1:38:B1:B8:3D H6141) color temperature [2024-01-26T10:21:35 INFO govee::service::state] requesting update via IoT MQTT Sideboard Lights (09:08:A4:C1:38:D4:66:8A H6141) None [2024-01-26T10:21:35 INFO govee::service::state] requesting update via IoT MQTT Sofa Lights (59:68:A4:C1:38:C7:D3:81 H6141) None [2024-01-26T10:21:35 INFO govee::service::state] requesting update via IoT MQTT Regans TV (48:02:A4:C1:38:13:F1:49 H6141) None [2024-01-26T10:21:35 INFO govee::service::state] requesting update via Platform API Office LEDS (18:2A:A4:C1:38:F1:AC:62 H6154) Some(DeviceState { on: true, light_on: Some(true), online: Some(false), kelvin: 0, color: DeviceColor { r: 139, g: 0, b: 255 }, brightness: 254, scene: None, source: "PLATFORM API", updated: 2024-01-26T10:06:33.392368048Z }) [2024-01-26T10:21:36 INFO govee::service::state] requesting update via Platform API TV Lights (71:55:D5:37:32:32:39:50 H605C) Some(DeviceState { on: true, light_on: Some(true), online: Some(true), kelvin: 0, color: DeviceColor { r: 255, g: 162, b: 60 }, brightness: 100, scene: None, source: "PLATFORM API", updated: 2024-01-26T10:06:33.867399917Z })

Home Assistant Logs

No response

Anything else?

No response

joeblackdandt commented 7 months ago

Same here

kaxelson commented 4 months ago

same here

ninjanye commented 3 months ago

I also have this issue

ysaliens commented 3 months ago

same issue.

[2024-08-07T12:41:54 INFO  govee::service::hass] Command for TV cabinet LEDs (E1:A8:A4:C1:38:91:C8:3A H6163): {"state":"OFF"}
[2024-08-07T12:41:54 INFO  govee::service::state] Using IoT API to set TV cabinet LEDs (E1:A8:A4:C1:38:91:C8:3A H6163) light power state
[2024-08-07T12:41:55 ERROR govee::service::iot] Decoding IoT Packet: govee::service::iot::Packet op.modeValue[0]: invalid escape at line 1 column 231. Input: {"proType":2,"sku":"H6163","device":"E1:A8:A4:C1:38:91:C8:3A","softVersion":"1.08.06","cmd":"pt","transaction":"v_1722949734830828","pactType":1,"pactCode":1,"state":{"connected":"true"},"op":{"opcode":"mode","modeValue":["��Ц\u4x,"0\u4x,""]}} {"proType":2,"sku":"H6163","device":"E1:A8:A4:C1:38:91:C8:3A","softVersion":"1.08.06","cmd":"pt","transaction":"v_1722949734830828","pactType":1,"pactCode":1,"state":{"connected":"true"},"op":{"opcode":"mode","modeValue":["��Ц\u4x,"0\u4x,""]}}