arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
466 stars 104 forks source link

Mqttthing sends colour command to LEDs on Homebridge restart #617

Open ceraz68 opened 1 year ago

ceraz68 commented 1 year ago

This issue may be associated to #431

When homebridge is rebooted Mqtthing sends a color command to lights that are configured as LEDs (those with setRGB & getRGB topics).

This has the effect of turning on LEDs for tasmota flashed devices unless the setoption20 is set to 1. https://tasmota.github.io/docs/Lights/#disable-auto-power-on

Although setoption20 works for tasmota LEDs that are off. Any LEDs that are powered on, change colour once homebridge reboots.

On reboot, the sent RGB colour to a given LED is usually the same but can vary per LED. For example, on reboot, one of my LEDs is always set to RGB colour 240,240,255; another LED is set to RGB colour 255,214,181 or 255,216,184 or 255,219,189.

I can't find the line in the code where this mqtt command is triggered.

I'm using Homebridge in a docker (OZNU latest release) with the Config-UI-X web interface to reboot.

danielangeloni commented 1 year ago

If i am understanding the issue correctly, it might be caused by the retain flag. Check if this is set to true

lakenen commented 8 months ago

I see this as well:

Homebridge v1.7.0 (HAP v0.11.1) (Homebridge C54A) is running on port 51091.
Publishing MQTT: cmnd/tasmota_602AED/HSBColor = 237,6,100

It's really alarming if the lights are low brightness or off and suddenly jump to such a bright mode.