-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Add Rest API #3
Comments
Hi Koshisan, I need some help understanding this. Do you need a REST API implemented? -Frank |
Hi Frank, This was originally something I intended to do. That's why I started looking into firmware alternatives for the device. The idea is to provide a better smarthome integration. In my specific case I keep my clock in the bedroom. The displays are to bright to sleep, so I want to turn them off when I start the "nightmode" for my smarthome. I also want the LED backlight to work together with other bedroom lights. So far I added it to SmittyHalibut's version of the code, since it was quick and easy - I just had to register a webserver with some URL handlers:
And as for the implementation I could use his existing functions:
Note that I managed to avoid actually using a JSON object until now ;) However, I will need one for the color defintion of the background light. Ideally the background light would be controlled by an object providing mode, brightness, red, green, blue... Also the display_on/display_off URLs are a bit amateurish - it should either accept an JSON object with a "display" item that can contain a mode, or at least something like /api/display?mode=off (with "clock", "images", etc. as alternatives) However - for this to be implemented in your fork #5 would need to be adressed first - testing isn't really fun if you have to join the device to your wifi by phone every reboot ;) (I did some work on this, too - will update that ticket next) |
I already have a rudimentary API running in my fork - however, without rest (since it is a simple display/backlight on/off through URL requests) - however, it is a start and a good test for a pull request :)
The text was updated successfully, but these errors were encountered: