Closed Joey-1970 closed 7 months ago
...maybe, the middle-part must be something in this way:
'{ "3311": [{"5709": 65353, "5710": 65535}] }'
(one more { left, and right } from the array)
...I try several variations, but in this I have a reaction...
Joachim
That command should work fine. One thing to note is that if your bulb isn't an RGB bulb this won't work. Also if you enter an out of bounds value the bulb won't change and isn't going to give a response.
Can you first try a HEX value to make sure that your bulb is RGB capable and is changing accordingly.
Hello Glenn,
the bulb I try is a "Tradfri bulb E14 CWS opal 600lm". I thing this is a "RGB"? Maybe I have two parts where I can make a mistake:
Joachim
That bulb should be indeed an RGB one. If you try this command is it changing to Blue for example?:
coap-client -m put -u "$TF_USERNAME" -k "$TF_PRESHARED_KEY" -e '{ "3311": [{ "5706": ¨4a418a¨ }] }' "coaps://$TF_GATEWAYIP:5684/15001/$TF_DEVICEID"
...that was first I try - direkt from the hex-value from color-picker send to the bulb, but not every time I see a reaction. I will try it again...
Joachim
Yeah the bulbs are picky about the colors and I have to say that I didn't found a good HEX to xyY converter yet
Some of the color bulbs are not true RGB. The use four groups of LEDs instead. blue, red, cold white and warm white. So e.g. the green colors cannot really be displayed (only a very bright greenish color). One can draw the area used in the Color space diagram to indicate, which xy colors can be used. Also depending on the brighness wanted not all colors can be set either. This might be complicated. One would need to find out the xyY values for each of the LED grould used and then draw four points in the xy diagram accordingly. Connect them with a line and you get the area which can be used.
I solved it. I was having the same issue, couldn't set the colors without getting the return 5.00 {"r":"07"}
Trying a custom color failed.
coap-client-gnutls -m put -u "$TF_USERNAME" -k "$TF_PRESHARED_KEY" -e '{ "3311": ["5709": 65535, "5710": 65535] }' "coaps://$TF_GATEWAYIP:5684/15001/$TF_DEVICEID"
5.00 {"r":"07"}
But using hex works.
coap-client-gnutls -m put -u "$TF_USERNAME" -k "$TF_PRESHARED_KEY" -e '{ "3311": [{ "5706": "ff0000" }] }' "coaps://$TF_GATEWAYIP:5684/15001/$TF_DEVICEID
The custom color is missing the curly brackets inside the array. Hex: '{ "3311": [{ "5706": "ff0000" }] }' Custom color: '{ "3311": ["5709": 65535, "5710": 65535] }'
Trying with the curly brackets added, custom colors work fine.
coap-client-gnutls -m put -u "$TF_USERNAME" -k "$TF_PRESHARED_KEY" -e '{ "3311": [{"5709": 65535, "5710": 65535}] }' "coaps://$TF_GATEWAYIP:5684/15001/$TF_DEVICEID"
No return message and bulb changes color.
PR for the readme. https://github.com/glenndehaan/ikea-tradfri-coap-docs/pull/35
🤣 Wow, yeah you are correct this was indeed a typo. I ever even looked at the README and always used my local script, in there the string was correct.
I have merged the MR and will close this issue.
Hello Glenn,
may be you see want is wong, but for me the RGB-command failed. I try your example:
coap-client -m put -u "$TF_USERNAME" -k "$TF_PRESHARED_KEY" -e '{ "3311": ["5709": 65535, "5710": 65535] }' "coaps://$TF_GATEWAYIP:5684/15001/$TF_DEVICEID"
to adapt for me:coap-client -m put -u "myusername" -k "mykey" -e '{ "3311": ["5709": 65535, "5710": 65535] }' "coaps://192.168.178.52:5684/15001/65538"
but I get this return:v:1 t:CON c:PUT i:2312 {} [ ] decrypt_verify(): found 24 bytes cleartext decrypt_verify(): found 15 bytes cleartext 5.00 {"r":"07"}
I think that 5.00 {"r":"07"} should show me that something is wrong, but I don't see it...Joachim