wez / govee2mqtt

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

Error connecting to MQTT: Add on fails to start #142

Open kekonn opened 9 months ago

kekonn commented 9 months ago

Govee Device SKU

H6056

Govee2MQTT Version

2024.01.24-ea3cd430

Describe the issue

It would seem that the MQTT data is no longer automatically added to the add on?

Zigbee2MQTT still runs fine though.

HA version: 2024.2.2 Supervisor version: 2024.02.0 HA Install method: HASSOS

Startup Diagnostics

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_TEMPERATURE_SCALE=C
GOVEE_EMAIL=REDACTED
GOVEE_PASSWORD=REDACTED
++ cd /app
++ exec /app/govee serve
[2024-02-21T19:14:58 INFO  govee::commands::serve] Starting service. version 2024.01.24-ea3cd430
[2024-02-21T19:14:58 INFO  govee::commands::serve] Querying platform API for device list
[2024-02-21T19:14:58 INFO  govee::commands::serve] Querying undocumented API for device + room list
[2024-02-21T19:14:59 INFO  govee::service::iot] Connected to IoT: CONNACK code 0: Connection Accepted.
[2024-02-21T19:14:59 INFO  govee::commands::serve] Starting LAN discovery
[2024-02-21T19:14:59 INFO  govee::service::iot] IoT (re)connected with status CONNACK code 0: Connection Accepted.
[2024-02-21T19:14:59 INFO  govee::commands::serve] Waiting 10 seconds for LAN API discovery
[2024-02-21T19:15:09 INFO  govee::commands::serve] Devices returned from Govee's APIs
[2024-02-21T19:15:09 INFO  govee::commands::serve] Computer light bars (A4:25:CC:37:36:39:55:09 H6056)
[2024-02-21T19:15:09 INFO  govee::commands::serve]   LAN API: ip=192.168.100.166
[2024-02-21T19:15:09 INFO  govee::commands::serve]   Platform API: devices.types.light. supports_rgb=true supports_brightness=true
[2024-02-21T19:15:09 INFO  govee::commands::serve]                 color_temp=Some((2000, 9000)) segment_rgb=Some(0..15)
[2024-02-21T19:15:09 INFO  govee::commands::serve]   Undoc: room=None supports_iot=true ble_only=false
[2024-02-21T19:15:09 INFO  govee::commands::serve]   Quirk { sku: "H6056", icon: "mdi:led-strip", 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-02-21T19:15:09 INFO  govee::commands::serve] 
Error: Please specify the mqtt broker either via the --mqtt-host parameter or by setting $GOVEE_MQTT_HOST

Stack backtrace:
   0: std::backtrace_rs::backtrace::libunwind::trace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2: std::backtrace::Backtrace::create
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/backtrace.rs:331:13
   3: anyhow::error::<impl anyhow::Error>::msg
   4: govee::service::hass::HassArguments::mqtt_host
   5: govee::commands::serve::ServeCommand::run::{{closure}}
   6: govee::Args::run::{{closure}}
   7: tokio::runtime::park::CachedParkThread::block_on
   8: tokio::runtime::runtime::Runtime::block_on
   9: govee::main
  10: std::sys_common::backtrace::__rust_begin_short_backtrace
  11: std::rt::lang_start::{{closure}}
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/ops/function.rs:284:13
  13: std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  14: std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  15: std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  16: std::rt::lang_start_internal::{{closure}}
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:48
  17: std::panicking::try::do_call
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:552:40
  18: std::panicking::try
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:516:19
  19: std::panic::catch_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panic.rs:142:14
  20: std::rt::lang_start_internal
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/rt.rs:148:20
  21: std::rt::lang_start
  22: 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

Additional Logs

No response

Home Assistant Logs

No response

Anything else?

No response

Maxxxel commented 1 month ago

I have the same error

Error: Please specify the mqtt broker either via the --mqtt-host parameter or by setting $GOVEE_MQTT_HOST

Stack backtrace:

I run everything in docker containers via portainer. Mosquito, govee2mqtt, and hass.

I use the exact same mqtt config for other devices and they work without any problems...

I tried several values and IPs for host, the local IP, the IP in Portainer, localhost etc. nothing works!