Closed golddragon007 closed 3 years ago
Your "steps to reproduce" and "expected behavior" look identical to me -- am I missing something?
State is not updated when bulbs are in the "OFF" state, meaning the MQTT state topic will not be refreshed when you send state-changing commands while the bulb is off. This is because physical bulbs cannot have their state changed while off. I do not think it makes sense to change this behavior, if I'm understanding correctly.
If you're attempting to use the FUT089 as a remote for a non-milight device, you might consider using the MQTT updates topic, rather than the MQTT state topic. The updates topic is a very raw translation of the actual milight command packets, and is not influenced by state.
More information is in the MQTT section in the README:
https://github.com/sidoh/esp8266_milight_hub#updates
I'm going to close, but please let me know if I've misunderstood. Happy to continue discussing.
Hello,
Yes, I use the update topic, and you missed this part:
The circled part is the difference between the two states (on and off) in the MQTT update topic.
Also if the original bulb doesn't support the turn on if the colour or other received, then maybe the update topic shouldn't be sent, because if somebody using that for their implementation, they will mess up their states.
You shouldn't be getting any updates while the bulb is off.
Can you please paste a full MQTT log (including commands and state updates)?
Think of the updates topic as a raw stream of packets sent or intercepted. It does not consider state. If you're seeing differences in the update topic, it's almost certainly because the remote is doing something different.
Maybe it has its own state that isn't updated if the bulb is supposed to be off.
No, it seems that the ESP sends the wrong message.
If the state is off then the ESP doesn't change the message for the Command 07 Argument 00 from saturation to color_temp if I switch the mode from color to white. While if the state is on it works fine.
State off (read bottom to top)
{"saturation":100}
fut089 packet received (9 bytes):
Raw packet: 9B 54 DF CD CD AE 14 E4 D5
Decoded:
Key : 9B
b1 : 25
ID : 137F
Command : 07
Argument : 00
Sequence : 0F
Group : 00
Checksum : AC
{"saturation":100}
fut089 packet received (9 bytes):
Raw packet: 9F 50 D3 D9 C9 A2 21 D8 B2
Decoded:
Key : 9F
b1 : 25
ID : 137F
Command : 07
Argument : 00
Sequence : 0E
Group : 00
Checksum : 9F
{"command":"set_white"}
fut089 packet received (9 bytes):
Raw packet: 40 98 90 76 26 7C 7F 25 88
Decoded:
Key : 40
b1 : 25
ID : 137F
Command : 01
Argument : 14
Sequence : 0D
Group : 00
Checksum : 51
{"saturation":100}
fut089 packet received (9 bytes):
Raw packet: 99 19 95 FF DB C1 AB E3 87
Decoded:
Key : 99
b1 : 25
ID : 137F
Command : 07
Argument : 00
Sequence : 0C
Group : 00
Checksum : AB
{"saturation":100}
fut089 packet received (9 bytes):
Raw packet: AA FD C2 3D E8 BC 38 A9 93
Decoded:
Key : AA
b1 : 25
ID : 137F
Command : 07
Argument : 00
Sequence : 0B
Group : 00
Checksum : 97
{"hue":7}
fut089 packet received (9 bytes):
Raw packet: 33 BC 67 65 3A 11 91 4C AE
Decoded:
Key : 33
b1 : 25
ID : 137F
Command : 02
Argument : 05
Sequence : 0A
Group : 00
Checksum : 0F
State on (read bottom to top)
{"color_temp":370}
fut089 packet received (9 bytes):
Raw packet: E2 C5 6A 75 B0 84 F3 71 36
Decoded:
Key : E2
b1 : 25
ID : 137F
Command : 07
Argument : 00
Sequence : 16
Group : 00
Checksum : 6A
{"command":"set_white"}
fut089 packet received (9 bytes):
Raw packet: 9C 3C EC 1A 82 E0 CB 81 C8
Decoded:
Key : 9C
b1 : 25
ID : 137F
Command : 01
Argument : 14
Sequence : 15
Group : 00
Checksum : B5
{"saturation":100}
fut089 packet received (9 bytes):
Raw packet: 26 81 3E C1 6C 38 CD 25 8C
Decoded:
Key : 26
b1 : 25
ID : 137F
Command : 07
Argument : 00
Sequence : 14
Group : 00
Checksum : 1C
{"hue":4}
fut089 packet received (9 bytes):
Raw packet: B8 20 18 EE AB 17 F1 AD 92
Decoded:
Key : B8
b1 : 25
ID : 137F
Command : 02
Argument : 03
Sequence : 13
Group : 00
Checksum : CF
Ah, sorry. I think I'm following what's going on now. Hopefully this helps clear it up:
Because of all of this, there's not a way to solve the problem you're getting at without completely nuking the ability to keep assumed bulb state in sync for FUT089.
This is just a shitty limitation of the underlying protocol.
Let me know if I've misunderstood, and apologies for the extended back and forth. Sometimes it takes me a while to dredge up the necessary context.
Describe the bug
One of the two messages is missing (from the update MQTT channel) between the on and off state: saturation or color_temp. Device: FUT089 remote panel.
Steps to reproduce
Expected behavior
Setup information
Firmware version
1.10.7
Output of http://milight-hub.local/about
Output of http://milight-hub.local/settings
Additional context
I'm in the progress to control the WLED device with the FUT089 remote panel. It would be nice if the received signals would not change depending on if I pressed the ON or OFF before that. If this was made because of the legacy devices then it would be nice if I would be able to turn it off on the device level.