toblum / McLighting

The ESP8266 based multi-client lighting gadget
MIT License
1.05k stars 289 forks source link

HTTP Rest API No Longer Returns Command Set by Website #146

Closed ryancasler closed 6 years ago

ryancasler commented 6 years ago

After setting a mode by http GET request, it is displayed corrected in the status GET. However, if you then go in and make changes via the website to another mode or brightness or color, those changes are not reflected the next time you perform an GET status request. The info returned is what was set by the last GET request. It appears that mode is not being stored. I've already updated all of my sketches with the new code. Any way we can pull those last commits?

debsahu commented 6 years ago

I can't replicate this. @toblum could you confirm you are seeing this issue as well?

debsahu commented 6 years ago

@ryancasler When you load the webpage, did you start a new session? If you have the webpage open and upload new code from IDE/OTA, websocket connection gets disconnected. When you make changes to the modes on the web interface do the LEDs respond accordingly?

ryancasler commented 6 years ago

Yes, the LEDs respond correctly. I also found that the status does not change whether I have left the website open or open new one. The status is never updated when i make a call to get the status.

Correction: The mode, brightness and color are updated correctly. The ws2812fx_mode is not returned correctly.

debsahu commented 6 years ago

@ryancasler good that you removed your personal info, I was going to edit it. Regarding this issue, I was able to replicate it and am pushing an update. Could you try testing from my branch?

ryancasler commented 6 years ago

I think so...the only changes you made were to the request_handlers.h file correct? I'm actually working on one right now. So I will update and give it a shot.

debsahu commented 6 years ago

@ryancasler yes, https://github.com/toblum/McLighting/pull/148/files

ryancasler commented 6 years ago

Yup...that worked. When I make a change on the http frontend I'm able to see that accurately reflected back to me form the GET message.