Comments (6)
Hi.
The json body must be based on Hue api and you can check how it is parsed here: https://github.com/diyhue/Lights/blob/master/ESP8266/Hue_Gradient_Lightstrip_WS2812/Hue_Gradient_Lightstrip_WS2812.ino#L692-L701
So it must look like: {"gradient": {"points": [ {"color": {"xy": {"x": 0.53, "y": 0.21}}}, {"color": {"xy": {"x": 0.13, "y": 0.2}}}, {"color": {"xy": {"x": 0.3, "y": 0.3}}}]}}
Note that the number of segments is dynamically updated based on the number of "points" from the request witch is a list, in my example are 3, but can be between 2 up to 10.
P.S. The emulated bridge must not be slow, here probably you have another issue.
DIY lights with support for diyHue. Contribute to diyhue/Lights development by creating an account on GitHub.
from lights.
I was poking through this source code quite a bit and saw this was possible, although I tried it and it caused a failure that rebooted the device for some reason.
The provided JSON does work though. Must have been a syntax error. Thank you @mariusmotea! Maybe worth adding to the docs?
from lights.
Wait, gradients work, but I still need the ability to change individual LEDs for custom effects. It doesn't look like this is possible via the API, would I need to modify and compile my own firmware?
from lights.
LEDs are grouped into virtual lights. There is no per pixel manipulation via api.
from lights.
You can implement custom effects intro the firmware, check fireplace and candle effects that are already there. If you manage to add nice effects feel free to open a pull request with your changes.
from lights.
It may be more appropriate to say that I'm trying to create dynamic effects using external sensors. Only illuminating where a person is standing, for example, without breaking Hue compatibility.
Seems like something I'd need to add support for under the /state/
endpoint. It wouldn't be compatible with Hue, but it would do the trick.
from lights.
Related Issues (20)
- [beta] Reduce or disable logging to syslog HOT 4
- Arduino nano 33 IoT support HOT 6
- sk6812 gradient HOT 7
- Use SK6812 white LED for better color reproduction HOT 1
- Color change HOT 6
- What Type is Yeelight LED strip? HOT 2
- Change LED Pin HOT 2
- Unable to download and flash via Web HOT 6
- Web flash tool unable to download firmware HOT 2
- Feature Request: New Sketch: Gradient & Gradient TV RGBCCT HOT 8
- Samsung TV Hue Sync App not working HOT 2
- WS2812 + MOSFET HOT 8
- Hue Gradient led strip type HOT 8
- Self-compiled sketches == reset loop HOT 6
- ESP32/ESP-C3_Controller_Board BOM - CPL HOT 2
- Arduino IDE / Flashing config help needed, just getting resets right now. HOT 29
- Connect to WiFi with username and password HOT 1
- Change Color Order HOT 3
- Calibrating an ESP8266 Bulb HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lights.