Comments (3)
Dear @fthmhmt,
extending the API is easy and could be done directly in McLighting.ino.
But set_switch is only a shortcut for alerdy existing API endpoints, I think:
/set_switch=1 is equal to /set_brightness?c=255
and
/set_switch=0 is equal to /set_brightness?c=0
Isn't it possible to use these API calls in OpenHAB?
Best regards
Tobias
from mclighting.
Got it working with the settings below. It will dimm also the LEDs :)
rules/mqtt.rules
rule "Neopixel Lights"
when
Item NeoPixel received command
then
switch(receivedCommand) {
case ON : sendHttpGetRequest("http://192.168.xxx.xxx/set_brightness?p=100")
case OFF : sendHttpGetRequest("http://192.168.xxx.xxx/set_brightness?p=0")
}
end
items/mqtt.items
Dimmer NeoPixel "Neopixel Lights" <light> ["Lighting"] { http=">[*:POST:http://192.168.xxx.xxx/set_brightness?p=%2$s]" }
sitemaps/mqtt.sitemaps
Frame label="NeoPixel Lights" {
Slider item=NeoPixel switchSupport
Switch item=NeoPixel
}
Will get SK6812 LEDs because they have a second LED in Warmwhite or Coldwhite but your Code does not support it. I am not a programmer but I found here the Post of @semaf where Adafruit Neopixel supports SK6812. Is it hard to combine it with your Code?
from mclighting.
Dear @fthmhmt,
great that you figured it out.
I don't have any SK6812 available here, so I don't know what exaclty to do, to make them work. If the neopixel library natively supports them, it could be sufficient to enhance the API endpoints with an additional parameter to control the warm white led, But I'm not sure.
Best regards
Tobias
from mclighting.
Related Issues (20)
- Cant Open/Import McLightingApp.aia HOT 2
- Change Hostname ? HOT 1
- Issues setting up Adafruit_MQTT configuration from wifiManager in Arduino
- Changing led pin issue? HOT 5
- E1.31 animations very laggy
- No Wifi connection although AP-Mode is quit
- What syntax should I use for domoticz HOT 1
- NUMLEDS Error HOT 1
- McLighting (esp8266) HOT 4
- No Wifi Network HOT 1
- Adding a selector switch in homebridge
- Home assistant Support
- USE_WS2812FX_UART1
- Flash Size ESP8266 2.7.4 HOT 1
- Build error HOT 3
- Start Problems ESP 8266 & WS2811
- Compile Error ... HOT 1
- connecting Octoprint (raspberry pi 4) to ESP8266 as the controller. HOT 4
- Change Wifi Network HOT 3
- Error compiling mclighting v3
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 mclighting.