glenndehaan / ikea-tradfri-coap-docs

How can you communicate to your ikea tradfri gateway/hub through coap-client
MIT License
189 stars 21 forks source link

HEX colors #5

Closed Thomasflantu closed 4 years ago

Thomasflantu commented 5 years ago

Hello,

The HEX colors doesn't work by me. How can I fix this?

glenndehaan commented 5 years ago

Hi,

Here are some things to check:

chrissachs commented 4 years ago

I also just had the issue that it didn't accept hex values:

In the sample payload, the hex value is in single quotes, but looks like the gateway only accepts double quotes:

Like this it works for me:

coap-client -m put -u "$TF_USERNAME" -k "$TF_PRESHARED_KEY" -e '{ "3311": [{"5706": "f5faf6" }] }' "coaps://$TF_GATEWAYIP:5684/15001/$TF_DEVICEID"
glenndehaan commented 4 years ago

Ah oke yeah that is right since single quotes are not making a valid JSON object. Just to clarify did you copy the value with quotes from this overview: https://github.com/glenndehaan/ikea-tradfri-coap-docs#rgb-bulbs

That then I have to update this table to use double quotes

glenndehaan commented 4 years ago

I have updated the docs so that the color table's won't have single quotes. This should avoid confusion