It fine now! I kept you quite busy

Kind regards, Rob
Moderator: leecollings
Code: Select all
sudo apt-get install build-essential autoconf automake libtool
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
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
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'
Code: Select all
2019-05-08 21:14:05.825 Error: CConnection_connect, connect request from 'IKEA' ignored. Transport is connecting.
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'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.
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
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'
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
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)!
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)!
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
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.
Users browsing this forum: No registered users and 1 guest