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

Python and python framework

Moderator: leecollings

moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

flexx wrote: Wednesday 22 April 2020 9:09 Step 2:
sudo go get -v github.com/moroen/coapcmd

runtime/cgo
# runtime/cgo
exec: "gcc": executable file not found in $PATH
You're definitelymissing the gnu c compiler (gcc), and need to install it, or if installed, make sure it's in the $PATH of the sudo user.

There are precompiled binaries of coapcmd available for both arm6 and arm7 architectures available from github:
https://github.com/moroen/coapcmd/releases

You'll find it under assets!

Use uname -m to determine the version of the NAS processor, download the correct file and copy it into IKEA-tradfri/bin.

Then try ./bin/coapmd to make sure it works!

Regards,
M
flexx
Posts: 6
Joined: Tuesday 21 April 2020 17:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post by flexx »

thanks again for your help.
I does seem a gnu c compiler is not available on a NAS.

Manual option then:
1) uname-m --> armv71
2) downloaded the file " coapcmd-linux-armv7" for the assets folder (v0.1.2)
3) Used WinSCP to create a bin folder in the "/volume1/@appstore/domoticz/var/plugins/IKEA-Tradfri/" folder. Set filerights to allow everything
4) Used WinSCP to copy the coapcmd-linux-armv7 to /volume1/@appstore/domoticz/var/plugins/IKEA-Tradfri/bin"
5) ?

How to proceed from here? I tried running the install script again but that doesnt work (same error as before). It feels i'm missing a step after copying the file. The \bin folder currently just contain the " coapcmd-linux-armv7" file, nothing else.
flexx
Posts: 6
Joined: Tuesday 21 April 2020 17:13
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post by flexx »

i figured it out (with some help form my nice colleagues)

6) renamed the file from coapcmd-linux-armv7 to coapcmd
7) addedd execute rights (777)
8) sudo .bin/coapcmd now provides some output
9) proceed with python3 plugin.py config 192.168.x.y <key>
10) received OK status :)
11) sudo python3 plugin.py list outputs a list with all connected tradfri devices!

So it seems to work! :)

Thanx Moroen, for you patience and support!
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

flexx wrote: Wednesday 22 April 2020 14:58 i figured it out (with some help form my nice colleagues)

6) renamed the file from coapcmd-linux-armv7 to coapcmd
7) addedd execute rights (777)
8) sudo .bin/coapcmd now provides some output
9) proceed with python3 plugin.py config 192.168.x.y <key>
10) received OK status :)
11) sudo python3 plugin.py list outputs a list with all connected tradfri devices!

So it seems to work! :)

Thanx Moroen, for you patience and support!
I missed a crucial step in my instructions, your bullet point nr. 6: Copy the binary to bin and rename to coapcmd (coapcmd.exe on windows for future reference). Glad that you figured it out and glad that it finally works on your setup!

Regards,
M
User avatar
heggink
Posts: 977
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

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

Post by heggink »

Hey moroen,

Quick question and apologies if this has been answered before: does the plugin rely on a working internet connection with IKEA to function or will it function standalone?

Herman
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

heggink wrote: Tuesday 28 April 2020 13:36 Hey moroen,

Quick question and apologies if this has been answered before: does the plugin rely on a working internet connection with IKEA to function or will it function standalone?

Herman
The plugin comunicates only with the gateway, and thus only requires a network connection to the gateway. As far as I know, the IKEA gateway does not rely on a working internet connection for anything else than installing updates, so it should work without an internet connection. If it doesn't, the reason is the gateway, not the plugin.

Regards,
M
User avatar
heggink
Posts: 977
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

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

Post by heggink »

Understood. That then raises the question whether the phone app would work without an internet connection... Otherwise, one would always need physical switches to control lights...
EDIT: https://www.reddit.com/r/tradfri/commen ... _internet/ says no internet needed...
Thanks for the fast response.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

heggink wrote: Tuesday 28 April 2020 13:53 Understood. That then raises the question whether the phone app would work without an internet connection... Otherwise, one would always need physical switches to control lights...
EDIT: https://www.reddit.com/r/tradfri/commen ... _internet/ says no internet needed...
Thanks for the fast response.
Or just use the web-interface of domoticz on your phone... ;)

Regards,
M
redfirebrooks
Posts: 40
Joined: Sunday 07 January 2018 15:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by redfirebrooks »

Hello
I am facing issues after the last domoticz upgrade :

Code: Select all

pi@domoticz:~ $ sudo apt update; sudo apt upgrade
Atteint :1 https://download.docker.com/linux/raspbian stretch InRelease
Atteint :2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Atteint :3 http://archive.raspbian.org/raspbian jessie InRelease
Atteint :4 http://archive.raspberrypi.org/debian buster InRelease
Atteint :5 https://dl.yarnpkg.com/debian stable InRelease
Atteint :6 https://deb.nodesource.com/node_12.x stretch InRelease
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Tous les paquets sont à jour.
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
pi@domoticz:~ $ sudo -H pip3 install --upgrade setuptools
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: setuptools in /usr/local/lib/python3.7/dist-packages (46.4.0)
pi@domoticz:~ $ sudo -H pip3 install --upgrade pip
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: pip in /usr/local/lib/python3.7/dist-packages (20.1.1)
pi@domoticz:~ $ sudo -H pip3 install -U py3coap
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting py3coap
  Using cached py3coap-0.8.0.tar.gz (5.3 kB)
Building wheels for collected packages: py3coap
  Building wheel for py3coap (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_wyyg5sx/py3coap/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_wyyg5sx/py3coap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-6j3iw1u6
       cwd: /tmp/pip-install-_wyyg5sx/py3coap/
  Complete output (53 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.7
  creating build/lib.linux-armv7l-3.7/py3coap
  copying py3coap/errors.py -> build/lib.linux-armv7l-3.7/py3coap
  copying py3coap/__init__.py -> build/lib.linux-armv7l-3.7/py3coap
  copying py3coap/py3coap.py -> build/lib.linux-armv7l-3.7/py3coap
  running build_ext
  $ GOPATH=/tmp/tmphgxcnm8e go get -d
  package github.com/moroen/gocoap/v2: cannot find package "github.com/moroen/gocoap/v2" in any of:
  	/usr/lib/go-1.11/src/github.com/moroen/gocoap/v2 (from $GOROOT)
  	/tmp/tmphgxcnm8e/src/github.com/moroen/gocoap/v2 (from $GOPATH)
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-_wyyg5sx/py3coap/setup.py", line 22, in <module>
      scripts=["pycoap-client"],
    File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3/dist-packages/wheel/bdist_wheel.py", line 188, in run
      self.run_command('build')
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.7/dist-packages/setuptools/command/build_ext.py", line 87, in run
      _build_ext.run(self)
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/usr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/tmp/pip-install-_wyyg5sx/py3coap/.eggs/setuptools_golang-2.1.1-py3.7.egg/setuptools_golang.py", line 140, in build_extension
      _check_call(cmd_get, cwd=pkg_path, env=env)
    File "/tmp/pip-install-_wyyg5sx/py3coap/.eggs/setuptools_golang-2.1.1-py3.7.egg/setuptools_golang.py", line 97, in _check_call
      subprocess.check_call(cmd, cwd=cwd, env=dict(os.environ, **env))
    File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '('go', 'get', '-d')' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for py3coap
  Running setup.py clean for py3coap
Failed to build py3coap
Installing collected packages: py3coap
    Running setup.py install for py3coap ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_wyyg5sx/py3coap/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_wyyg5sx/py3coap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-d7798aoy/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/py3coap
         cwd: /tmp/pip-install-_wyyg5sx/py3coap/
    Complete output (55 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.7
    creating build/lib.linux-armv7l-3.7/py3coap
    copying py3coap/errors.py -> build/lib.linux-armv7l-3.7/py3coap
    copying py3coap/__init__.py -> build/lib.linux-armv7l-3.7/py3coap
    copying py3coap/py3coap.py -> build/lib.linux-armv7l-3.7/py3coap
    running build_ext
    $ GOPATH=/tmp/tmpw38award go get -d
    package github.com/moroen/gocoap/v2: cannot find package "github.com/moroen/gocoap/v2" in any of:
    	/usr/lib/go-1.11/src/github.com/moroen/gocoap/v2 (from $GOROOT)
    	/tmp/tmpw38award/src/github.com/moroen/gocoap/v2 (from $GOPATH)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-_wyyg5sx/py3coap/setup.py", line 22, in <module>
        scripts=["pycoap-client"],
      File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.7/dist-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.7/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.7/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.7/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.7/dist-packages/setuptools/command/build_ext.py", line 87, in run
        _build_ext.run(self)
      File "/usr/lib/python3.7/distutils/command/build_ext.py", line 340, in run
        self.build_extensions()
      File "/usr/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
        self._build_extensions_serial()
      File "/usr/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
        self.build_extension(ext)
      File "/tmp/pip-install-_wyyg5sx/py3coap/.eggs/setuptools_golang-2.1.1-py3.7.egg/setuptools_golang.py", line 140, in build_extension
        _check_call(cmd_get, cwd=pkg_path, env=env)
      File "/tmp/pip-install-_wyyg5sx/py3coap/.eggs/setuptools_golang-2.1.1-py3.7.egg/setuptools_golang.py", line 97, in _check_call
        subprocess.check_call(cmd, cwd=cwd, env=dict(os.environ, **env))
      File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '('go', 'get', '-d')' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_wyyg5sx/py3coap/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_wyyg5sx/py3coap/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-d7798aoy/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/py3coap Check the logs for full command output.

Code: Select all

pi@domoticz:~/pycoap $ sudo -H python3 setup.py install
Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    from setuptools import Extension
ModuleNotFoundError: No module named 'setuptools'
Version: 2024.1
Build Hash: 5279c8261
Compile Date: 2024-01-01 12:59:22
dzVents Version: 3.1.8
Python Version: 3.9.2
Raspbian Bullseye
Raspberry3B+
RFLINK R48.4
User avatar
sancla
Posts: 105
Joined: Wednesday 01 January 2020 23:01
Target OS: -
Domoticz version:
Contact:

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

Post by sancla »

Edit: wrong translation, French is definitely not my mother language...
Check these howto's: https://sancla.com
redfirebrooks
Posts: 40
Joined: Sunday 07 January 2018 15:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by redfirebrooks »

sancla wrote: Wednesday 27 May 2020 19:23 Given that apt update and upgrade does not work, could this be related to your network settings?
And to be more specific, your DNS settings?
update and upgrade are working correctly
Version: 2024.1
Build Hash: 5279c8261
Compile Date: 2024-01-01 12:59:22
dzVents Version: 3.1.8
Python Version: 3.9.2
Raspbian Bullseye
Raspberry3B+
RFLINK R48.4
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

redfirebrooks wrote: Wednesday 27 May 2020 18:45 Hello
I am facing issues after the last domoticz upgrade :

Code: Select all

pi@domoticz:~/pycoap $ sudo -H python3 setup.py install
Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    from setuptools import Extension
ModuleNotFoundError: No module named 'setuptools'
Installing setuptools again should do the trick:

Code: Select all

$ sudo pip3 install -U pip setuptools
Regards,
M
redfirebrooks
Posts: 40
Joined: Sunday 07 January 2018 15:36
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by redfirebrooks »

Hi,

Code: Select all

pi@domoticz:~ $ sudo pip3 install -U pip setuptools

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: pip in /usr/local/lib/python3.7/dist-packages (20.1.1)
Requirement already up-to-date: setuptools in /usr/local/lib/python3.7/dist-packages (46.4.0)

pi@domoticz:~ $ cd ~/pycoap

pi@domoticz:~/pycoap $ sudo -H python3 setup.py install

Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    from setuptools import Extension
ModuleNotFoundError: No module named 'setuptools'
I installed coapcmd instead. it works but the responses of my IKEA switches are slow, Its took 5 to 10 secs to update the status in domoticz
Version: 2024.1
Build Hash: 5279c8261
Compile Date: 2024-01-01 12:59:22
dzVents Version: 3.1.8
Python Version: 3.9.2
Raspbian Bullseye
Raspberry3B+
RFLINK R48.4
User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

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

Post by felix63 »

I have identified a very annoying problem.

My config:
Domoticz Version: 2020.2 running on RPi 3+ with the following plugins:
- IKEA-Tradfri (version 0.9.1)
- Synology
- Mi-Flora

ATV as Homekit Hub
Philips Hue bridge
Raspberry PI's with all kinds of smart stuff connected
Homebridge v1.1.1 with the following plugins:
- Homebridge Config UI X
- Homebridge Camera FFmpeg
- Homebridge Ring
- Homebridge Samsung Tizen
Hoobs v3.2.6
- Homebridge Alexa
- Homebridge eDomitcz

I also have an Ikea Trådfri. When I start the Trådfri the connection between Homebridge & Hoobs to Homekit is lost. I can verify this using Discovery monitoring Bonjour traffic. Both Homebridge and Hoobs are running normally and show no error messages. When I unplug the Trådfri Homebridge communication is restored. But does this mean I have to dump my Trådfri?

I found that when I deactivate the IKEA Tradfri Plugin connectivity is restored. So what's happening and more importantly (well, not really) can it be fixed? For now I am relieved that I have finally found something and that my IKEA Trådfri is not a write off... but at a certain point I will want to see the IKEA devices in my Domoticz setup!
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

felix63 wrote: Wednesday 01 July 2020 16:08 I have identified a very annoying problem.

My config:
Domoticz Version: 2020.2 running on RPi 3+ with the following plugins:
- IKEA-Tradfri (version 0.9.1)
- Synology
- Mi-Flora

ATV as Homekit Hub
Philips Hue bridge
Raspberry PI's with all kinds of smart stuff connected
Homebridge v1.1.1 with the following plugins:
- Homebridge Config UI X
- Homebridge Camera FFmpeg
- Homebridge Ring
- Homebridge Samsung Tizen
Hoobs v3.2.6
- Homebridge Alexa
- Homebridge eDomitcz

I also have an Ikea Trådfri. When I start the Trådfri the connection between Homebridge & Hoobs to Homekit is lost. I can verify this using Discovery monitoring Bonjour traffic. Both Homebridge and Hoobs are running normally and show no error messages. When I unplug the Trådfri Homebridge communication is restored. But does this mean I have to dump my Trådfri?

I found that when I deactivate the IKEA Tradfri Plugin connectivity is restored. So what's happening and more importantly (well, not really) can it be fixed? For now I am relieved that I have finally found something and that my IKEA Trådfri is not a write off... but at a certain point I will want to see the IKEA devices in my Domoticz setup!
I'm sorry, but I don't quite understand the issue. When you say "start the Trådfri", are you talking about starting the plugin in domoticz, or talking about the Ikea Tradfri Network Gateway? And likewise, when you say "unplug the Tradfri Homebridge", are you talking about the gateway?

If activating the plugin from domoticz is causing the connection from Homebridge and Hoobs to fail, what happens if you have the Ikea Tradfri Gateway connected to your network, disable the plugin, and then try to use the offical Ikea Tradfri app on your phone?

Regards,
M
User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

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

Post by felix63 »

I also have an Ikea Trådfri. When I start the Trådfri the connection between Homebridge & Hoobs to Homekit is lost. I can verify this using Discovery monitoring Bonjour traffic. Both Homebridge and Hoobs are running normally and show no error messages. When I unplug the Trådfri Homebridge communication is restored. But does this mean I have to dump my Trådfri?

I found that when I deactivate the IKEA Tradfri Plugin connectivity is restored. So what's happening and more importantly (well, not really) can it be fixed? For now I am relieved that I have finally found something and that my IKEA Trådfri is not a write off... but at a certain point I will want to see the IKEA devices in my Domoticz setup!
I'm sorry, but I don't quite understand the issue. When you say "start the Trådfri", are you talking about starting the plugin in domoticz, or talking about the Ikea Tradfri Network Gateway? And likewise, when you say "unplug the Tradfri Homebridge", are you talking about the gateway?

If activating the plugin from domoticz is causing the connection from Homebridge and Hoobs to fail, what happens if you have the Ikea Tradfri Gateway connected to your network, disable the plugin, and then try to use the offical Ikea Tradfri app on your phone?
I see that I missed out on a comma which makes it slightly confusing....

I also have an Ikea Trådfri. When I start the Trådfri the connection between Homebridge & Hoobs to Homekit is lost. I can verify this using Discovery monitoring Bonjour traffic. Both Homebridge and Hoobs are running normally and show no error messages. When I unplug the Trådfri, Homebridge communication is restored. But does this mean I have to dump my Trådfri?

To put it plainly: when I plug in the Tradfri gateway with the plugin active in Domoticz the connection between Homebridge and HomeKit disappears. Only the IKEA Gateway is reachable in HomeKit. The connection between HomeBridge and HomeKit is automatically re-established after a while when I unplug the Tradfri gateway.

If I do exactly the same once I've disabled the plugin in the hardware tab of Domoticz, all devices (Homebridge, Hoobs and IKEA Gateway) communicate with HomeKit. I can control all the devices connected to the Tradfri devices thru either HomeKit or the IKEA app. So for me it's something with the plugin that interferes with Bonjour traffic... Hope this clarifies. Happy to supply more details. Homebridge Logs will not help unfortunately. The register nothing wrong.
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

felix63 wrote: Wednesday 01 July 2020 23:11 I also have an Ikea Trådfri. When I start the Trådfri the connection between Homebridge & Hoobs to Homekit is lost. I can verify this using Discovery monitoring Bonjour traffic. Both Homebridge and Hoobs are running normally and show no error messages. When I unplug the Trådfri, Homebridge communication is restored. But does this mean I have to dump my Trådfri?

To put it plainly: when I plug in the Tradfri gateway with the plugin active in Domoticz the connection between Homebridge and HomeKit disappears. Only the IKEA Gateway is reachable in HomeKit. The connection between HomeBridge and HomeKit is automatically re-established after a while when I unplug the Tradfri gateway.

If I do exactly the same once I've disabled the plugin in the hardware tab of Domoticz, all devices (Homebridge, Hoobs and IKEA Gateway) communicate with HomeKit. I can control all the devices connected to the Tradfri devices thru either HomeKit or the IKEA app. So for me it's something with the plugin that interferes with Bonjour traffic... Hope this clarifies. Happy to supply more details. Homebridge Logs will not help unfortunately. The register nothing wrong.
Thank you for clarifying! So the connection from the plugin to the gateway somehow disrupts communication between homebridge and homekit? Not only for Ikea devices, but all devices connected via homebridge?

From the top of my head I have no idea why a simple UDP connection using the default COAPS port between the plugin and the Ikea Gateway disrupts communication between other network IPs and ports, unless the fact that the plugin keeps a persistent connection to the gateway has something to do with it... This was implemented to enable support for using the plugin in domoticz alongside HASS.

This warrants further investigation! I'll install homebride and try to see if I can figure this out...

Regards,
M
Jasper79
Posts: 85
Joined: Sunday 26 July 2020 8:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

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

Post by Jasper79 »

Hi,

I added my IKEA hub and I can turn the lights on and off. I wanted to make a script that when I turn on 1 ikea light it wil turn on a tuya light as well. This works only when turning on the IKEA from domoticz not when using the IKEA remote.

Can this be fixed?
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

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

Post by moroen »

Jasper79 wrote: Sunday 26 July 2020 11:03 Hi,

I added my IKEA hub and I can turn the lights on and off. I wanted to make a script that when I turn on 1 ikea light it wil turn on a tuya light as well. This works only when turning on the IKEA from domoticz not when using the IKEA remote.

Can this be fixed?
This can be fixed when the plugin supports observations and not just polling. It's a work in progress, and has been for quite a while, but due to the covid-19 pandemic, work on the plugin has been put on the back burner for a while.

Regards,
M
User avatar
heggink
Posts: 977
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

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

Post by heggink »

Hi Moroen,

Irregularly, the plugin gives an error on a heartbeat as follows:

Code: Select all

2020-08-06 12:19:27.840 Error: (IKEA) ----> Line 709 in '/home/pi/domoticz/plugins/IKEA-Tradfri/plugin.py', function onHeartbeat
2020-08-06 12:19:27.840 Error: (IKEA) ----> Line 665 in '/home/pi/domoticz/plugins/IKEA-Tradfri/plugin.py', function onHeartbeat
2020-08-06 12:19:27.841 Error: (IKEA) ----> Line 245 in '/home/pi/domoticz/plugins/IKEA-Tradfri/plugin.py', function indexRegisteredDevices
2020-08-06 12:19:27.841 Error: (IKEA) ----> Line 344 in '/home/pi/domoticz/plugins/IKEA-Tradfri/plugin.py', function updateDevice
2020-08-06 12:19:27.841 Error: (IKEA) ----> Line 320 in '/home/pi/domoticz/plugins/IKEA-Tradfri/tradfricoap/device.py', function get_device
2020-08-06 12:19:27.841 Error: (IKEA) ----> Line 45 in '/home/pi/domoticz/plugins/IKEA-Tradfri/tradfricoap/device.py', function __init__
2020-08-06 12:19:27.841 Error: (IKEA) ----> Line 348 in '/usr/lib/python3.7/json/__init__.py', function loads
2020-08-06 12:19:27.841 Error: (IKEA) ----> Line 337 in '/usr/lib/python3.7/json/decoder.py', function decode
2020-08-06 12:19:27.841 Error: (IKEA) ----> Line 355 in '/usr/lib/python3.7/json/decoder.py', function raw_decode
It doesn't impact functionality at all but just thought you may want to know. Anything I can do on my end to prevent these?

H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest