wez/govee2mqtt

LAN API control not available on IoT VLAN

Opened this issue · 1 comments

Govee Device SKU

H6168

Govee2MQTT Version

2024.01.24-ea3cd430

Describe the issue

LAN API control is not being established with the LED strip on a different subnet from the MQTT add-on.

But it works fine if I have the light on the same subnet as the add-on.

I've given the light a static IP and listed it in the configuration.

I've enabled LAN control in the Govee app.

I've allowed ALL traffic from HASS/MQTT Add-on to the IoT vlan. Confirmed that traffic is being passed in the firewall logs.

I've allowed ALL traffic from the LED strip to the HASS/MQTT add-on for the UDP reply on port 4002. However firewall logs show no matching traffic. So pretty sure the issue here is that the device isn't replying back on 4002 at all.

Not sure if there is much to do here from an add-on perspective but just seeing if anyone has any other ideas about what's failing.

Startup Diagnostics

[2024-04-20T14:28:07 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-04-20T14:28:07 INFO  govee::commands::serve] RGBIC TV Backlight (xx:xx:xx:xx:xx:xx:xx:xx H6168)
[2024-04-20T14:28:07 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-04-20T14:28:07 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-04-20T14:28:07 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-04-20T14:28:07 INFO  govee::commands::serve]   Quirk { sku: "H6168", icon: "mdi:television-ambient-light", 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-04-20T14:28:07 WARN  govee::commands::serve]   This device should be available via the LAN API, but didn't respond to probing yet. Possible causes:
[2024-04-20T14:28:07 WARN  govee::commands::serve]   1) LAN API needs to be enabled in the Govee Home App.
[2024-04-20T14:28:07 WARN  govee::commands::serve]   2) The device is offline.
[2024-04-20T14:28:07 WARN  govee::commands::serve]   3) A network configuration issue is preventing communication.
[

Additional Logs

No response

Home Assistant Logs

No response

Anything else?

No response

Ive just moved over from the original Govee LAN control integration as advised on the Git repo and I have the same issue. I set the static IPs of my lights in the config and they appear in the MQTT integration but are all 'unavailable' (on a different subnet from HA, worked fine with the previous integration)

Startup log

Stack backtrace:
   0: std::backtrace_rs::backtrace::libunwind::trace
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2: std::backtrace::Backtrace::create
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/backtrace.rs:331:13
   3: anyhow::error::<impl anyhow::Error>::msg
   4: anyhow::__private::format_err
   5: govee::cache::CacheResult<T>::into_result
   6: govee::cache::cache_get::{{closure}}
   7: govee::undoc_api::GoveeUndocumentedApi::login_account_cached::{{closure}}
   8: govee::commands::serve::ServeCommand::run::{{closure}}
   9: govee::Args::run::{{closure}}
  10: tokio::runtime::park::CachedParkThread::block_on
  11: tokio::runtime::context::runtime::enter_runtime
  12: tokio::runtime::runtime::Runtime::block_on
  13: govee::main
  14: std::sys_common::backtrace::__rust_begin_short_backtrace
  15: std::rt::lang_start::{{closure}}
  16: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/core/src/ops/function.rs:284:13
  17: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  18: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  19: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  20: std::rt::lang_start_internal::{{closure}}
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:148:48
  21: std::panicking::try::do_call
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:554:40
  22: std::panicking::try
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panicking.rs:518:19
  23: std::panic::catch_unwind
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/panic.rs:142:14
  24: std::rt::lang_start_internal
             at /rustc/25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04/library/std/src/rt.rs:148:20
  25: main
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
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_LAN_SCAN=192.168.20.90,192.168.20.135
GOVEE_EMAIL=REDACTED
GOVEE_PASSWORD=REDACTED
GOVEE_MQTT_PASSWORD=REDACTED
GOVEE_MQTT_USER=addons
GOVEE_LAN_NO_MULTICAST=true
GOVEE_MQTT_PORT=1883
++ cd /app
++ exec /app/govee serve
[2024-05-01T21:50:13 INFO  govee::commands::serve] Starting service. version 2024.04.29-30cf7732
[2024-05-01T21:50:13 INFO  govee::commands::serve] Querying platform API for device list
[2024-05-01T21:50:14 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-05-01T21:50:16 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-05-01T21:50:16 INFO  govee::commands::serve] Starting LAN discovery
[2024-05-01T21:50:16 INFO  govee::commands::serve] Waiting 10 seconds for LAN API discovery
[2024-05-01T21:50:16 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-05-01T21:50:26 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-05-01T21:50:26 INFO  govee::commands::serve] Summer House Fairy 2 (AD:0F:A4:C1:38:00:9B:85 H6159)
[2024-05-01T21:50:26 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-05-01T21:50:26 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=None
[2024-05-01T21:50:26 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-05-01T21:50:26 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-05-01T21:50:26 WARN  govee::commands::serve]   This device should be available via the LAN API, but didn't respond to probing yet. Possible causes:
[2024-05-01T21:50:26 WARN  govee::commands::serve]   1) LAN API needs to be enabled in the Govee Home App.
[2024-05-01T21:50:26 WARN  govee::commands::serve]   2) The device is offline.
[2024-05-01T21:50:26 WARN  govee::commands::serve]   3) A network configuration issue is preventing communication.
[2024-05-01T21:50:26 INFO  govee::commands::serve] 
[2024-05-01T21:50:26 INFO  govee::commands::serve] Summer House Fairy 1 (CD:FE:A4:C1:38:DF:87:5F H6159)
[2024-05-01T21:50:26 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-05-01T21:50:26 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=None
[2024-05-01T21:50:26 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-05-01T21:50:26 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-05-01T21:50:26 WARN  govee::commands::serve]   This device should be available via the LAN API, but didn't respond to probing yet. Possible causes:
[2024-05-01T21:50:26 WARN  govee::commands::serve]   1) LAN API needs to be enabled in the Govee Home App.
[2024-05-01T21:50:26 WARN  govee::commands::serve]   2) The device is offline.
[2024-05-01T21:50:26 WARN  govee::commands::serve]   3) A network configuration issue is preventing communication.
[2024-05-01T21:50:26 INFO  govee::commands::serve] 
[2024-05-01T21:50:27 INFO  govee::service::http] http server addr is 0.0.0.0:8056
[2024-05-01T21:50:36 INFO  govee::service::hass] Wait 500ms for hass to settle on 10 entity configs
[2024-05-01T21:50:36 INFO  govee::service::hass] MQTT connected with status=CONNACK code 0: Connection Accepted.
[2024-05-01T21:50:46 INFO  govee::service::state] requesting update via IoT MQTT Summer House Fairy 2 (AD:0F:A4:C1:38:00:9B:85 H6159) None
[2024-05-01T21:50:46 INFO  govee::service::state] requesting update via IoT MQTT Summer House Fairy 1 (CD:FE:A4:C1:38:DF:87:5F H6159) None```