Created At

Sep 20, 2017

Last Update

Oct 02, 2017

Platforms

HC 2, HC Lite

Views

19317

Download

441

ADDITIONAL DEVICES

Fibaro HCL or HC2

a working Trådfri setup; meaning the ethernet gateway and one or more light bulbs

a working Raspberry pi (any version would do) running Raspbian, or any other suitable HW/OS. (I will call this 'raspberry' in this tutorial from now on, albeit that I am running this on a VMware VM, running Debain on x86 infra)

 

INSTALLATION

Like I said; this is a high level how to.. Let me know if you need any specific information and I am happy to support.

 

1. Set a static IP address for your Trådfri gateway and your raspberry

Your Trådfri gateway does not have any web interface in which you can make settings. The good news is that your DHCP server most likely does. This is most likely your ISP's router and if not you are probably aware already ;).

The sticker at the bottom of your Trådfri gateway reads it's mac address. Configure a static lease for it and also for your raspberry's interface, or set it to a static address manually in the OS.

 

2. Install HA-bridge on your raspberry

I haven't used this manual, as I didn't need any, but assuming it is correct, please use this as your reference:

http://xbmcnut.blogspot.nl/2016/10/installing-ha-bridge-on-your-raspberry.html

 

3. Install DiYhue on your raspberry

It can be found here: https://github.com/mariusmotea/diyHue

(git clone https://github.com/mariusmotea/diyHue.git)

For auto detection you will also need namp --> 'sudo apt-get install namp'

PS: Please do note that the coap-client-linux binary that comes with is is compiled for arm cpu's, like the raspberry. If you use x86 infra you will need to compile it yourself and replace the pre-compiled one.

 

4. Start Diyhue

./Bridgeemulator.py (at least, thats what it was called I believe hehe. If you don't have Python installed, it won;t run, so then first install Python

 

5. Configure your Trådfri details into diyhue

Open a browser and go to http://{bridgeIP}/tradfri

Here you fill in the IP address you gave your gateway and the device's secret, which you can find at the bottom of the gateway. This is CaSe SenSiTiVe.

If successful it will tell you it found x devices.

Optional: At this point you can download the official Philips Hue app on your phone if you please and use that instead of the official Ikea app, which sucks imho.

Scan for new lamps and it will find them.. :)

6. Setup Ha-bridge

Assuming you performed step 2 of this tuorial succesfully, you can open HA-bridge via your browser.

Once you are there, click on 'Bridge control' in the menu.

Scroll down a little bit, to the point where you can add a hue bridge. Here add '127.0.0.1' as IP address and think of a nice name for it and save.

Then, in the menu, go to 'Hue devices'.

Select your lights and click on 'Bluk Add

Then, in the menu, go to 'Bridge devices'

If you'd like, you can change their names under the 'Edit/Copy' button.

FInally, in the overview of all devices, write down the ID's for all your lamps. These are 8 or 9 digit numbers.

 

7. Install and config VD in your HCL/HC2

This step you will need to do for every single light you want to add.

Download the attached VD and import it into your HC2/HCL.

As IP address fill in the IP address of your raspberry PI and enter '80' as the port (or whatever you used, if not 80)

For all three items in the VD, change the value of the very first variable (hueLightID). Here use the ID you wrote down at the end in step 6.
Save it and test if it works.

If not... Then either you did something wrong, or I forgot something in this turorial :D Either way, just ask.. :-)

 

P.S.:

This is probably a very sloppy solution and I am sure people will be able to further optimize it. By all means, please do!

 

P.P.S.:

For your convenience I included some icons. Please find them attached.

 

P.P.P.S.:

The slider sets the brightness, where 0 == off.

There is no slider for the temperature, as the bulbs only support three preset values, namely 2200k, 2700k and 4000k. For these, you got buttons :)

 

 P.P.P.P.S.:

With HA-bridge you can also use your Amazon Echo Door for controlling the bulbs. Give them easy names, and ask Alexa to 'scan for devices'.

 

Then you can say 'Alexa turn on xxxxxx' (and turn off too ofcourse)

7 Comments,  Want to add comment please login
1cf214a5260e683ddca15ad1d1758f24

Andy update to HC3 ?

E0678d5fd81021e85546f1e6a351e719

Are there any chances Fibaro Home Center 3 will be supported, because I cannot import file?

3a67035620618e895addd75c93c42a48

I was hoping my Fyrtur would show up and give me a solution to combine with fibaro, they didn`t. Any hackers out there?! :D

3a67035620618e895addd75c93c42a48

http://raspberry-ip/tradfri - have entered ip adress and code - even QR code it, and copy pasted. Nothing happens. Anyone?

Ff5a1ef76fb2a1cab7b217abeae59c29

Michael You should add a simple ID instead HA Bridge lamps ID. Just add 1 for first lamp, 2 for second, etc.

© 2024. Nice-Polska Sp. z o.o.Privacy policyTerms & ConditionsFeedback