[REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Moderator: leecollings
-
- Posts: 137
- Joined: Thursday 01 January 2015 9:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi M.,
It fine now! I kept you quite busy . Thanks for your great plugin!
Kind regards, Rob
It fine now! I kept you quite busy . Thanks for your great plugin!
Kind regards, Rob
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi,
Would this work with XIAOMI MIJIA SENSOR. It seems to use Zigbee, but I’d want it to trigger when humidity gets to a certain level (for a shower to switch on a fan)
https://www.ebay.co.uk/itm/DOMOTICA-XIA ... 2749.l2649
Would this work with XIAOMI MIJIA SENSOR. It seems to use Zigbee, but I’d want it to trigger when humidity gets to a certain level (for a shower to switch on a fan)
https://www.ebay.co.uk/itm/DOMOTICA-XIA ... 2749.l2649
-
- Posts: 221
- Joined: Thursday 23 January 2014 12:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
In addition to the question about checking the value of a sensor, I found that it was necessary to run at the beginning (one for the instructions):
Code: Select all
sudo apt-get install build-essential autoconf automake libtool
-
- 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?
I know next to nothing about how zigbee actually works, buy I guess it would be possible to add some kind of support for this, provided it's at all possible to add it to the Ikea-gateway. As long as it's possible to to add it, and it shows up in the coap-api of the gateway, it might be possible to at least read the value of the sensor.nigels0 wrote: ↑Friday 05 April 2019 19:46 Hi,
Would this work with XIAOMI MIJIA SENSOR. It seems to use Zigbee, but I’d want it to trigger when humidity gets to a certain level (for a shower to switch on a fan)
https://www.ebay.co.uk/itm/DOMOTICA-XIA ... 2749.l2649
Thanks! I've updated the readme...nigels0 wrote: ↑Sunday 07 April 2019 13:08 In addition to the question about checking the value of a sensor, I found that it was necessary to run at the beginning (one for the instructions):Code: Select all
sudo apt-get install build-essential autoconf automake libtool
Regards,
M
-
- Posts: 23
- Joined: Monday 04 July 2016 23:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8805
- Location: Netherlands
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Hi, I don't know what caused my Domoticz-system to give the following problems (it was working perfectly before) but since a short time it is logging the following (maybe because I changed my router?):
2019-04-22 23:56:17.106 (Tradfri) Device has disconnected
2019-04-22 23:56:31.332 (Tradfri) Connected successfully to: 127.0.0.1
and this keeps repeating.
I've stopped te service and did a manual start and this is the output:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo systemctl stop ikea-tradfri
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.3 started (command line)!
Connected from IPv4Address(TCP, '127.0.0.1', 54634)
Data received: b'{"observe": "False", "pollinterval": "30", "action": "initGateway", "groups": "True"}'
Initializing gateway
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 205, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 211, in _dataReceived
rval = self.protocol.dataReceived(data)
File "tradfri.tac", line 90, in dataReceived
self.factory.initGateway(self, command)
File "tradfri.tac", line 366, in initGateway
self.devices = self.api(self.api(self.gateway.get_devices()))
File "/usr/local/lib/python3.5/dist-packages/pytradfri/api/libcoap_api.py", line 96, in request
return self._execute(api_commands, timeout=timeout)
File "/usr/local/lib/python3.5/dist-packages/pytradfri/api/libcoap_api.py", line 85, in _execute
raise RequestTimeout() from None
pytradfri.error.RequestTimeout:
Disconnected
Connected from IPv4Address(TCP, '127.0.0.1', 54636)
Data received: b'{"observe": "False", "pollinterval": "30", "action": "initGateway", "groups": "True"}'
Initializing gateway
------------
This keeps repeating.
Any advice would be welcome.
Regards,
Michel
2019-04-22 23:56:17.106 (Tradfri) Device has disconnected
2019-04-22 23:56:31.332 (Tradfri) Connected successfully to: 127.0.0.1
and this keeps repeating.
I've stopped te service and did a manual start and this is the output:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo systemctl stop ikea-tradfri
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.3 started (command line)!
Connected from IPv4Address(TCP, '127.0.0.1', 54634)
Data received: b'{"observe": "False", "pollinterval": "30", "action": "initGateway", "groups": "True"}'
Initializing gateway
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 103, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python3.5/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.5/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 205, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 211, in _dataReceived
rval = self.protocol.dataReceived(data)
File "tradfri.tac", line 90, in dataReceived
self.factory.initGateway(self, command)
File "tradfri.tac", line 366, in initGateway
self.devices = self.api(self.api(self.gateway.get_devices()))
File "/usr/local/lib/python3.5/dist-packages/pytradfri/api/libcoap_api.py", line 96, in request
return self._execute(api_commands, timeout=timeout)
File "/usr/local/lib/python3.5/dist-packages/pytradfri/api/libcoap_api.py", line 85, in _execute
raise RequestTimeout() from None
pytradfri.error.RequestTimeout:
Disconnected
Connected from IPv4Address(TCP, '127.0.0.1', 54636)
Data received: b'{"observe": "False", "pollinterval": "30", "action": "initGateway", "groups": "True"}'
Initializing gateway
------------
This keeps repeating.
Any advice would be welcome.
Regards,
Michel
-
- 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?
The adapter can't connect to the gateway. Are you sure the gateway have the same IP-address as before the change of the router? Can you ping the gateway from the computer running the adapter? If you have the correct IP and can ping the device, I would try to run the configure-script again, generating a new ident/psk-pair...Toolman wrote: ↑Tuesday 23 April 2019 0:02 Hi, I don't know what caused my Domoticz-system to give the following problems (it was working perfectly before) but since a short time it is logging the following (maybe because I changed my router?):
2019-04-22 23:56:17.106 (Tradfri) Device has disconnected
2019-04-22 23:56:31.332 (Tradfri) Connected successfully to: 127.0.0.1
and this keeps repeating.
I've stopped te service and did a manual start and this is the output:
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ sudo systemctl stop ikea-tradfri
pi@raspberrypi:~/domoticz/plugins/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.3 started (command line)!
---
pytradfri.error.RequestTimeout:
Disconnected
Connected from IPv4Address(TCP, '127.0.0.1', 54636)
Data received: b'{"observe": "False", "pollinterval": "30", "action": "initGateway", "groups": "True"}'
Initializing gateway
------------
This keeps repeating.
Any advice would be welcome.
Regards,
Michel
Regards,
M
-
- Posts: 23
- Joined: Monday 04 July 2016 23:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8805
- Location: Netherlands
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Thanks for the quick reply Moroen. The IP-address of the gateway hasn't changed and is reachable through ping.
I will run the config script again and see what happens. I'll let you know.
Michel
I will run the config script again and see what happens. I'll let you know.
Michel
-
- Posts: 23
- Joined: Monday 04 July 2016 23:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8805
- Location: Netherlands
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Updated the plugin folder and rerun the config-script. Still a problem. A liitle bit different from last time. The last couple of logging-lines:
--- <exception caught here> ---
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 205, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 211, in _dataReceived
rval = self.protocol.dataReceived(data)
File "tradfri.tac", line 100, in dataReceived
self.factory.initGateway(self, command)
File "tradfri.tac", line 214, in initGateway
if command['transitiontime'] == "":
builtins.KeyError: 'transitiontime'
--- <exception caught here> ---
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 205, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 211, in _dataReceived
rval = self.protocol.dataReceived(data)
File "tradfri.tac", line 100, in dataReceived
self.factory.initGateway(self, command)
File "tradfri.tac", line 214, in initGateway
if command['transitiontime'] == "":
builtins.KeyError: 'transitiontime'
-
- 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?
On the hardware page of domoticz, for the IKEA-tradfri plugin, make sure that the field "Transition time (tenth of a second):" is not empty and press update. I would guess you've updated from a previous version of the plugin, but haven't updated the settings in Domoticz...Toolman wrote: ↑Tuesday 23 April 2019 23:21 Updated the plugin folder and rerun the config-script. Still a problem. A liitle bit different from last time. The last couple of logging-lines:
--- <exception caught here> ---
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 205, in doRead
return self._dataReceived(data)
File "/usr/local/lib/python3.5/dist-packages/twisted/internet/tcp.py", line 211, in _dataReceived
rval = self.protocol.dataReceived(data)
File "tradfri.tac", line 100, in dataReceived
self.factory.initGateway(self, command)
File "tradfri.tac", line 214, in initGateway
if command['transitiontime'] == "":
builtins.KeyError: 'transitiontime'
Regards,
M
-
- Posts: 23
- Joined: Monday 04 July 2016 23:15
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V3.8805
- Location: Netherlands
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
Many thanks Moroen. The Transition Time wasn't visible in Domoticz for my Tradfri. Restarted Domoticz and it was visible, put in a value and now everything is working as it should.
Thanks again.
Regards,
Michel
Thanks again.
Regards,
Michel
- Varazir
- Posts: 360
- Joined: Friday 20 February 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I keep gett this
Anyone know why ?
I get this when I turn off the IKEA hardware /plugin
I have another domoticz running that works fine.
i'm working on setting up a new one.
Code: Select all
2019-05-08 21:14:05.825 Error: CConnection_connect, connect request from 'IKEA' ignored. Transport is connecting.
I get this when I turn off the IKEA hardware /plugin
Code: Select all
2019-05-08 21:17:39.559 (IKEA) Failed to connect to IKEA tradfri COAP-adapter! Status: 125 Description: Operation canceled
2019-05-08 21:17:39.560 (IKEA) Device has disconnected
I have another domoticz running that works fine.
i'm working on setting up a new one.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
Several IKEA devices/z-wave devices
- Dnpwwo
- Posts: 819
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
@Varazir,
The plugin framework will throw an error like that if you try to connect to something a 2nd time when the 1st request to connect to it has not completed yet. The fact that when you shut the plugin down the framework has to abort the in progress connection backs this up (although I haven't looked at the plugin code).
There are only a couple of things that I can think of that would cause this:
The plugin framework will throw an error like that if you try to connect to something a 2nd time when the 1st request to connect to it has not completed yet. The fact that when you shut the plugin down the framework has to abort the in progress connection backs this up (although I haven't looked at the plugin code).
There are only a couple of things that I can think of that would cause this:
- DNS name resolution is taking a long time (can take up to 30 seconds). Are you using a name or an IP address? If this is a new machine DNS may not be working properly.
- Is there a firewall on your network? Firewalls tend to 'drop' connection requests they don't like 'silently' i.e. they don't inform the requester which can make them wait a long time.
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
- Varazir
- Posts: 360
- Joined: Friday 20 February 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I'm using IP and I can ping it from the RPi.Dnpwwo wrote:@Varazir,
The plugin framework will throw an error like that if you try to connect to something a 2nd time when the 1st request to connect to it has not completed yet. The fact that when you shut the plugin down the framework has to abort the in progress connection backs this up (although I haven't looked at the plugin code).
There are only a couple of things that I can think of that would cause this:
- DNS name resolution is taking a long time (can take up to 30 seconds). Are you using a name or an IP address? If this is a new machine DNS may not be working properly.
- Is there a firewall on your network? Firewalls tend to 'drop' connection requests they don't like 'silently' i.e. they don't inform the requester which can make them wait a long time.
No firewall on LAN.
Skickat från min Nokia 7 plus via Tapatalk
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
Several IKEA devices/z-wave devices
-
- 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?
The timeout might be happening in the adapter, to make sure the adapter can communicate with the gateway, try a dry-run:Varazir wrote: ↑Thursday 09 May 2019 6:56I'm using IP and I can ping it from the RPi.Dnpwwo wrote:@Varazir,
The plugin framework will throw an error like that if you try to connect to something a 2nd time when the 1st request to connect to it has not completed yet. The fact that when you shut the plugin down the framework has to abort the in progress connection backs this up (although I haven't looked at the plugin code).
There are only a couple of things that I can think of that would cause this:
- DNS name resolution is taking a long time (can take up to 30 seconds). Are you using a name or an IP address? If this is a new machine DNS may not be working properly.
- Is there a firewall on your network? Firewalls tend to 'drop' connection requests they don't like 'silently' i.e. they don't inform the requester which can make them wait a long time.
No firewall on LAN.
Skickat från min Nokia 7 plus via Tapatalk
Code: Select all
$ python3 tradfri.tac --dryrun
M
- Varazir
- Posts: 360
- Joined: Friday 20 February 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I get thismoroen wrote: ↑Thursday 09 May 2019 21:35
The timeout might be happening in the adapter, to make sure the adapter can communicate with the gateway, try a dry-run:
Regards,Code: Select all
$ python3 tradfri.tac --dryrun
M
Code: Select all
IKEA-tradfri COAP-adaptor version 0.8.8 started (command line)!
Initializing gateway
Transitiontime: 10
Adding light with ID: 65538
Adding light with ID: 65542
Adding light with ID: 65546
Adding light with ID: 65540
Adding light with ID: 65539
Adding light with ID: 65543
Adding light with ID: 65537
Adding light with ID: 65544
Device settings not found for TRADFRI bulb GU10 W 400lm. Creating defaults!
{"action": "getLights", "result": [{"Dimmable": true, "HasRGB": false, "Name": "Taklampa Sovrum", "Type": "Light", "DeviceID": 65537, "HasWB": false}, {"Dimmable": true, "HasRGB": false, "Name": "Taklampa Hall", "Type": "Light", "DeviceID": 65538, "HasWB": false}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 1 Hall", "Type": "Light", "DeviceID": 65539, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 2 Hall", "Type": "Light", "DeviceID": 65540, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 3 Hall", "Type": "Light", "DeviceID": 65542, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 1 Tvrum", "Type": "Light", "DeviceID": 65543, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 2 Tvrum", "Type": "Light", "DeviceID": 65544, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 3 Tvrum", "Type": "Light", "DeviceID": 65546, "HasWB": true}], "status": "Ok"}
Announcing changed devices!
Failed to set state
Traceback (most recent call last):
File "tradfri.tac", line 441, in <module>
AdaptorFactory()).addErrback(error)
File "tradfri.tac", line 156, in __init__
self.setState(None, "65548", False)
File "tradfri.tac", line 405, in setState
client.transport.write(json.dumps(answer).encode(encoding='utf_8'))
AttributeError: 'NoneType' object has no attribute 'transport'
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
Several IKEA devices/z-wave devices
-
- 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?
The adapter communicates with the IKEA-gateway. The error is due to a bug, but it is irrelevant to your problem. So the problem is, in accordance with Dnpwwo's analysis, probably a timeout between domoticz and the adapter. I'll try to help you, but could you please try running the adapter from the command-line, and provide the output from the adapter and relevant parts of the domoticz log.Varazir wrote: ↑Thursday 09 May 2019 21:42I get thismoroen wrote: ↑Thursday 09 May 2019 21:35
The timeout might be happening in the adapter, to make sure the adapter can communicate with the gateway, try a dry-run:
Regards,Code: Select all
$ python3 tradfri.tac --dryrun
M
Code: Select all
IKEA-tradfri COAP-adaptor version 0.8.8 started (command line)! Initializing gateway Transitiontime: 10 Adding light with ID: 65538 Adding light with ID: 65542 Adding light with ID: 65546 Adding light with ID: 65540 Adding light with ID: 65539 Adding light with ID: 65543 Adding light with ID: 65537 Adding light with ID: 65544 Device settings not found for TRADFRI bulb GU10 W 400lm. Creating defaults! {"action": "getLights", "result": [{"Dimmable": true, "HasRGB": false, "Name": "Taklampa Sovrum", "Type": "Light", "DeviceID": 65537, "HasWB": false}, {"Dimmable": true, "HasRGB": false, "Name": "Taklampa Hall", "Type": "Light", "DeviceID": 65538, "HasWB": false}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 1 Hall", "Type": "Light", "DeviceID": 65539, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 2 Hall", "Type": "Light", "DeviceID": 65540, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 3 Hall", "Type": "Light", "DeviceID": 65542, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 1 Tvrum", "Type": "Light", "DeviceID": 65543, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 2 Tvrum", "Type": "Light", "DeviceID": 65544, "HasWB": true}, {"Dimmable": true, "HasRGB": false, "Name": "Spotlight 3 Tvrum", "Type": "Light", "DeviceID": 65546, "HasWB": true}], "status": "Ok"} Announcing changed devices! Failed to set state Traceback (most recent call last): File "tradfri.tac", line 441, in <module> AdaptorFactory()).addErrback(error) File "tradfri.tac", line 156, in __init__ self.setState(None, "65548", False) File "tradfri.tac", line 405, in setState client.transport.write(json.dumps(answer).encode(encoding='utf_8')) AttributeError: 'NoneType' object has no attribute 'transport'
Code: Select all
$ sudo systemctl stop ikea-tradfri
$ python3 tradfri.tac
M
- Varazir
- Posts: 360
- Joined: Friday 20 February 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
I get nothing when running that command, just a blank linemoroen wrote: ↑Friday 10 May 2019 10:45
The adapter communicates with the IKEA-gateway. The error is due to a bug, but it is irrelevant to your problem. So the problem is, in accordance with Dnpwwo's analysis, probably a timeout between domoticz and the adapter. I'll try to help you, but could you please try running the adapter from the command-line, and provide the output from the adapter and relevant parts of the domoticz log.
Regards,Code: Select all
$ sudo systemctl stop ikea-tradfri $ python3 tradfri.tac
M
Code: Select all
pi@zwave2:~/domoticz/IKEA-Tradfri $ python3 tradfri.tac
IKEA-tradfri COAP-adaptor version 0.8.8 started (command line)!
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
Several IKEA devices/z-wave devices
-
- 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?
The adapter is running and waiting for a connection from domoticz. What does the domoticz log show?Varazir wrote: ↑Friday 10 May 2019 13:22I get nothing when running that command, just a blank linemoroen wrote: ↑Friday 10 May 2019 10:45
The adapter communicates with the IKEA-gateway. The error is due to a bug, but it is irrelevant to your problem. So the problem is, in accordance with Dnpwwo's analysis, probably a timeout between domoticz and the adapter. I'll try to help you, but could you please try running the adapter from the command-line, and provide the output from the adapter and relevant parts of the domoticz log.
Regards,Code: Select all
$ sudo systemctl stop ikea-tradfri $ python3 tradfri.tac
M
I have symlinked the folder into the plugin folder so domoticz can see it but it shouldn't matter when running this command.Code: Select all
pi@zwave2:~/domoticz/IKEA-Tradfri $ python3 tradfri.tac IKEA-tradfri COAP-adaptor version 0.8.8 started (command line)!
Regards,
M
- Varazir
- Posts: 360
- Joined: Friday 20 February 2015 22:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: [REQUEST] Ikea Trådfri Gateway (smart lights hub controller) plugin?
moroen wrote: ↑Friday 10 May 2019 21:56The adapter is running and waiting for a connection from domoticz. What does the domoticz log show?Varazir wrote: ↑Friday 10 May 2019 13:22I get nothing when running that command, just a blank linemoroen wrote: ↑Friday 10 May 2019 10:45
The adapter communicates with the IKEA-gateway. The error is due to a bug, but it is irrelevant to your problem. So the problem is, in accordance with Dnpwwo's analysis, probably a timeout between domoticz and the adapter. I'll try to help you, but could you please try running the adapter from the command-line, and provide the output from the adapter and relevant parts of the domoticz log.
Regards,Code: Select all
$ sudo systemctl stop ikea-tradfri $ python3 tradfri.tac
M
I have symlinked the folder into the plugin folder so domoticz can see it but it shouldn't matter when running this command.Code: Select all
pi@zwave2:~/domoticz/IKEA-Tradfri $ python3 tradfri.tac IKEA-tradfri COAP-adaptor version 0.8.8 started (command line)!
Regards,
M
I didn't get it I should enable the plugin well here is logs with debug
Code: Select all
2019-05-10 22:49:15.521 (IKEA) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2019-05-10 22:49:15.521 (IKEA) Pushing 'PollIntervalDirective' on to queue
2019-05-10 22:49:15.522 (IKEA) Pushing 'ProtocolDirective' on to queue
2019-05-10 22:49:15.522 (IKEA) Pushing 'ConnectDirective' on to queue
2019-05-10 22:49:15.522 (IKEA) Processing 'PollIntervalDirective' message
2019-05-10 22:49:15.522 (IKEA) Heartbeat interval set to: 5.
2019-05-10 22:49:15.522 (IKEA) Processing 'ProtocolDirective' message
2019-05-10 22:49:15.522 (IKEA) Protocol set to: 'JSON'.
2019-05-10 22:49:15.522 (IKEA) Processing 'ConnectDirective' message
2019-05-10 22:49:15.522 (IKEA) Transport set to: 'TCP/IP', 172.0.0.1:1234.
2019-05-10 22:49:15.522 (IKEA) Connect directive received, action initiated successfully.
2019-05-10 22:49:15.191 Status: (IKEA) Stopping threads.
2019-05-10 22:49:15.191 Status: (IKEA) Stopped.
2019-05-10 22:49:15.191 Status: (IKEA) Started.
2019-05-10 22:49:15.517 Status: (IKEA) Entering work loop.
2019-05-10 22:49:15.517 Status: (IKEA) Initialized version 1.1.1, author 'moroen'
2019-05-10 22:49:25.519 (IKEA) Pushing 'onHeartbeatCallback' on to queue
2019-05-10 22:49:25.550 (IKEA) Processing 'onHeartbeatCallback' message
2019-05-10 22:49:25.550 (IKEA) Calling message handler 'onHeartbeat'.
2019-05-10 22:49:25.551 (IKEA) Not connected - nextConnect: 3
2019-05-10 22:49:30.520 (IKEA) Pushing 'onHeartbeatCallback' on to queue
2019-05-10 22:49:30.561 (IKEA) Processing 'onHeartbeatCallback' message
2019-05-10 22:49:30.561 (IKEA) Calling message handler 'onHeartbeat'.
2019-05-10 22:49:30.562 (IKEA) Not connected - nextConnect: 2
2019-05-10 22:49:35.521 (IKEA) Pushing 'onHeartbeatCallback' on to queue
2019-05-10 22:49:35.522 (IKEA) Processing 'onHeartbeatCallback' message
2019-05-10 22:49:35.522 (IKEA) Calling message handler 'onHeartbeat'.
2019-05-10 22:49:35.522 (IKEA) Not connected - nextConnect: 1
2019-05-10 22:49:35.523 Error: CConnection_connect, connect request from 'IKEA' ignored. Transport is connecting.
Raspberry PI 2 with RaZberry Controller 2016 ZWave+ and CC2531(zigbee)
Several IKEA devices/z-wave devices
Several IKEA devices/z-wave devices
Who is online
Users browsing this forum: No registered users and 1 guest