wez / govee2mqtt

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

H7066 spotlights: Segment control not working #31

Closed tankdeer closed 8 months ago

tankdeer commented 9 months ago

First off, thank you for your work on this great add-on. It's already proving to be way more thorough than the alternatives.

Anyways, I configured everything earlier, and it picked up my H7066 right away. It created the main light entity with all the built in effects, and 4 segments presumably for controlling each light (There are 4 spotlights, each individually addressable via the app). The problem is that neither the effects nor the segments seem to work from HA. I can control the main light entity, which changes the power, level, and color of everything together, but changing the effect has no... effect, and changing the segments does nothing. The lights are LAN control enabled, and I see the commands in the log, and the MQTT messages in MQTT explorer, but they have no effect on the physical lights.

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_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-07T16:16:42 INFO  govee::commands::serve] Starting service. version 2024.01.07-92fb55e0
[2024-01-07T16:16:42 INFO  govee::commands::serve] Querying platform API for device list
[2024-01-07T16:16:43 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-01-07T16:16:44 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-01-07T16:16:44 INFO  govee::commands::serve] Starting LAN discovery
[2024-01-07T16:16:44 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-01-07T16:16:48 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-01-07T16:16:48 INFO  govee::commands::serve] Backyard Spotlights (A4:2A:CC:38:32:30:55:39) sku=H7066
[2024-01-07T16:16:48 INFO  govee::commands::serve]   LAN API: ip=192.168.30.199
[2024-01-07T16:16:48 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-07T16:16:48 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..4)
[2024-01-07T16:16:48 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-07T16:16:48 INFO  govee::commands::serve] 
[2024-01-07T16:16:48 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-01-07T16:16:54 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-01-07T16:21:21 INFO  govee::service::hass] Home Assistant status changed: offline
[2024-01-07T16:22:18 INFO  govee::service::hass] Home Assistant status changed: online
[2024-01-07T16:22:49 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON"}
[2024-01-07T16:22:56 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"ON","color":{"r":5,"g":255,"b":88}}
[2024-01-07T16:22:59 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"ON","brightness":100}
[2024-01-07T16:23:23 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"OFF"}
[2024-01-07T16:23:25 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"OFF"}
[2024-01-07T16:25:30 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON"}
[2024-01-07T16:25:35 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON","effect":"Winter"}
[2024-01-07T16:25:41 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON","effect":"Rainbow"}
[2024-01-07T16:25:48 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"OFF"}
[2024-01-07T16:38:29 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON"}
[2024-01-07T16:38:49 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON","effect":"Aurora"}
[2024-01-07T16:38:54 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"ON"}
[2024-01-07T16:39:00 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 1: {"state":"ON"}
[2024-01-07T16:39:05 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 2: {"state":"ON"}
[2024-01-07T16:39:05 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"ON"}
[2024-01-07T16:39:09 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 1: {"state":"ON","brightness":100}
[2024-01-07T16:39:12 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 1: {"state":"ON","color":{"r":7,"g":255,"b":61}}
[2024-01-07T16:39:18 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"ON"}
[2024-01-07T16:39:22 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"ON","brightness":98}
[2024-01-07T16:39:23 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"ON","color":{"r":94,"g":255,"b":40}}
[2024-01-07T16:39:24 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"ON","color":{"r":15,"g":79,"b":255}}
[2024-01-07T16:39:27 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"ON"}
[2024-01-07T16:39:31 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"ON","color":{"r":167,"g":5,"b":255}}
[2024-01-07T16:39:36 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 2: {"state":"ON","brightness":100}
[2024-01-07T16:39:39 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 2: {"state":"ON","color":{"r":255,"g":136,"b":10}}

image

Thanks!

wez commented 9 months ago

The new govee platform API is unfortunately pretty buggy and inconsistent, and returns wrong information about a number of devices, so there is a good chance that yours might also be one of the affected devices. Your device isn't listed on https://developer.govee.com/docs/support-product-model but I don't know if that list is especially meaningful.

Both segment and scene control will prefer to use the platform API because that is the only documented way to set those.

You may want to try setting the debug level to govee=trace to see if there is additional information revealed, but what I suspect we'll see is that the platform API is being called and that is indicating success.

Sometimes the devices themselves get in a bad state and need to be power cycled; it might be worth a try if that is easy to do.

tankdeer commented 8 months ago

Ok, sorry for the delay. Here are the the trace logs. I had difficulty trying to capture everything on startup, as even the download full log link in supervisor was truncating. Had to grab them from docker. Anyways, here we go.

Addon startup:

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_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-08T08:47:38 INFO  govee::commands::serve] Starting service. version 2024.01.07-92fb55e0
[2024-01-08T08:47:38 INFO  govee::commands::serve] Querying platform API for device list
[2024-01-08T08:47:38 TRACE govee::cache] cache miss for device-list
[2024-01-08T08:47:39 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-01-08T08:47:39 TRACE govee::cache] cache hit for account-info
[2024-01-08T08:47:39 TRACE govee::service::iot] LoginAccountResponse {
    a: "testiot.cert",
    b: "testIot",
    account_id: REDACTED,
    client: "REDACTED",
    is_savvy_user: true,
    refresh_token: Some(
        "",
    ),
    client_name: Some(
        "",
    ),
    push_token: Some(
        "",
    ),
    version_code: Some(
        "",
    ),
    version_name: Some(
        "",
    ),
    sys_version: Some(
        "",
    ),
    token: "REDACTED",
    token_expire_cycle: 57600,
    topic: "GA/a5679b40d6de92eda84288ea0ba5b530",
}
[2024-01-08T08:47:39 TRACE govee::cache] cache hit for iot-key
[2024-01-08T08:47:39 TRACE govee::service::iot] IotKey {
    endpoint: "aqm3wd1qlc3dy-ats.iot.us-east-1.amazonaws.com",
    log: "pro0",
    p12: "REDACTED",
    p12_pass: "REDACTED",
}
[2024-01-08T08:47:40 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-01-08T08:47:40 INFO  govee::commands::serve] Starting LAN discovery
[2024-01-08T08:47:40 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-01-08T08:47:40 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-08T08:47:40 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54232 data={"msg":{"cmd":"scan","data":{"ip":"192.168.30.199","device":"A4:2A:CC:38:32:30:55:39","sku":"H7066","bleVersionHard":"3.01.01","bleVersionSoft":"1.00.08","wifiVersionHard":"1.02.00","wifiVersionSoft":"2.05.08"}}}
[2024-01-08T08:47:40 TRACE govee::commands::serve] LAN disco: LanDevice { ip: 192.168.30.199, device: "A4:2A:CC:38:32:30:55:39", sku: "H7066", ble_version_hard: "3.01.01", ble_version_soft: "1.00.08", wifi_version_hard: "1.02.00", wifi_version_soft: "2.05.08" }
[2024-01-08T08:47:40 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:47:40 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:47:40 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54233 data={"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:47:40 TRACE govee::commands::serve] LAN disco: update and notify A4:2A:CC:38:32:30:55:39
[2024-01-08T08:47:42 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-08T08:47:44 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-01-08T08:47:44 INFO  govee::commands::serve] Backyard Spotlights (A4:2A:CC:38:32:30:55:39) sku=H7066
[2024-01-08T08:47:44 INFO  govee::commands::serve]   LAN API: ip=192.168.30.199
[2024-01-08T08:47:44 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-01-08T08:47:44 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..4)
[2024-01-08T08:47:44 TRACE govee::commands::serve] HttpDeviceInfo {
    sku: "H7066",
    device: "A4:2A:CC:38:32:30:55:39",
    device_name: "Backyard Spotlights",
    device_type: Light,
    capabilities: [
        DeviceCapability {
            kind: OnOff,
            instance: "powerSwitch",
            parameters: Some(
                Enum {
                    options: [
                        EnumOption {
                            name: "on",
                            value: Number(1),
                            extras: {},
                        },
                        EnumOption {
                            name: "off",
                            value: Number(0),
                            extras: {},
                        },
                    ],
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: Toggle,
            instance: "gradientToggle",
            parameters: Some(
                Enum {
                    options: [
                        EnumOption {
                            name: "on",
                            value: Number(1),
                            extras: {},
                        },
                        EnumOption {
                            name: "off",
                            value: Number(0),
                            extras: {},
                        },
                    ],
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: Range,
            instance: "brightness",
            parameters: Some(
                Integer {
                    unit: Some(
                        "unit.percent",
                    ),
                    range: IntegerRange {
                        min: 1,
                        max: 100,
                        precision: 1,
                    },
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: SegmentColorSetting,
            instance: "segmentedBrightness",
            parameters: Some(
                Struct {
                    fields: [
                        StructField {
                            field_name: "segment",
                            field_type: Array {
                                size: Some(
                                    ArraySize {
                                        min: 1,
                                        max: 4,
                                    },
                                ),
                                element_range: Some(
                                    ElementRange {
                                        min: 0,
                                        max: 14,
                                    },
                                ),
                                element_type: Some(
                                    "INTEGER",
                                ),
                                options: [],
                            },
                            default_value: None,
                            required: true,
                        },
                        StructField {
                            field_name: "brightness",
                            field_type: Integer {
                                unit: None,
                                range: IntegerRange {
                                    min: 0,
                                    max: 100,
                                    precision: 1,
                                },
                            },
                            default_value: None,
                            required: true,
                        },
                    ],
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: SegmentColorSetting,
            instance: "segmentedColorRgb",
            parameters: Some(
                Struct {
                    fields: [
                        StructField {
                            field_name: "segment",
                            field_type: Array {
                                size: Some(
                                    ArraySize {
                                        min: 1,
                                        max: 4,
                                    },
                                ),
                                element_range: Some(
                                    ElementRange {
                                        min: 0,
                                        max: 14,
                                    },
                                ),
                                element_type: Some(
                                    "INTEGER",
                                ),
                                options: [],
                            },
                            default_value: None,
                            required: true,
                        },
                        StructField {
                            field_name: "rgb",
                            field_type: Integer {
                                unit: None,
                                range: IntegerRange {
                                    min: 0,
                                    max: 16777215,
                                    precision: 1,
                                },
                            },
                            default_value: None,
                            required: true,
                        },
                    ],
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: ColorSetting,
            instance: "colorRgb",
            parameters: Some(
                Integer {
                    unit: None,
                    range: IntegerRange {
                        min: 0,
                        max: 16777215,
                        precision: 1,
                    },
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: ColorSetting,
            instance: "colorTemperatureK",
            parameters: Some(
                Integer {
                    unit: None,
                    range: IntegerRange {
                        min: 2000,
                        max: 9000,
                        precision: 1,
                    },
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: DynamicScene,
            instance: "lightScene",
            parameters: Some(
                Enum {
                    options: [],
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: MusicSetting,
            instance: "musicMode",
            parameters: Some(
                Struct {
                    fields: [
                        StructField {
                            field_name: "musicMode",
                            field_type: Enum {
                                options: [
                                    EnumOption {
                                        name: "Rhythm",
                                        value: Number(1),
                                        extras: {},
                                    },
                                    EnumOption {
                                        name: "Shiny",
                                        value: Number(2),
                                        extras: {},
                                    },
                                    EnumOption {
                                        name: "Luminous",
                                        value: Number(3),
                                        extras: {},
                                    },
                                    EnumOption {
                                        name: "Hopping",
                                        value: Number(4),
                                        extras: {},
                                    },
                                    EnumOption {
                                        name: "Sprouting",
                                        value: Number(5),
                                        extras: {},
                                    },
                                ],
                            },
                            default_value: None,
                            required: true,
                        },
                        StructField {
                            field_name: "sensitivity",
                            field_type: Integer {
                                unit: Some(
                                    "unit.percent",
                                ),
                                range: IntegerRange {
                                    min: 0,
                                    max: 100,
                                    precision: 1,
                                },
                            },
                            default_value: None,
                            required: true,
                        },
                        StructField {
                            field_name: "autoColor",
                            field_type: Enum {
                                options: [
                                    EnumOption {
                                        name: "on",
                                        value: Number(1),
                                        extras: {},
                                    },
                                    EnumOption {
                                        name: "off",
                                        value: Number(0),
                                        extras: {},
                                    },
                                ],
                            },
                            default_value: None,
                            required: false,
                        },
                        StructField {
                            field_name: "rgb",
                            field_type: Integer {
                                unit: None,
                                range: IntegerRange {
                                    min: 0,
                                    max: 16777215,
                                    precision: 1,
                                },
                            },
                            default_value: None,
                            required: false,
                        },
                    ],
                },
            ),
            alarm_type: None,
            event_state: None,
        },
        DeviceCapability {
            kind: DynamicScene,
            instance: "diyScene",
            parameters: Some(
                Enum {
                    options: [],
                },
            ),
            alarm_type: None,
            event_state: None,
        },
    ],
}
[2024-01-08T08:47:44 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-01-08T08:47:44 TRACE govee::commands::serve] UndocDeviceInfo {
    room_name: None,
    entry: DeviceEntry {
        attributes_id: 20,
        device_id: Some(
            17882028,
        ),
        device: "A4:2A:CC:38:32:30:55:39",
        device_ext: DeviceEntryExt {
            device_settings: DeviceSettings {
                wifi_name: Some(
                    "Moms Friendly Robot Company",
                ),
                address: Some(
                    "CC:38:32:30:55:39",
                ),
                ble_name: Some(
                    "Govee_H7066_5539",
                ),
                topic: Some(
                    "GD/398495567dd0c20ebb40c9d3846fbad6",
                ),
                wifi_mac: Some(
                    "60:74:F4:1F:E8:F8",
                ),
                pact_type: Some(
                    1,
                ),
                pact_code: Some(
                    1,
                ),
                dsp_version_soft: None,
                wifi_soft_version: Some(
                    "2.05.08",
                ),
                wifi_hard_version: Some(
                    "1.02.00",
                ),
                ic: Some(
                    4,
                ),
                ic_sub_1: None,
                ic_sub_2: None,
                secret_code: Some(
                    "RwXMODIwVTk=",
                ),
                boil_water_completed_noti_on_off: true,
                completion_noti_on_off: true,
                auto_shut_down_on_off: true,
                water_shortage_on_off: false,
                mcu_soft_version: None,
                mcu_hard_version: None,
                sku: Some(
                    "H7066",
                ),
                device: Some(
                    "A4:2A:CC:38:32:30:55:39",
                ),
                device_name: Some(
                    "Backyard Spotlights",
                ),
                version_hard: Some(
                    "3.01.01",
                ),
                version_soft: Some(
                    "1.00.08",
                ),
                play_state: Some(
                    false,
                ),
                tem_min: None,
                tem_max: None,
                tem_warning: None,
                fah_open: None,
                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/4a75d2fb962a6c9ed169313745c1a010-add_list_type_device_7066.png",
                ),
                head_on_img_new: Some(
                    "",
                ),
                head_on_img: Some(
                    "https://d1f2504ijhdyjw.cloudfront.net/sku-img/b5d43d73ded3072c534e98ddbe5e7ff6-new_light_title_7066_on.png",
                ),
                head_off_img: Some(
                    "https://d1f2504ijhdyjw.cloudfront.net/sku-img/927ca77f6a8762f0e147bdb901079bf2-new_light_title_7066_off.png",
                ),
                head_off_img_new: Some(
                    "",
                ),
                ext: Some(
                    "",
                ),
                ic: Some(
                    4,
                ),
            },
            last_device_data: LastDeviceData {
                online: false,
                tem: None,
                hum: None,
                last_time: None,
                avg_day_tem: None,
                avg_day_hum: None,
            },
        },
        device_name: "Backyard Spotlights",
        goods_type: 171,
        group_id: 0,
        pact_code: Some(
            1,
        ),
        pact_type: Some(
            1,
        ),
        share: Some(
            0,
        ),
        sku: "H7066",
        spec: "",
        support_scene: false,
        version_hard: "3.01.01",
        version_soft: "1.00.08",
    },
}
[2024-01-08T08:47:44 INFO  govee::commands::serve]
[2024-01-08T08:47:44 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-01-08T08:47:46 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-08T08:47:49 TRACE govee::cache] cache hit for community-login
[2024-01-08T08:47:49 TRACE govee::cache] cache hit for one-click-shortcuts
[2024-01-08T08:47:49 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:47:49 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:47:49 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:47:49 TRACE govee::service::hass] register_with_hass: register entities
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/sensor/global-version/config -> {"availability_topic":"gv2mqtt/availability","name":"Version","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee to MQTT","manufacturer":"Wez Furlong","model":"govee2mqtt","sw_version":"2024.01.07-92fb55e0","identifiers":["gv2mqtt"]},"unique_id":"global-version","entity_category":"diagnostic","state_topic":"gv2mqtt/sensor/global-version/state","unit_of_measurement":null}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/button/global-purge_caches/config -> {"availability_topic":"gv2mqtt/availability","name":"Purge Caches","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee to MQTT","manufacturer":"Wez Furlong","model":"govee2mqtt","sw_version":"2024.01.07-92fb55e0","identifiers":["gv2mqtt"]},"unique_id":"global-purge_caches","command_topic":"gv2mqtt/purge-caches"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/scene/gv2mqtt-one-click-e987fdadc20f5ca8ac824581a226fc63/config -> {"availability_topic":"gv2mqtt/availability","name":"One-Click: Default: Xmas","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Govee to MQTT","manufacturer":"Wez Furlong","model":"govee2mqtt","sw_version":"2024.01.07-92fb55e0","identifiers":["gv2mqtt"]},"unique_id":"gv2mqtt-one-click-e987fdadc20f5ca8ac824581a226fc63","command_topic":"gv2mqtt/oneclick","payload_on":"One-Click: Default: Xmas"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/light/gv2mqtt-A42ACC3832305539/config -> {"availability_topic":"gv2mqtt/availability","name":null,"origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Backyard Spotlights","manufacturer":"Govee","model":"H7066","via_device":"gv2mqtt","identifiers":["gv2mqtt-A42ACC3832305539"]},"unique_id":"gv2mqtt-A42ACC3832305539","schema":"json","command_topic":"gv2mqtt/light/A42ACC3832305539/command","state_topic":"gv2mqtt/light/A42ACC3832305539/state","optimistic":false,"supported_color_modes":["rgb","color_temp"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"effect_list":["Aurora","Blossom","Cherry blossoms","Christmas","Christmas Gift","Christmas Tree","Crossing","Desert","Dreamlike","Dynamic","Fall","Father's Day","Fire","Firefly","Flower Field","Forest","Glacier","Halloween","Halloween B","Halloween C","Happy","Moonlight","Mother's Day","Music: Hopping","Music: Luminous","Music: Rhythm","Music: Shiny","Music: Sprouting","Party","Rainbow","Seasonal","Sled","Spring","Star","Summer","Sunrise","Sunset","Thunderstorm","Valentine's Day","Winter"],"min_mireds":111,"max_mireds":500,"payload_available":"online"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/switch/gv2mqtt-A42ACC3832305539-powerSwitch/config -> {"availability_topic":"gv2mqtt/availability","name":"Power Switch","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Backyard Spotlights","manufacturer":"Govee","model":"H7066","via_device":"gv2mqtt","identifiers":["gv2mqtt-A42ACC3832305539"]},"unique_id":"gv2mqtt-A42ACC3832305539-powerSwitch","command_topic":"gv2mqtt/switch/A42ACC3832305539/command/powerSwitch","state_topic":"gv2mqtt/switch/A42ACC3832305539/powerSwitch/state"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/switch/gv2mqtt-A42ACC3832305539-gradientToggle/config -> {"availability_topic":"gv2mqtt/availability","name":"Gradient Toggle","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Backyard Spotlights","manufacturer":"Govee","model":"H7066","via_device":"gv2mqtt","identifiers":["gv2mqtt-A42ACC3832305539"]},"unique_id":"gv2mqtt-A42ACC3832305539-gradientToggle","command_topic":"gv2mqtt/switch/A42ACC3832305539/command/gradientToggle","state_topic":"gv2mqtt/switch/A42ACC3832305539/gradientToggle/state"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/light/gv2mqtt-A42ACC3832305539-0/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 001","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Backyard Spotlights","manufacturer":"Govee","model":"H7066","via_device":"gv2mqtt","identifiers":["gv2mqtt-A42ACC3832305539"]},"unique_id":"gv2mqtt-A42ACC3832305539-0","schema":"json","command_topic":"gv2mqtt/light/A42ACC3832305539/command/0","state_topic":"gv2mqtt/light/A42ACC3832305539/state/0","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/light/gv2mqtt-A42ACC3832305539-1/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 002","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Backyard Spotlights","manufacturer":"Govee","model":"H7066","via_device":"gv2mqtt","identifiers":["gv2mqtt-A42ACC3832305539"]},"unique_id":"gv2mqtt-A42ACC3832305539-1","schema":"json","command_topic":"gv2mqtt/light/A42ACC3832305539/command/1","state_topic":"gv2mqtt/light/A42ACC3832305539/state/1","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/light/gv2mqtt-A42ACC3832305539-2/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 003","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Backyard Spotlights","manufacturer":"Govee","model":"H7066","via_device":"gv2mqtt","identifiers":["gv2mqtt-A42ACC3832305539"]},"unique_id":"gv2mqtt-A42ACC3832305539-2","schema":"json","command_topic":"gv2mqtt/light/A42ACC3832305539/command/2","state_topic":"gv2mqtt/light/A42ACC3832305539/state/2","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-08T08:47:49 TRACE govee::service::hass] homeassistant/light/gv2mqtt-A42ACC3832305539-3/config -> {"availability_topic":"gv2mqtt/availability","name":"Segment 004","origin":{"name":"gv2mqtt","sw_version":"2024.01.07-92fb55e0","url":"https://github.com/wez/govee2mqtt"},"device":{"name":"Backyard Spotlights","manufacturer":"Govee","model":"H7066","via_device":"gv2mqtt","identifiers":["gv2mqtt-A42ACC3832305539"]},"unique_id":"gv2mqtt-A42ACC3832305539-3","schema":"json","command_topic":"gv2mqtt/light/A42ACC3832305539/command/3","state_topic":"gv2mqtt/light/A42ACC3832305539/state/3","optimistic":true,"supported_color_modes":["rgb"],"color_mode":true,"brightness":true,"brightness_scale":100,"effect":true,"payload_available":"online"}
[2024-01-08T08:47:49 TRACE govee::service::hass] register_with_hass: mark as online
[2024-01-08T08:47:49 TRACE govee::service::hass] gv2mqtt/availability -> online
[2024-01-08T08:47:49 TRACE govee::service::hass] register_with_hass: reporting state
[2024-01-08T08:47:49 TRACE govee::service::hass] gv2mqtt/sensor/global-version/state -> 2024.01.07-92fb55e0
[2024-01-08T08:47:49 TRACE govee::service::hass] LightConfig::notify_state: state is DeviceState { on: false, online: None, kelvin: 0, color: DeviceColor { r: 255, g: 5, b: 134 }, brightness: 100, scene: None, source: "LAN API", updated: 2024-01-08T16:47:40.060095363Z }
[2024-01-08T08:47:49 TRACE govee::service::hass] gv2mqtt/light/A42ACC3832305539/state -> {"state":"OFF"}
[2024-01-08T08:47:49 TRACE govee::service::hass] gv2mqtt/switch/A42ACC3832305539/powerSwitch/state -> OFF
[2024-01-08T08:47:49 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) gradientToggle
[2024-01-08T08:47:49 TRACE govee::service::hass] register_with_hass: done
[2024-01-08T08:47:49 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-01-08T08:47:54 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-08T08:47:54 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54234 data={"msg":{"cmd":"scan","data":{"ip":"192.168.30.199","device":"A4:2A:CC:38:32:30:55:39","sku":"H7066","bleVersionHard":"3.01.01","bleVersionSoft":"1.00.08","wifiVersionHard":"1.02.00","wifiVersionSoft":"2.05.08"}}}
[2024-01-08T08:47:54 TRACE govee::commands::serve] LAN disco: LanDevice { ip: 192.168.30.199, device: "A4:2A:CC:38:32:30:55:39", sku: "H7066", ble_version_hard: "3.01.01", ble_version_soft: "1.00.08", wifi_version_hard: "1.02.00", wifi_version_soft: "2.05.08" }
[2024-01-08T08:47:54 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:47:54 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:47:54 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54235 data={"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:47:54 TRACE govee::commands::serve] LAN disco: update and notify A4:2A:CC:38:32:30:55:39
[2024-01-08T08:47:54 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:47:54 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:47:54 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:47:54 TRACE govee::service::hass] LightConfig::notify_state: state is DeviceState { on: false, online: None, kelvin: 0, color: DeviceColor { r: 255, g: 5, b: 134 }, brightness: 100, scene: None, source: "LAN API", updated: 2024-01-08T16:47:54.060826803Z }
[2024-01-08T08:47:54 TRACE govee::service::hass] gv2mqtt/light/A42ACC3832305539/state -> {"state":"OFF"}
[2024-01-08T08:47:54 TRACE govee::service::hass] gv2mqtt/switch/A42ACC3832305539/powerSwitch/state -> OFF
[2024-01-08T08:47:54 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) gradientToggle
[2024-01-08T08:48:10 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-08T08:48:10 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54236 data={"msg":{"cmd":"scan","data":{"ip":"192.168.30.199","device":"A4:2A:CC:38:32:30:55:39","sku":"H7066","bleVersionHard":"3.01.01","bleVersionSoft":"1.00.08","wifiVersionHard":"1.02.00","wifiVersionSoft":"2.05.08"}}}
[2024-01-08T08:48:10 TRACE govee::commands::serve] LAN disco: LanDevice { ip: 192.168.30.199, device: "A4:2A:CC:38:32:30:55:39", sku: "H7066", ble_version_hard: "3.01.01", ble_version_soft: "1.00.08", wifi_version_hard: "1.02.00", wifi_version_soft: "2.05.08" }
[2024-01-08T08:48:10 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:48:10 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:48:10 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54237 data={"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:48:10 TRACE govee::commands::serve] LAN disco: update and notify A4:2A:CC:38:32:30:55:39
[2024-01-08T08:48:10 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:48:10 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:48:10 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:48:10 TRACE govee::service::hass] LightConfig::notify_state: state is DeviceState { on: false, online: None, kelvin: 0, color: DeviceColor { r: 255, g: 5, b: 134 }, brightness: 100, scene: None, source: "LAN API", updated: 2024-01-08T16:48:10.073041622Z }
[2024-01-08T08:48:10 TRACE govee::service::hass] gv2mqtt/light/A42ACC3832305539/state -> {"state":"OFF"}
[2024-01-08T08:48:10 TRACE govee::service::hass] gv2mqtt/switch/A42ACC3832305539/powerSwitch/state -> OFF
[2024-01-08T08:48:10 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) gradientToggle

Turn on lights (Works as expected):

[2024-01-08T08:27:40 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON"}
[2024-01-08T08:27:40 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 Turn { value: 1 }
[2024-01-08T08:27:40 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:27:40 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:27:40 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54196 data={"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:27:40 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:27:40 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:27:40 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54197 data={"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:27:40 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:27:40 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:27:40 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:27:40 TRACE govee::service::hass] LightConfig::notify_state: state is DeviceState { on: true, online: None, kelvin: 0, color: DeviceColor { r: 255, g: 5, b: 134 }, brightness: 100, scene: None, source: "LAN API", updated: 2024-01-08T16:27:40.942492053Z }
[2024-01-08T08:27:40 TRACE govee::service::hass] gv2mqtt/light/A42ACC3832305539/state -> {"brightness":100,"color":{"b":134,"g":5,"r":255},"color_mode":"rgb","effect":null,"state":"ON"}
[2024-01-08T08:27:40 TRACE govee::service::hass] gv2mqtt/switch/A42ACC3832305539/powerSwitch/state -> ON
[2024-01-08T08:27:40 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) gradientToggle
[2024-01-08T08:27:45 TRACE govee::lan_api] Send disco packet to 239.255.255.250

Change effects on light (No changes on physical device)

[2024-01-08T08:28:18 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON","effect":"Happy"}
[2024-01-08T08:28:18 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:28:18 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:28:18 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:28:45 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-08T08:28:56 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"ON","effect":"Christmas"}
[2024-01-08T08:28:56 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:28:56 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:28:56 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:29:45 TRACE govee::lan_api] Send disco packet to 239.255.255.250

Turn on and change colors for individual segments (No changes on physical device)

[2024-01-08T08:29:53 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"ON"}
[2024-01-08T08:29:53 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 1: {"state":"ON"}
[2024-01-08T08:29:54 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 2: {"state":"ON"}
[2024-01-08T08:29:54 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"ON"}
[2024-01-08T08:30:10 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"ON","color":{"r":127,"g":172,"b":255}}
[2024-01-08T08:30:13 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 1: {"state":"ON","color":{"r":215,"g":150,"b":255}}
[2024-01-08T08:30:16 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 2: {"state":"ON","color":{"r":255,"g":158,"b":243}}
[2024-01-08T08:30:18 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"ON","color":{"r":255,"g":110,"b":84}}

[2024-01-08T08:32:30 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 0: {"state":"OFF"}
[2024-01-08T08:32:30 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 1: {"state":"OFF"}
[2024-01-08T08:32:30 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 2: {"state":"OFF"}
[2024-01-08T08:32:31 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) segment 3: {"state":"OFF"}

Turn off main entity (works as expected)

[2024-01-08T08:32:59 INFO  govee::service::hass] Command for Backyard Spotlights (A4:2A:CC:38:32:30:55:39): {"state":"OFF"}
[2024-01-08T08:32:59 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 Turn { value: 0 }
[2024-01-08T08:32:59 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:32:59 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:32:59 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54204 data={"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:32:59 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:32:59 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:32:59 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54205 data={"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:32:59 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:32:59 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:32:59 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:32:59 TRACE govee::service::hass] LightConfig::notify_state: state is DeviceState { on: false, online: None, kelvin: 0, color: DeviceColor { r: 255, g: 5, b: 134 }, brightness: 100, scene: Some("Christmas"), source: "LAN API", updated: 2024-01-08T16:32:59.988220625Z }
[2024-01-08T08:32:59 TRACE govee::service::hass] gv2mqtt/light/A42ACC3832305539/state -> {"state":"OFF"}
[2024-01-08T08:32:59 TRACE govee::service::hass] gv2mqtt/switch/A42ACC3832305539/powerSwitch/state -> OFF
[2024-01-08T08:32:59 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) gradientToggle

And here's the periodic (once a minute?) device scans I was seeing:

2024-01-08T08:30:45 TRACE govee::lan_api] Send disco packet to 239.255.255.250
[2024-01-08T08:30:45 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54198 data={"msg":{"cmd":"scan","data":{"ip":"192.168.30.199","device":"A4:2A:CC:38:32:30:55:39","sku":"H7066","bleVersionHard":"3.01.01","bleVersionSoft":"1.00.08","wifiVersionHard":"1.02.00","wifiVersionSoft":"2.05.08"}}}
[2024-01-08T08:30:45 TRACE govee::commands::serve] LAN disco: LanDevice { ip: 192.168.30.199, device: "A4:2A:CC:38:32:30:55:39", sku: "H7066", ble_version_hard: "3.01.01", ble_version_soft: "1.00.08", wifi_version_hard: "1.02.00", wifi_version_soft: "2.05.08" }
[2024-01-08T08:30:45 TRACE govee::lan_api] query status of 192.168.30.199
[2024-01-08T08:30:45 TRACE govee::lan_api] LanDevice::send_request to 192.168.30.199 DevStatus
[2024-01-08T08:30:45 TRACE govee::lan_api] process_packet: addr=192.168.30.199:54199 data={"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":255,"g":5,"b":134},"colorTemInKelvin":0}}}
[2024-01-08T08:30:45 TRACE govee::commands::serve] LAN disco: update and notify A4:2A:CC:38:32:30:55:39
[2024-01-08T08:30:45 TRACE govee::cache] cache hit for scene-list-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:30:45 TRACE govee::cache] cache hit for scene-list-diy-H7066-A4:2A:CC:38:32:30:55:39
[2024-01-08T08:30:45 TRACE govee::cache] cache hit for scenes-H7066
[2024-01-08T08:30:45 TRACE govee::service::hass] LightConfig::notify_state: state is DeviceState { on: true, online: None, kelvin: 0, color: DeviceColor { r: 255, g: 5, b: 134 }, brightness: 100, scene: Some("Christmas"), source: "LAN API", updated: 2024-01-08T16:30:45.922508414Z }
[2024-01-08T08:30:45 TRACE govee::service::hass] gv2mqtt/light/A42ACC3832305539/state -> {"brightness":100,"color":{"b":134,"g":5,"r":255},"color_mode":"rgb","effect":"Christmas","state":"ON"}
[2024-01-08T08:30:45 TRACE govee::service::hass] gv2mqtt/switch/A42ACC3832305539/powerSwitch/state -> ON
[2024-01-08T08:30:45 TRACE govee::service::hass] SelectConfig::notify_state: didn't find state for Backyard Spotlights (A4:2A:CC:38:32:30:55:39) gradientToggle

Hope there's something useful in there. I did notice there is a lot less chatter on the functionality that don't work. Not sure if that's just because the lan api seems to log more than the others, or if it's indicative of a problem. Let me know if there's anything else you'd like me to test.

wez commented 8 months ago

Thanks for sharing that info.

What I suspect is happening is that the Platform API on Govee's side just isn't doing anything with the device. Since we don't see any errors from the call to the platform API, govee2mqtt believes that the platform API indicated success, so at that point we think we're done.

tankdeer commented 8 months ago

Ok, thank you. Hopefully they continue to expand this new API and this will start working in the near future

tankdeer commented 8 months ago

Wanted to follow up and say that this is now working as expected. Both segment control and the effects. Not sure if it's something in the recent changes you've made, or more likely my relaxing the firewall on my end while testing the kettle. I suspect the latter. If you're aware of any specific ports that need to be open, I would love to hear it. Otherwise I'll just play with it on my end.

In any case, I'm going to close this as working. Thanks again for all your help

wez commented 8 months ago

For the LAN APi: see https://github.com/wez/govee2mqtt/blob/main/docs/LAN.md, if you want to use the Platform API you will need to allow port 443 to Govee's servers. If you want to use the undocumented API (includes much better scene data and IoT notifications), in addition to port 443 you will need to allow port 8883 for the secure MQTT connection to Govee's servers (hosted in AWS), both for your home assistant instance, and for each of the individual Govee devices, as they communicate with each other over MQTT.

tankdeer commented 8 months ago

Great info, thanks again