RGB LED strip and json Topic is solved
Moderator: leecollings
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RGB LED strip and json
did you already figure out how to do this?
- gizmocuz
- Posts: 2394
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: RGB LED strip and json
Something like
[url]http://IPADDRESS:PORT/json.htm?type=command¶m=setcolbrightnessvalue&idx=224&hex=FF00FF&brightness=100&iswhite=false[/url]
[url]http://IPADDRESS:PORT/json.htm?type=command¶m=setcolbrightnessvalue&idx=224&hex=FF00FF&brightness=100&iswhite=false[/url]
Quality outlives Quantity!
- gizmocuz
- Posts: 2394
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: RGB LED strip and json
Quality outlives Quantity!
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RGB LED strip and json
The hex value didn't work, I get an error back
I checked the topic and tested a bit, only had to convert the values from HUE lights before I could feed them back in to domoticz, but now I can set the led strip using json commands and a bash script.
only on a synology I get a timeout when I try to directly execute the command
so I have a work around now by calling a bash script from the lua script to change the led strip
I checked the topic and tested a bit, only had to convert the values from HUE lights before I could feed them back in to domoticz, but now I can set the led strip using json commands and a bash script.
only on a synology I get a timeout when I try to directly execute the command
so I have a work around now by calling a bash script from the lua script to change the led strip
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RGB LED strip and json
you can also add &saturation= to complete the command set
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RGB LED strip and json
hmmm, when looking into detail, I don't get the same color on the LED strip when I put in the hue/sat/bri as when I use the rgb values in domoticz
but when I send the same values to the hue lamp, the colors stay the same, so there is no color conversion mistake before i put the data in
and the hex command doesn't seem to work
gizmocuz: is the hex command supported in all versions? since my nas is still running an older version..
but when I send the same values to the hue lamp, the colors stay the same, so there is no color conversion mistake before i put the data in
and the hex command doesn't seem to work
gizmocuz: is the hex command supported in all versions? since my nas is still running an older version..
- gizmocuz
- Posts: 2394
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: RGB LED strip and json
I think it is supported in the last 300 versions.... for sure from the latest stable version
Maybe i got the command wrong.. do you get an error when you enter the json url in the browser ?
It should work, it converts internally the hex to hue again...
Maybe i got the command wrong.. do you get an error when you enter the json url in the browser ?
It should work, it converts internally the hex to hue again...
Quality outlives Quantity!
-
- Posts: 139
- Joined: Thursday 19 February 2015 21:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RGB LED strip and json
Ah, that's the trick, from a new release that I run on a Pi I can send hex code
but there is a mistake in the hex string send
when I send FF00FF in the hex string, the string recieved by the device is FF00FBrsion
String hexstring = message.getString();
Serial.println(hexstring);
so Blue is not correct al the time due to the string send
like FF000F will end up as FF0011rsion
now I also see why I get the wrong values when I send hue sat and bri to the RGB strip
(this is now in release 3.4834)
but there is a mistake in the hex string send
when I send FF00FF in the hex string, the string recieved by the device is FF00FBrsion
String hexstring = message.getString();
Serial.println(hexstring);
so Blue is not correct al the time due to the string send
like FF000F will end up as FF0011rsion
now I also see why I get the wrong values when I send hue sat and bri to the RGB strip
(this is now in release 3.4834)
-
- Posts: 12
- Joined: Thursday 17 May 2018 13:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: RGB LED strip and json
As the last post is around two years old, and it seems the "bug" is not fixed - is something else wrong with "setcolbrightnessvalue"?
No matter if send through browser or Domoticz script, f.e.
results in
only FFFFFF is transmitted fine, every other hex value is somehow converted. Also tried brightness and so on, does not seem to make a difference.
EDIT: as it is all about JSON:
f.e results in status "ERR" - it is an exact copy of the JSON example on the Domotics wiki
EDIT 2 :
Also, choosing a value from the color table in Domoticz results in false hex value received by the node -.-
No matter if send through browser or Domoticz script, f.e.
Code: Select all
http://192.168.178.200:8080/json.htm?type=command¶m=setcolbrightnessvalue&idx=51&hex=000000
Code: Select all
TSF:MSG:READ,0-0-1,s=1,c=1,t=40,pt=0,l=6,sg=0:FFFFFF
EDIT: as it is all about JSON:
Code: Select all
http://192.168.178.200:8080/json.htm?type=command¶m=setcolbrightnessvalue&idx=51&color={"m":3,"t":0,"r":0,"g":0,"b":50,"cw":0,"ww":0}&brightness=100
EDIT 2 :
Also, choosing a value from the color table in Domoticz results in false hex value received by the node -.-
-
- Posts: 104
- Joined: Saturday 25 November 2017 17:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v3.8153
- Location: Czech Rep.
- Contact:
Re: RGB LED strip and json
One question.
How you send this "http" call from MySensors for example radionode ???
How you send this "http" call from MySensors for example radionode ???
RPi2 Domoticz v 4.10717
10 x Sonoff Basic - ESPeasy
1 x Wemos D1 - ESPeasy
1 x Shelly Plus Plug S
1 x Sonoff S26 - ESPeasy
1 x Shelly 1
1 x MySensors HC-SR04
1 x MySenosrs wifi gateway
1 x RFLink
4x Cam IPC-T240H
10 x Sonoff Basic - ESPeasy
1 x Wemos D1 - ESPeasy
1 x Shelly Plus Plug S
1 x Sonoff S26 - ESPeasy
1 x Shelly 1
1 x MySensors HC-SR04
1 x MySenosrs wifi gateway
1 x RFLink
4x Cam IPC-T240H
Who is online
Users browsing this forum: No registered users and 0 guests