#145
Вставка
- Опубліковано 30 чер 2017
- In video #140 we hacked the new IKEA Trådfri Smart lighting system using the remote control as a basis. It worked, but had some major disadvantages.
Today, we will use an IKEA gateway and do it right!
- We will eliminate the problems of the current hack
- We will install and pair the gateway with two different bulbs
- We will learn how the system communicates
- We will switch the lights using Node-Red on our Raspberry Pi. Like that, we can use MQTT or many other tools to switch the lights
- We will switch the lights with a normal Linux command
- We will install a Python wrapper. You can use this wrapper as a basis for your own programs
- We will see the CoAP protocol , which was introduced in the last video, in action
- At the end, as promised, I will reveal a “hot” secret about the IKEA bulbs.
We also will use AdvancedIP Scanner to find the IP address of our Gateway
Supporting Material and Blog Page: www.sensorsiot.org/145-ikea-tr...
Zigbee info: faire-ca-soi-meme.fr/test/201...
Github: www.github.com/sensorsiot
If you want to support the channel and buy from Banggood use this link to start your shopping: bit.ly/2jAQEf4 (no additional charges for you)
/ sensorsiot
/ spiessa - Наука та технологія
ATTENTION: The FLIR measurements are not correct (probably because o the material or because of the radiation of the LED).They are too high. But still, the whole lamp gets pretty warm.
Andreas Spiess did you try a bit of electrical tape on the surface you want to measure. (non reflective and reasonable emissivity )
90 degrees indeed seemsed pretty hot. Won't make 25.000 hrs
Ed19601 it isn't 90 degrees, and it is rated for about 6-14W, depending on type, and handle about 25 000 switches on/off.
So yes, I think they will live 25 000h.
The Hue bulbs get super hot too, I would estimate maybe 75 C in the base. The non-smart 100 W equivalent bulbs I have also get pretty damn hot, I guess it's just a thing with the switch mode driver chips and limited heat sinking.
Anders Jackson that's why I said "seemed", because if it were it probably wouldn't make 25.000 hrs
I love your short, structured, compact yet complete information!! Thank you for your videos - keep going on just like you do!!
Thank you for your nice words!
As always, an excellent presentation. Might mention node-red-dashboard provides a nice user interface. Thanks.
You are right. I had a video about node red in the past and I use dashboard for my own installation
I love the Swiss accent - maybe you could do some videos in Schweizerdeutsch also.
Thanks for this nice video with a quick overview of the possibilities. In the end I will be linking my Trådfri gateway to a smart home system (openHAB) but it's good to play around with this first to know the ins and outs of the system.
Again a very good and useful video from Andreas. Thanks so much.
Thanks!
Thanks for the motivation to deal with IKEA Trådfri. So, I bought a bulb and a gateway to give it a try. Because using ioBroker in my home automation anyway, I now use the ioBroker adapter for IKEA Trådfri and it works like a charm. I hope that more light sources other than just bulbs will be available in the future.
Thanks for your feedback!
Great job, Andreas!
Thanks!
Just wanted to add, that there is a node-red module ("node-red-contrib-alexa-local") to add a virtual device to Amazon Echo, that can then be used to switch the ikea bulbs.
P.S.: Thank you Andreas for your videos and excellent explanation
Thanks for the update. When I made this video, I think, it was not available.
Very interesting video. I like IKEA concept a lot, providing affordable system that is using standard protocol. I hope they will improve on that heat problem because it could caus them problems in future.
In my opinion, one thing that is missing in Trådfri product range is some kind of generic power switch that you can plug in power outlet and then control output. I am thinking to build something like that by getting a Zigbee module and then build something like "Zigbee Sonoff" with it, that is capable of pretending to be an IKEA light bulb.
I think, they just started and heve to learn to deal with electronics. Most of their current offering is still "mechanical". And I am sure, they will expand their offering, if we buy the current stuff...
Well explained ! Thank you :)
You are welcome!
your raspberry should have had a hostname of pikea ;)
LoL. Actually, one of the two Pis I used for the video had the name ikea.local. But PIKEA would have been better!
Thanks a lot. You are creating wonderful videos. I just inform you that your secret is shown at 10:49 in the first command.
Thanks for the info. Obviously, i was not careful enough... But the device is behind my firewall, so, I hope, it will not be a big problem. BTW. Thank you for watching my videos with such a precision!
Excellent explanation about the protocols that tradfri uses! I'm interested in "hacking" a tradfri remote control. I want to use the left and right button to switch between scenes despite of switching between light temperature. My goal is to switch between 100% brightness on 2700k and 30% brightness and 5% brightness on 2200k. Just like the non smart Phillips scenes switch bulbs. Right now I need several commands from the tradfri remote to do that.
Good luck with your project! I think, today you find much more info about the topic than when I made my video.
Hiya, great video as always.
Regarding the Hot temperature, was that with the lamp on or off?
It was on.
Thank you for another great video! 73s W3TCP
You are welcome!
Cool! Now we're ready to rumble!!! Tnx! ~;)
Maybe you watch my newer videos about Zigbee? Things got better since this video
Wow, that's some hot bulbs! Did you adjust for emissivity on the white surface of the bulbs or check with a thermocouple to check readings of the temperature were correct?
+zaprodk You are right. The shown temperature was too high. I made a correction and pinned it, so everybody can see it. Thanks!
Hi Andreas,
Question...you state you need to pair the Ikea remote to the Ikea gateway. I thought this first step is to establish the connection at the right channel / frequency. Pairing is only with the known smartlight bulbs.
Best regards.
This is an old video and unfortunately, I do not remember the details.
do you need a steering device to control products, or can you configure products to connect directly to the hub?
You need the remote control (which comes with the bulbs to pair them with the gateway
Hey Andreas, I really like your video's. I fell in love with the LoRa series. Would be really interesting if you did a tutorial on GPS tracking through a lora node. It would be a really go alternative to mobile network for embedded tracker use cases
I think, you find such devices because they were used to test LoRa gateways. Google for "lora gps arduino" or "lora gps tracker"
Andreas Spiess Yes, I did know of that since a short time. However, lately I found alot of people doing it on a node
What do you mean with "on a node"?
On a node as in not on a gateway.
Great video :) Quick question though: at 7:50, the color parameter read from the bulb seems to be an RGB hexa string. But at 8:32, when sending the message to set the light to a color, you are using a preset value ('warm'). Does it work if you send an arbitrary RGB code (e.g.: ff0000) ?
This is an old video and I do no more remember the details :-(
Super !
Thanks!
I have one more use case. How to implement that one? I can't change the electrical installation in my rented apartment. So, many tradfri bulbs are connected to old fashioned physical light switches. However, I still want to implement a night mode. Meaning the bulbs must have 2200k light temperature during night. E.g. can I get an event once a bulb is turned on in order to switch its light color?
I think I changed color from cool white to warm white somewhere in the video. It is possible
I see that the TRADFRI node has the same problem as the Hue ones, the bulb (or function) is fixed by the setting in the node. If this is similar to the Hue node it can be very useful to pass the bulb identity into the node through the 'topic' functionality. This allows the node to operate for multiple bulbs (using the split node) and then to use a database to store scenes. It was quite easy to modify the Hue node for this (but a whole lot harder to get the change adopted into the original node).
You do not need to set the bulb in the node. One setting is, that you can select the bulb from the payload and it works.
Thanks Andreas, my NodeRed install is currently broken and I didn't get a chance to look at the node detail, just what was in the video. When I do get it back I might align my modified Hue node with the TRADFRI one and then I can create scenes with a mix of bulb types without too much different setting up!
Interesting as always! do you know if it's possible to pair other non-ikea zigbee products with the gateway?
I read somewhere, that with the current firmware, it is not yet possible (Philips Hue)
first of all very nice work, i learn so much today... thanks very much.... second - this bulbs are safe iin long term use? alternatives?
I hope, that IKEA knows what they do and passed the necessary tests. I think, Philips Hue is the big competitor. But now also some Chinese manufacturers join the party.
Everything is Chinese, they rule the world :). Philips hue It's a bit expensive, The problem is the durability of the equipment, I do not mind spending more but having a longer durability.
Change 1 lamp every 4 years, I think it's acceptable
Thank you, this is very interesting, I made a home automation system with Futlight RF lamps and zigbee/RF roomcontrollers, but after this video I would like to replace the RF bulbs from Futlight by the Ikea ones. I just wonder now how to control groups of Ikea lamps and the color of the lamps. These lamps can listen to group commands? Did someone crack the full protocol allready ? The Ikea lamps work as zigbee routers? Can the Ikea gateway be controlled by ESP32 also? Thanks again.
There is a newer video about Zigbee and I plan a third one in the near future focusing more on Mesh networks.
nice project again. I did the same with the Philips HUE. I am curious what the get returns with tradfri when the lamp is switch off from main. Is it the same on/off parameter?
Can you rephrase your question, please? I do not understand it.
Andreas Spiess I mean, what does the get request get as an answer when a light is not powered on. The Philips HUE API has an parameter reachable for that. I was wondering how this is in Tradfri.
Hi Andreas, I’m working with the Tradfri stuff now for more than a year in combination with Node-Red. Control the light bulbs isn’t a problem. I’m able to switch them on and off and I’m able to read the status. But my problem are the switches. The plugs. Also here switching them on and of using Node-Red works perfectly. But....... I’m not able to read the status!. Do you have a solution to achieve this using Nod-Red?
For Zigbee I use now zigbee2mqtt, but I have no IKEA plugs in my home. I also made a newer video about zigbee.
The god part about the app is that you can make some automation.
Short commings of the app is the timer control are primitive.
Another problems is that the bulbs are organized around one controller. So you can only put one controller to control a group of bulbs, so a controller on each side of stairs are not possible.
And yes, there are a movement detector in Trådfri, which can work as a controller.
With the protocol, one can detect the controlers and through that control other groups.
One good thing with CoAP, there are support for updating firmware in devices.
I saw the controller in the discovery, but had no use for that so far. It also switches the lamps and you can read the status of the lamps to get the status of the controller (without toggle).
I do not own a movement detector, but assume, it works like the remote control directly to the bulb. This is why I do not like it. My movement sensors go to node red, where I can do some logic before I switch the bulbs.
I just checked the answer for the remote control: It was always "on:false" in node red. I assume, its message is not stored in the gateway. Do you know a trick?
Great series! One question though: if I understand correctly, the same bulb can be operated both with the remote switch and the gateway. I'm curious if it's possible to receive remote switch events through the gateway? That is: if I switch on/off or dim the bulb with the remote control, would I be able to receive these events through the gateway with a computer? Thx!
The take of this video was done a long time ago, so I do not remember the details. And I did not do anything with this technology since then. But I think, there is more stuff on the internet now than was available then. Maybe you find your answer by googling.
I'll probably do that. Thanks anyway.
The flow won't import for me which suggests a parsing error. Could it be it needs updating since the tradfri node was updated with the new username authentication in the latest tradfri firmware update?
I did not try with the new version so I cannot help. Maybe somebody else knows it?
90°C is quite hot, hope it doesn't melt some lamps. on the other side you get an extra heat source in your house. Funny to see secure coap is used while zigbee can be hacked quite easy.
3D Gussner Compared to an ordinary tungstone bulb, 100 degrees Celsius are not hot.
The Gateway is connected to internet, but zigbee isn't. That is why you want encrypted communication with the Gateway, so others can't capture the user and password.
Personally, I think, 90 degrees (and some parts inside must be even hotter) is not good for electronic parst on the long run. We will see how many of these bulbs have to be replaced by IKEA during warranty period...
Again an interesting and useful video, Andreas, thanks. Will you dive deeper into the "hot" secret? LED bulbs were introduced as an energy saver, but I guess a lot of energy is now wasted due to a cheap but inefficient power converter...?
That would be great.
The glass bulb of an ordinary incandescent bulb can reach temperatures between 200 and 260 °C, so 90°C will not melt anything. Very few plastics melt at below 100 degrees (think of boiling water, in a plastic cup)
Is this video not useable anymore? I need to specify a "App Identity" in the tradfri config node.. Cant get it done.
It is old and I am sure things changed
Great series, will test myself. One concern is that it looks like the gateway and controllers can only control 10 devices. Will your hack expand this limit. If not how are one supposed to use this system without going mad with limitations.? More gateways?
I was not aware of this limitation. So, I assume, with different gateways. Might anyway be necessary because of the limited reach of Zigbee
I'm wondering if it's possible to hack my whole system so that my orginal switches doesn't power off the bulbs but just send an mqtt message to node-red. This way I could keep using also my original switches. Do you think it can be practical?
I do not know. I only did the investigations shown in this video.
Hi Andreas, thanks a lot for your effort, much appreciated. After connecting the Tradfri Gateway to Node-RED, I'm wondering whether there's a way to receive events, for example from the remote control. Maybe you could point me to the right direction, I'd happily implement an Input Node for node-red-contrib-tradfri. Thanks in advance.
From what I saw, you can read the status of the remote only if you read the status of the bulbs, which were switched by the remote. But I did not invest a lot of time in this matter...
There is a feature request for an observer in the node-red palette: github.com/nidayand/node-red-contrib-tradfri/issues/8 .
Let's hope that somebody will implement its...
The IKEA tradfri node isnt working since the hub updated few days ago, any updates ?
the node was just updated :)
If you're using Node-red, there is an update to node-red-contrib-tradfri available now. My experiences with Trådfri is here: myconnectedthings.blogspot.se/2017/10/ikea-had-20-off-for-tradfri-products.html
Good Luck!
Very interesting ! Where do you find all the time to do all this and produce these videos ?
In the 24h we all get. However, I have a few advantages: I do no more need to care about my kids, I do not work full-time anymore, I have some basic knowledge which helps, and I had to learn quickly in my whole professional life... And of course, my curiosity helps also a lot.
I understand you completely. Yes, too bad there are only 24h in a day. I on the other hand still work full time (very full time) and I'm also very, VERY curious, since child hood. Also have to take care of household things....
90 dgr. C makes me curios how the PS in these lamps is constructed. Most probably cheap eastern crap that may have a short limited lifetime of only a few years. Subjecting most plastic to >90 dgr. C tends to wear them out(become brittle) in hurry.
Can the lamps 'power converters' be improved with hacking/modding to the power supply?
Can they be accessed/opened without breaking?
As always thanks for another great one.
+Nicklas Persson These were my thoughts when I discovered this. I thin, IKEA has a problem here. Some of the parts inside must have an even higher temperature and will be dead soon. Fortunately, the consumer has a warranty... And IKEA has to learn electronics...
Hey very cool tutorial! Do you also do videos in german? asking for my dad.
No, only in English. I still search for somebody who translates my scripts into German subtitles ;-)
Is it so that communication between the IKEA Trådfri gateway and the lamps goes thru the remote? In other words, the gateway cannot operate the lamps alone?
+jesuschal I do not think. However, you need the remote to pair the bulbs. Which is ok, because the remote is portable, the Gateway usually not...
From the Ikea.com (www.ikea.com/ms/en_US/customer-service/about-our-products/smart-lighting/troubleshooting.html)
I connected my light source to the TRÅDFRI Gateway by using my remote control. Do I need the remote control anymore or can I just use the TRÅDFRI App?
You can steer your lights without the remote control if you disconnect the steering device from the Gateway after you have used it to pair your light sources. However, if you decide later on to add more light sources to your system, you will need a steering device again.
So, it is, as I suspected...
grüezi wohl, das muess i in agriff näh wenn i wieder spatzig zit han. merci für s'video
Es gibt noch ein neueres Video über diese Leuchten
Someone stated (comments of the make article) that the used electrolyte condensators have a lifetime of 10000 hours at 105°C. Am I wrong if I assume that the bulb is likely to die within 1.5 years?
Probably not...
Maybe they used solid electrolyte (polymer) caps.
Don't forget the Pete Scargill script has HA bridge in it for Node-red too. Now all I need is an Alex dot. Anyone got a spare not being used? By the way Andreas I have to go that 17 km trip Tuesday, which you may me laugh with the last episode you did.
1. For the moment, I use Node-Red only. But it is always good to know that there are other possibilities...
2. Enjoy the ride! And don't buy too much ;-)
Why using the actual MC of the Tradfri ? And not just jumping the button connector ? It seems a bit over productive to hookup to the MC, while using power for RF and other routine, and another MC, compare to jump buttons directly ?
It is up to you what you want to do. Some people want to automate their lighting.
Best part is you can use this hack parallel with stock remote..I prefer to have a physical button than a touch screen /app...90C thats a lot of power loss..ikea should use more efficient drivers
You can also create a physical MQTT button using an ESP8266 (I made a video about that) ;-)
hi Andreas, is t possible to upgrade this nice howto cause atm its not working for me?
Greeting from Austria!!
I made two additional Zigbee videos where I used the IKEA bulbs. I do not plan to go back to this solution.
@@AndreasSpiess is there a way to get it working again? was it a change from ikea?
@@TheRowie75 I do not know because I never used it since then
@@AndreasSpiess so what is the best way to control my ikea stuff from a pc or other device then the ikea app over wifi? I have some raspberry pi zeros and a 2 and a 3+ raspberry with touch, a ninja block and a ninja sphere. :-)
As I wrote, maybe you watch my Zigbee videos and then decide.
Hallo Andreas,
Weil sind wir im gleiches Land (aber bin ich im West, mein Deutsch ist nicht sehr gut), habe ich ein Wunsch. Haben Sie schon ein FB von swisscom versucht zu Hack (es ist nicht IR aber Radio bluetooth oder ???) ?
Danke
Gruss aus Genf
Bluewin TV
Non. Je ne suis pas un client Swisscom. J'utilize upc Cablecom.
FYI: You set your CoAP secret as "1234567890" in your examples, but in your command-line output, you can see the actual secret.
I got the hint already. Thanks. I think, it is not critical as the Gateway is behind my Firewall. But I have learned something (hopefully)
I would like to hack the ZigBee directly but the link is not there?
You are right. I forgot it. It is there now.
How many of this is now obsolete?
I feel unable to commit to big store solutions because you are totally dependent on their implementation.
Bulb breaks. You will need to pray the newer bulbs are identical or spend time coding simply to replace a bulb.
Most is obsolete. IKEA uses Zigbee and we can now use Zigbee2MQTT (as shown in other videos) to control them. This is an accepted standard.
@@AndreasSpiess Many Thanks! I will google around on your UA-cam for your search terms 🙂
Many Thanks
1st?
Just came across this project github.com/Koenkk/zigbee2mqtt, maybe interesting for those who don't want to use the Ikea bridge for programming/controlling bulb behaviour
Thank you for the link!
I'm sorry to rain on your parade, but besides the glorification of NodeRed and Scargill's scipt, where is an actual explanation how to use MQTT?
DragnDrop a box in NodeRed is not a solution for somebody who has a fully working MQTT server/setup with a bunch of nodes that send a bunch of metrics and is not really into playing with stuff in one's browser - so we need a real explanation how to use existing infrastucture to control Tradfri equipment.
That explanation should give some suggestions and examples of:
- how to install/configure an MQTT server/broker of choice (Mosquitto for example)
- how to install/configure a COAP server of choice (from libcoap for example)
- how to send and receive COAP messages to/from Tradfri gateway
- how to recode them into MQTT messages and send/receive them to/from a certain MQTT topic
- how to use this new or existing MQTT server/broker with the rest of services
If I need to write my own message translator from COAP to MQTT and back, I'd rather do it in Python and have them run on dedicated hardware then use half of it's memory on silly NodeRed JavaScript interpreter which has no place outside of test lab...and for that, we need a better explanation of the whole setup than a picture of a bunch of interconnected colorful boxes in a browser.
So, can you digest this whole setup to a more basic/generic setup so that everyone can use any piece of software that does the job instead of relying on a specific one (like, libcoap vs raspbian coap client, whatever it is...)
Sorry if I sound harsh, but I'm really sick of insisting on Raspberry and NodeRed, as if nothing else exists and there's no other way to do simple stuff...
Thanks, Andrea
You are really harsh. This is not necessary, because a simple google search, together with a careful watching of my different videos about the topics MQTT, COAP and Tradfri Gateway would have helped you more than this post.
As I said, I am sorry if I sound harsh, but just let's get it straight - it is not directed at you personally, but in general toward the whole community which forces NodeRed and Javascript down everybody's throat because everyone is too lazy to program a proper code that does one thing as simple as possible - and does not require too much memory and cpu power.
On to the problem - yes, I did watch all of your MQTT, COAP and Tradfri videos, and I have learnt quite a few things from them, but still, everything is based on NodeRed.
Even more, all of the google searches somehow redirect to the same videos/setups...
If I try to find a set of "basic" components, stil I end up with heavyweight implementations or those that so few people understand and are able to maintain/modify.
So, while trying to find COAP to MQTT bridge/proxy/translator, search goes to Eclipse's Ponte NodeRed implementation, or one written in Erlang, and one written in Go (???) So when did python, perl and simple C/C++ go out of favor for simple and fast implemtations of a service? Is everybody blind to realize that NodeRed can not be implemented in soooo many types of hardware while regular MQTT broker, for example, will happily run on measle resources?
To note - I did find another implementation of the whole Tradfri setup that uses MQTT, but it is written in Java - can you imagine running the full JRE on a small resources device just to be able to turn a lightbulb on and off?
That is why I got so pissed and tried to get some info from you about using the basic components for the whole Tradfri setup and not installing NodeRed on every piece of hardware in my house - therefore, I still ask for help about how to use existing MQTT setup with Tradfri COAP implementation...
So you claim so much knowledge, yet haven't contributed. Others to do the investigations and you criticize them? Such conceit and arrogance. Come back when you give rather than take.
It is Trådfri, not Tradfri. :-)
You can also find the name of the gateway with avahi-discover. As the device show up with mDNS.
Notice, it is easy to listen and publish commands for the bulb thrugh MQTT or XMPP.
Astrality84 if he knows, why doesn't he get it right then? And yes, I know he knows it is Swedish, as he said in the video. And if you actually are concerned, why don't you let him answer, instead of starting a new discussion?
Anders Jackson As a viewer of Andreas' channel, I prefer him to put effort into the engineering part, an not the language part. If he doesn't have the keyboard for it, and his Swiss accent makes it hard to pronounce, then "Tradfri" is fine by me. We all know what he means, and we basically only care about the engineering part, so why make a big fuzz about this?
Martin Bøgelund what is it with you guys? Don't you know what a ":-)" sign means?
Are you trying to make a language discussion thread again. And the comment was not meant for you, so don't comment, if you are not seeking to try to make a quarrel thread. Gush, people!!!
I'm counting exactly 0 smileys in your answer to Astrality84, which was the comment I replied to... Read your answer again, and tell me that *I'm* the one who keeps quarreling, trying to drag Andreas into a pretty off-topic language discussion... Please just let it go!