McLighting icon indicating copy to clipboard operation
McLighting copied to clipboard

Must Enable Legacy Animations for Off Button to Work

Open ryancasler opened this issue 6 years ago • 7 comments

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.

ryancasler avatar Apr 22 '18 03:04 ryancasler

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.

debsahu avatar Apr 22 '18 05:04 debsahu

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.

debsahu avatar Apr 22 '18 14:04 debsahu

I would say you can't really remove the off button. That's kinda of important.

ryancasler avatar Apr 22 '18 18:04 ryancasler

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.

ryancasler avatar Apr 23 '18 11:04 ryancasler

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 avatar Apr 23 '18 19:04 toblum

@toblum Sounds interesting, I think adding legacy modes (if enabled) to listModesJSON() is the best way to go.

debsahu avatar Apr 23 '18 20:04 debsahu

@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.

toblum avatar Apr 24 '18 19:04 toblum