arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.26k stars 4.82k forks source link

MQTT Power State of Channel not Updating with SetOption68 enabled #18234

Closed moesfeld closed 1 year ago

moesfeld commented 1 year ago

PROBLEM DESCRIPTION

When using a multichannel LED-Controller (i.e. LS5P-TAS) with setoption68 ON the Powerstate in MQTT unter stat ist not updated when switching on the channel by setting its value.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [x] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:
16:50:12.388 CMD: Grp 0, Cmd 'CHANNEL', Idx 1, Len 2, Pld 67, Data '67'
16:50:12.395 MQT: kueche/leds/stat/RESULT = {"POWER1":"ON","Channel1":67,"POWER2":"OFF","Channel2":26,"POWER3":"OFF","Channel3":51,"POWER4":"OFF","Channel4":55,"Color":"AB43828C"}
16:50:13.942 CFG: Saved to flash at F5, Count 446, Bytes 4096

TO REPRODUCE

Steps to reproduce the behavior:

  1. 4 PWM Channels configured (i.e. https://templates.blakadder.com/athom_LS5P-TAS.html)
    1. setoption68 = ON
  2. MQTT enabled and connect to broker
  3. All Channels are switched off in the web-Gui
  4. Move the first Channel slider to i.e. 50% -> MQTT stat/RESULT shows POWER1:ON, MQTT stat/POWER1 = OFF

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen. MQTT stat/POWER1 = ON

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

image

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

barbudor commented 1 year ago

The tree view of MQTT explorer is not very useful in that case vs a time oriented log Could you please do the same but provide the console log? Web log is fine but please use text copy/paste and not screen shots. Thanks

moesfeld commented 1 year ago

@barbudor Hi, weblog output is in the inital Post: 16:50:12.388 CMD: Grp 0, Cmd 'CHANNEL', Idx 1, Len 2, Pld 67, Data '67' 16:50:12.395 MQT: kueche/leds/stat/RESULT = {"POWER1":"ON","Channel1":67,"POWER2":"OFF","Channel2":26,"POWER3":"OFF","Channel3":51,"POWER4":"OFF","Channel4":55,"Color":"AB43828C"} 16:50:13.942 CFG: Saved to flash at F5, Count 446, Bytes 4096

Not much to see there. Channel 1 is set to 67 and the Result reflects that. But kueche/leds/stat/POWER1 stays OFF. In the webgui it is ON. I can work around it in Openhab/ioBroker etc... by using the RESULT Jsonpath. But I still think it's a Bug.

barbudor commented 1 year ago

I suggest to use SetOption90 1 to disable the non-JSON POWER messages

moesfeld commented 1 year ago

Okay, but to what end? As i said i could work around it with the JSON POWER messages. I just think this should be considered a bug as the non Json Power messages should still reflect the current state. Internal state seems correct to me.

barbudor commented 1 year ago

The new power state has been correctly updated What you are looking at are old messages This is why I sais that MQTT explorer is not a good tool as you don't see the time-line Those POWER messages will not be resent as the updated state as already been provided in a json I suggest to remove the non json and focus only on json messages

Jason2866 commented 1 year ago

Closing, since answered