McLighting
McLighting copied to clipboard
Must Enable Legacy Animations for Off Button to Work
If you don't enable Legacy Animations, the off button on website doesn't work to turn off the LEDs. Also, the static function and I believe the breath do not work as well. Enabling legacy animations resolved the issue.
The off button calls "=off". That is a legacy mode, same with TV ("=tv"). The web front-end needs modification to call <HOSTIP>/off instead, for off button action. For now don't disable legacy mode, it is a work in progress. I put it in there so that later on if we decide to retire those modes all together it would be easier. Regarding static and breath modes, they are from ws2812fx and the same errors should occur even weather legacy mode is enabled or disabled, I will check this later and keep this thread updated on that front.
I disabled legacy mode and tested, both static and breath work when called from websockets. Any more details on how to replicate the second part of this issue?
@toblum Whenever you have time, could you disable legacy mode and check how the web-interface responds to "OFF" and "TV" button. Can we disable them on the web-interface if it is not present in "mode"? I dont know nothing about designing/editing web-interface.
I would say you can't really remove the off button. That's kinda of important.
Static and Breath work. The issue was that after the off button is pushed nothing works. I have enabled legacy automations and it still doesn't work. So the only way to turn them off is to manually enter it in the URL. This isn't really workaable long term. Either the legacy automations should be removed until the html interface can be redesigned or the web interface should be fixed.
Hi @ryancasler, thanks for reporting this. @debsahu I will have a look at it but it may take some time as I'm currently not near my workbench to try everything out. I could think of ways to make the UI adapt the presence of legacy modes, but it may need another REST request to determine if they are present. Maybe we could add these both modes as effects to the list of modes if they are present, or not. So all buttons would work the same way and we could control from ESP side what is shown in the UI. For the short term we could re-enable at least these both static modes. What do you think?
@toblum Sounds interesting, I think adding legacy modes (if enabled) to listModesJSON() is the best way to go.
@debsahu OK, I think we can keep this issue open and I will have a look at it, when I'm back at my workbench.