Ikea "TRÅDFRI" Gateway and smart lights series for ZigBee Light Link (ZLL) lighting

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

dobber
Posts: 19
Joined: Saturday 07 May 2016 1:43
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta..
Location: Sweden
Contact:

Re: Ikea "TRÅDFRI" Gateway and smart lights series for ZigBee Light Link (ZLL) lighting

Post by dobber »

mcduarte2000 wrote: Sunday 30 July 2017 19:59 Just as an info, in case useful for someone else, I have been using with success this python script:

https://github.com/sandyjmacdonald/ikea-smartlight

Using this tutorial:

https://learn.pimoroni.com/tutorial/san ... om-your-pi

I have four lights in my corridor and created a simple bash script:

Code: Select all

#!/bin/bash
cd /home/pi/domoticz/scripts/python/ikea-smartlight/
python tradfri-groups.py -a power -g 174716 -v $1
python tradfri-groups.py -a brightness -g 174716 -v $2
python tradfri-lights.py -a color -l 65537 -v $3
python tradfri-lights.py -a color -l 65538 -v $3
python tradfri-lights.py -a color -l 65539 -v $3
python tradfri-lights.py -a color -l 65540 -v $3
Which I am calling using a virtual switch (and with some simple timers depending on the hour of the day):

Image

Image
Great guide!
I'm using it in a pi2 that is controlled by json from a Synology DS916+ Docker Domoticz installation.
Good enough until Ikea releases an API that can be integrated into Domoticz.
iamthemitch
Posts: 1
Joined: Tuesday 15 October 2013 13:18
Target OS: Linux
Domoticz version:
Contact:

Re: Ikea "TRÅDFRI" Gateway and smart lights series for ZigBee Light Link (ZLL) lighting

Post by iamthemitch »

Awesome :D

Just figure out that virtual Dimmer were available.

Working like a charm.

But I still have a little " issue " with my setup... I still use the Ikea remote, and of course, such changes are not reported to Domoticz.

Did someone already created a timer script to refresh data from the gateway ?
jackisidore
Posts: 19
Joined: Friday 12 July 2013 15:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: NL
Contact:

Re: Ikea "TRÅDFRI" Gateway and smart lights series for ZigBee Light Link (ZLL) lighting

Post by jackisidore »

edit: wrong thread...
Last edited by jackisidore on Wednesday 21 March 2018 18:07, edited 1 time in total.
MatsL
Posts: 7
Joined: Monday 24 February 2014 19:11
Target OS: Linux
Domoticz version:

Re: Ikea "TRÅDFRI" Gateway and smart lights series for ZigBee Light Link (ZLL) lighting

Post by MatsL »

Hi!

I created a Lua script for triggering the bash script that mcduarte posted
And this is using a virtual dimmer switch instead of the selector switch, as iamthemitch suggested

This way you get way more control over the dimming of the bulb and I guess it will be easier to trigger the light from other lua scripts
Unfortunatly you lose the ability to change the color temp of the bulb
But I guess you could have a separate selector switch also if needed
A combined selector/dimmer switch, does that exist? :)

The lua could propably be cleaned up, but at least its working...

Code: Select all

-- TestDimmer = Virtual Switch, set as switch type Dimmer

Dimmer = tonumber(otherdevices_svalues['TestDimmer'])

commandArray = {}

if
 devicechanged['TestDimmer'] then
    Dimmer = tonumber(otherdevices_svalues['TestDimmer'])
    print(Dimmer)
    
    if
        otherdevices['TestDimmer'] == 'Off' then
        Dimmer = 0
        os.execute('"/home/pi/domoticz/scripts/bash/65566.sh" off')
    end 
    
    if
        otherdevices['TestDimmer'] == 'On' then
        os.execute('"/home/pi/domoticz/scripts/bash/65566.sh" on')
    end 
    
    if (Dimmer >= 1 and Dimmer <= 100) then
        os.execute('"/home/pi/domoticz/scripts/bash/65566.sh" on '..Dimmer..' warm')
    end
    
    if (Dimmer == 0) then
        os.execute('"/home/pi/domoticz/scripts/bash/65566.sh" off')
    end

end

return commandArray
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest