Page 24 of 48

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Tuesday 11 December 2018 7:37
by Involver
... thanks for your reply... I got an error stating 'please commit your changes'.. googled and found I had to discard changes (hard reset), then I got to pull the update. I guess I need to setup COAP again as the plugin shows connection errors in the log... Will try tonight after work...

Rgds,

David

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Tuesday 11 December 2018 18:23
by willhollis18
Hi - I have been trying to set this up for a little whilst but cannot get past the below error. Would really appreciate the forums help :-)!

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.6 started (command line)!
Couldn't listen on any:1234: [Errno 98] Address already in use.

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Tuesday 11 December 2018 19:13
by PieterKruithof
moroen wrote: Monday 10 December 2018 15:47 As for the 12 spotlights, you could combine them into one or more groups using the Ikea Tradfri app, and enable "Add groups as devices". You'll still end up with all the devices in the device-list, but you would also get ONE device that controls all the lights as if they were one. Then you'll able to add this single device to your switches-page..
Thanks Moroen, that works quite well for now! Even if there's only one light in a group, the group combines the light to one switch. Hopefully this feature will be supported in future.

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Tuesday 11 December 2018 20:17
by moroen
willhollis18 wrote: Tuesday 11 December 2018 18:23 Hi - I have been trying to set this up for a little whilst but cannot get past the below error. Would really appreciate the forums help :-)!

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.6 started (command line)!
Couldn't listen on any:1234: [Errno 98] Address already in use.
Either you have another service running that serves something on port 1234 (note to self: Really should change this to a higher port-number) or you already have a version of the coap-adapter running in the background. Have you enabled the service with systemd? If so, the adapter should already be running. You can test with:

Code: Select all

$ sudo systectl stop ikea-tradfri.service
$ python3 tradfri.tac
Regards,
M

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Tuesday 11 December 2018 21:15
by willhollis18
[/quote]

Either you have another service running that serves something on port 1234 (note to self: Really should change this to a higher port-number) or you already have a version of the coap-adapter running in the background. Have you enabled the service with systemd? If so, the adapter should already be running. You can test with:

Code: Select all

$ sudo systectl stop ikea-tradfri.service
$ python3 tradfri.tac
Regards,
M
[/quote]

Thanks for the quick reply. Now that seems to work but when I try below I get the below error despite getting the config created message (further below)

Code: Select all

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py –skip-config –create-service
Error: Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.

Code: Select all

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 192.168.0.72 xxx
Config created!

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Tuesday 11 December 2018 21:20
by moroen
willhollis18 wrote: Tuesday 11 December 2018 21:15
Either you have another service running that serves something on port 1234 (note to self: Really should change this to a higher port-number) or you already have a version of the coap-adapter running in the background. Have you enabled the service with systemd? If so, the adapter should already be running. You can test with:

Code: Select all

$ sudo systectl stop ikea-tradfri.service
$ python3 tradfri.tac
Regards,
M
[/quote]

Thanks for the quick reply. Now that seems to work but when I try below I get the below error despite getting the config created message (further below)

Code: Select all

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py –skip-config –create-service
Error: Failed to generate ID/PSK-pair.
Check that the IP and Master Key is correct.

Code: Select all

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py 192.168.0.72 xxx
Config created!
[/quote]

It's double dashes: --skip-config --create-service, rather than -skip-config... :)

Regards,
M

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Tuesday 11 December 2018 21:27
by willhollis18

It's double dashes: --skip-config --create-service, rather than -skip-config... :)

Regards,
M
Duh.. Thanks that worked now :D

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Friday 14 December 2018 13:40
by Varazir
Dose this have high CPU/Mem uses ?
Should I install it on another pi?

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Friday 14 December 2018 13:45
by heggink
Not with me. Notice a few more %%s but probably more due to another python plugin.

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Thursday 20 December 2018 13:08
by tjabas
Hi!

i have bought the ikea gateway and i have some rgb bulbs as well.
is it possible to change color on the bulbs with this plugin?
is there an easy way to install this on the raspberry pi?

i have looked at this thread and it seems that it is many things that need to be installed to get it to work, and im not that good at programming,

thanks.

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Thursday 20 December 2018 15:10
by moroen
tjabas wrote: Thursday 20 December 2018 13:08 Hi!

i have bought the ikea gateway and i have some rgb bulbs as well.
is it possible to change color on the bulbs with this plugin?
is there an easy way to install this on the raspberry pi?

i have looked at this thread and it seems that it is many things that need to be installed to get it to work, and im not that good at programming,

thanks.
The plugin supports setting the predefined colors (same as the Ikea app) of RGB-bulbs. At the moment the plugin is a bit non-trivial to set up, I'm constantly trying to make the install easier. If you follow the steps in the readme closely, and use sudo when installing pytradfri etc, you should be ok, the biggest hurdle is making sure that you have python version 3.5 or higher installed...

Feel free to ask any questions here in the thread or send me a PM if you run into trouble!

Regards,
M

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Thursday 20 December 2018 15:47
by tjabas
Thank you for the quick reply, i now use deconz but i miss the option to change the color of the bulb, so i think that i will give it a try with the trådfri gateway.

do i need to have som bulbs connected to the ikea gateway for it to be shown in domoticz, or will the gateway be visible in domoticz anyway?

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Thursday 20 December 2018 20:37
by moroen
tjabas wrote: Thursday 20 December 2018 15:47 Thank you for the quick reply, i now use deconz but i miss the option to change the color of the bulb, so i think that i will give it a try with the trådfri gateway.

do i need to have som bulbs connected to the ikea gateway for it to be shown in domoticz, or will the gateway be visible in domoticz anyway?
You need to have at least one device (bulb, socket or led-driver) added to the IKEA-gateway before starting the plugin. Only devices added to the gateway are shown, there is no entry for the gateway itself.

Regards,
M

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Sunday 23 December 2018 14:49
by dzjr
hi @moroen, I saw on the github that the LED drivers have not been tested, I have two built into an existing lamp, and I can control them via the plugin!

So the IKEA Tradfri LED drivers also work with the plugin!

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Sunday 23 December 2018 18:18
by moroen
dzjr wrote: Sunday 23 December 2018 14:49 hi @moroen, I saw on the github that the LED drivers have not been tested, I have two built into an existing lamp, and I can control them via the plugin!

So the IKEA Tradfri LED drivers also work with the plugin!
Thank you for the info. I've updated the readme! :)

Regards,
M

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Saturday 05 January 2019 23:05
by Varazir
Edit: all works ok now :)

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Wednesday 09 January 2019 23:03
by DiSrUpTeR
Hi,

thanx all for the info in this tread.
did a new fresh install, with some problems regarding the ./configure.py <ip> <key> part.
but in the end got it to work.made some notes and did again a new/fresh install on an other pi, and made some changes
to the list of commands form Thijs.
this way it worked second time without any errors.

SD Card preparation:
1. Flash SD with Raspbian Lite
2. Start up with screen and keyboard and login.
On terminal:
raspi-config
Set wifi, date, country, timezone, keyboard, enable ssh / serial / spi , reset password

reboot and login

1. sudo apt-get update
2. sudo apt-get upgrade
2.1 cd /etc
2.2 ls check for pythonX.X folder (should be python2.7)
2.3 sudo apt-get remove python2.7 (just to be sure)
3. sudo apt-get install python3-pip autoconf libtool
3.1 sudo reboot
4. curl –L install.domoticz.com | sudo bash
5. cd /home/pi/domoticz/plugins
6. git clone https://github.com/moroen/IKEA-Tradfri-plugin.git IKEA-Tradfri
7. cd IKEA-Tradfri
8. bash ./install-coap-client.sh
9. pip3 install pytradfri
10. sudo pip3 install twisted
11. pip3 install service-identity
11. sudo reboot
12. ./configure.py --debug <IP adres tradfri hub> <security KEY on rear of hub>
13. python3 tradfri.tac
14. ./configure.py –-skip-config –-create-service
15. sudo cp ikea-tradfri.service /etc/systemd/system
16. sudo systemctl daemon-reload
17. sudo systemctl start ikea-tradfri.service
18. sudo systemctl enable ikea-tradfri.service
19. Sudo reboot
20. Add ikea tradfri in hardware
20.1 toggle: Observe changes to yes

hope it can help someone...
thanx for the help

regards
Mark

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Thursday 10 January 2019 16:03
by moroen
DiSrUpTeR wrote: Wednesday 09 January 2019 23:03 Hi,

thanx all for the info in this tread.
did a new fresh install, with some problems regarding the ./configure.py <ip> <key> part.
but in the end got it to work.made some notes and did again a new/fresh install on an other pi, and made some changes
to the list of commands form Thijs.
this way it worked second time without any errors.
Thanks for the great write-up, I'll add it to the readme if that's ok with you?

Regards,
M

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Monday 14 January 2019 13:59
by DiSrUpTeR
Thanks for the great write-up, I'll add it to the readme if that's ok with you?
no problem, where here to help

Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?

Posted: Thursday 17 January 2019 22:41
by pvdgulik
Dank voor deze installatiehandleiding.
Ik loop alleen helaas vast met : na stap 12. ./configure.py --debug <IP adres tradfri hub> <security KEY on rear of hub>
Ik moet iig eerst na stap 11 het volgende invoeren: cd ./domoticz/plugins/IKEA-Tradfri
Dan kan ik stap 12 uitvoeren, maar krijg een foutmelding.

pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ ./configure.py --debug 192.168.1.*** ***-**-***
Traceback (most recent call last):
File "./configure.py", line 43, in <module>
psk = api_factory.generate_psk(args.key)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 164, in generate_psk
self._psk = self.request(Gateway().generate_psk(existing_psk_id))
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 96, in request
return self._execute(api_commands, timeout=timeout)
File "/home/pi/.local/lib/python3.5/site-packages/pytradfri/api/libcoap_api.py", line 85, in _execute
raise RequestTimeout() from None
pytradfri.error.RequestTimeout
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $

Wat doe ik fout?

Alvast bedankt!

Pieter