moroen / IKEA-Tradfri-plugin

A Python plugin for Domoticz to controll IKEA Gateway
68 stars 23 forks source link

plugin in combination with Domoticz not working #84

Closed MedicoreV8 closed 4 years ago

MedicoreV8 commented 4 years ago

Hi readers,

I had some problems with my Domoticz so I did a fresh install. I am running the latest version of Raspbian Buster on a RPi3B+ with Domoticz V4.10717 and Python v3.7.3

I have the plugin set-up in the hardware list of Domoticz and the lights are added to my dashboard. However, pressing them doesn't do a thing anymore (I managed to switch 1 light on directly after installing). In the domoticz log I get this: 2019-10-20 12:30:11.760 Status: User: Admin initiated a switch command (207/Woonkamer 1/Off)

Whenever I go into the virtual environment and issue tradfri off <id> the light turns off. I can switch the lights this way but I'd prefer using the Domoticz gui anyway..

Could anyone help me?

Edit* I ran tradfri -vv server and this seems to be the output when I try to switch on/off a light:

INFO:Received {"action": "setState", "state": "On", "deviceID": "65538", "transition_time": ""} from ('127.0.0.1', 49968) INFO:Calling refresh for device id: 65538 INFO:Sending: b'{"action": "setState", "status": "Ok", "result": [{"DeviceID": 65538, "Name": "woonkamer 1", "State": true, "Level": 165, "Type": "Light", "Dimmable": true, "Colorspace": "WS", "Hex": "f1e0b5"}]}' ERROR:Exception CancelledError() can not be represented as errno, setting -1.

moroen commented 4 years ago

As far as I can tell from that part of the log, everything looks to be all right?

"ERROR:Exception CancelledError() can not be represented as errno, setting -1" is from aiocoap, the state should switch anyway...

Are you able to switch a light on/off using the tradfri command line utility by itself?

Regards, M

MedicoreV8 commented 4 years ago

Yes I can switch the lights through the commandline. I even reinstalled the plugin, reset the Tradfri gateway, remote and lights just to make sure it wasn’t the light anyway.

I ran the plugin again just now and it does work.. for now. This is weird seeing as I don't recall changing anything since last night when it wasn't working, or maybe it was working and I was focussing too much on that aiocoap error. Anyway, I will leave it running during the day and check back to see if it keeps running...

moroen commented 4 years ago

Ok, feel free to reopen this issue if it still fails!