Page 1 of 1

Controlling Ikea Tradfri

Posted: Monday 26 October 2020 20:41
by JuanUil
Hi All,

I have bought 2 Ikea Tradfri bulbs and 1 Tradfri E1810 remote.
I manged to connect them with zigbee2mqtt to Domoticz.
I now want to control the bulbs with json commands.
I allready have the on/off command as:http://xxx.xxx.x.xx:8080/json.htm?type= ... tchcmd=Off
Can anybody help me with the complete list of json commands to change colour, dim, brightness and so on?

Any help is greatly appriciated.

jan

Re: Controlling Ikea Tradfri

Posted: Monday 26 October 2020 21:09
by waaren
JuanUil wrote: Monday 26 October 2020 20:41 Can anybody help me with the complete list of json commands to change colour, dim, brightness and so on?
Any help is greatly appreciated.
Does this this wiki page help?

Re: Controlling Ikea Tradfri

Posted: Monday 26 October 2020 21:34
by JuanUil
Hi Waaren,

Thnx for you reply but...
2020-10-26 21:31:49.054 Error: Error opening url: http://192.168.2.16:8080/json.htm?type=command&param= switchlight&idx=45&switchcmd=Set%20Level&level=6

Re: Controlling Ikea Tradfri

Posted: Monday 26 October 2020 22:07
by waaren
JuanUil wrote: Monday 26 October 2020 21:34 2020-10-26 21:31:49.054 Error: Error opening url: http://192.168.2.16:8080/json.htm?type=command&param= switchlight&idx=45&switchcmd=Set%20Level&level=6
Can you please give a bit more context? From where do you enter this command and what is the type of the device with id = 45? What do see when you enter this in the address line of a browser or from the command line using curl?
Can you access your system without password?

If I enter http://192.168.192.115:8084/json.htm?ty ... el&level=6 in my browser it works as expected on my RGBW dimmer device (id 73) on my test system.

Re: Controlling Ikea Tradfri

Posted: Tuesday 27 October 2020 18:43
by JuanUil
Hi Waaren,

sorry for my late response but it became to late for me last night. I starty work at 6 in the morning.
Today I have seen that I had a space in the command and therefore it didn't work.
After deleting the space all is working well.

any idea how to set the color temperature?
I now have:
http://192.168.2.16:8080/json.htm?type= ... level=3500
but that is not working

Thnx for the help!

greetz
Jan

Re: Controlling Ikea Tradfri

Posted: Tuesday 27 October 2020 21:42
by JuanUil
I would like to set the bulb to warm white but can't get it right

Re: Controlling Ikea Tradfri

Posted: Wednesday 28 October 2020 0:41
by waaren
JuanUil wrote: Tuesday 27 October 2020 21:42 I would like to set the bulb to warm white but can't get it right
I got below API call from the same wiki page as I posted earlier in this topic. Does that work on the IKEA bulbs ?

http://192.168.2.16:8080/json.htm?type ... kelvin=100

// Range of kelvin parameter: 0..100, 0 is coldest, 100 is warmest

Re: Controlling Ikea Tradfri

Posted: Wednesday 28 October 2020 21:36
by JuanUil
Hi Waaren,

Thnx again. I have gone for:
/json.htm?type=command&param=setcolbrightnessvalue&idx=130&color={"m":3,"t":0,"r":0,"g":0,"b":50,"cw":0,"ww":0}&brightness=100
And it is working like charm.

Regards
Jan