Python Plugin: NUKI locks

Python and python framework

Moderator: leecollings

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

Python Plugin: NUKI locks

Post by heggink »

If anyone is interested to test drive the nuki lock plugin then please find it at https://github.com/heggink/domoticz-nuki

I am pretty sure that not all branches in the code have been tested especially since I own to bridges where both bridges have a single lock (due to the distance between the locks in relation to Bluetooth comms between lock and bridge). The plugin 'should' support multiple locks per bridge but I cannot easily test that without creating a bridge emulator.

Also, as per the README, if you have multiple bridges, you will need separate domoticz HW devices per bridge each with their own free port (bridge1 8008, bridge2 8009 or any other free port on your system, and so on).

I have been running it in test myself and so far so good :lol: but I suspect some issues along the way.

Herman
ps: thanks for dnpwwo for nudging in the right direction here and there
ps2: The plugin currently uses s.connect(("192.168.1.1", 80)) and s.getsockname()[0] to get its own IP for the callback url. This will definitely cause problems for those on a 10.XX.XX.XX network adressing. Need to fix this urgently. If anyone knows how to get domoticz' IP address then please send.
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 :-)
olafmarcos
Posts: 17
Joined: Sunday 27 December 2015 1:09
Target OS: NAS (Synology & others)
Domoticz version: 9999
Location: Santander - Spain
Contact:

Re: Python Plugin: NUKI locks

Post by olafmarcos »

Hi heggink:

First of all, thank you very much for this plugin. I come from your bash scripts.

Tested in Synology with latest Beta with Python 3.5.1 and working. At least, the device is created fine.

I'm very curious if there is a possibility to implement the unlatch function in the same device. I was thining to implement in the bash scripts, but i don't know how to implement a new "function button" in the device. I was looking a device (dummy, etc.) that was configurable the number of buttons to implement on it, but i didn't found any which make the conmbination of our needs:
  • Button to show/do the unlock/lock state.
  • ยฟButton to do an unlacth action?
I'm lost how to implement due to the device options in Domoticz (implement a new button in the same device)...

Do you have any clue about it?
Synology NAS ds215j, DSM 6.2
Domoticz Beta from Jadahl 9999
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge
Nuki Lock Plugin
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

Hi Olaf,
It was easier with the scripts since you could just define your own device with multiple states.
When creating the python plugin, I decided to go back to teh standard lock device which only has an open and a locked state + no timer functionality (which is not nice).
I need to see if I can create a device that acts as a lock but also allows another action on it. No idea but will ask around.
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 :-)
olafmarcos
Posts: 17
Joined: Sunday 27 December 2015 1:09
Target OS: NAS (Synology & others)
Domoticz version: 9999
Location: Santander - Spain
Contact:

Re: Python Plugin: NUKI locks

Post by olafmarcos »

Thank you for your support.

By the way, i noticed that there are errors in the logs:
Spoiler: show
2018-09-19 22:10:58.086 (Nuki DoorLock) onHeartbeat check locks
2018-09-19 22:11:04.433 Error: (Nuki DoorLock) 'onHeartbeat' failed 'KeyError'.
2018-09-19 22:11:04.433 Error: (Nuki DoorLock) ----> Line 354 in '/usr/local/domoticz/var/plugins/domoticz-nuki-master/plugin.py', function onHeartbeat
2018-09-19 22:11:04.433 Error: (Nuki DoorLock) ----> Line 302 in '/usr/local/domoticz/var/plugins/domoticz-nuki-master/plugin.py', function onHeartbeat
I will enable Debug mode and update...

P.D.: Do you have any picture about how you power the Nuki directly??? I'm guessing how to put a cable across the door... :S
Synology NAS ds215j, DSM 6.2
Domoticz Beta from Jadahl 9999
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge
Nuki Lock Plugin
olafmarcos
Posts: 17
Joined: Sunday 27 December 2015 1:09
Target OS: NAS (Synology & others)
Domoticz version: 9999
Location: Santander - Spain
Contact:

Re: Python Plugin: NUKI locks

Post by olafmarcos »

Debug logs:
Spoiler: show
2018-09-19 22:44:32.120 Status: (Nuki DoorLock) Started.
2018-09-19 22:44:33.334 (Nuki DoorLock) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2018-09-19 22:44:33.334 (Nuki DoorLock) 'Mode3':'60'
2018-09-19 22:44:33.334 (Nuki DoorLock) 'DomoticzHash':'9e8ea72-modified'
2018-09-19 22:44:33.334 (Nuki DoorLock) 'Author':'heggink'
2018-09-19 22:44:33.334 (Nuki DoorLock) 'DomoticzBuildTime':'2018-09-09 18:27:57'
2018-09-19 22:44:33.334 (Nuki DoorLock) 'Name':'Nuki DoorLock'
2018-09-19 22:44:33.334 (Nuki DoorLock) 'Mode2':'------'
2018-09-19 22:44:33.334 (Nuki DoorLock) 'Version':'1.0.0'
2018-09-19 22:44:33.334 (Nuki DoorLock) 'Mode6':'File'
2018-09-19 22:44:33.335 (Nuki DoorLock) 'DomoticzVersion':'4.9999'
2018-09-19 22:44:33.335 (Nuki DoorLock) 'HomeFolder':'/usr/local/domoticz/var/plugins/domoticz-nuki-master/'
2018-09-19 22:44:33.335 (Nuki DoorLock) 'Key':'NukiLock'
2018-09-19 22:44:33.335 (Nuki DoorLock) 'Port':'8008'
2018-09-19 22:44:33.335 (Nuki DoorLock) 'HardwareID':'6'
2018-09-19 22:44:33.335 (Nuki DoorLock) 'Mode1':'192.168.1.17'
2018-09-19 22:44:33.335 (Nuki DoorLock) Device count: 1
2018-09-19 22:44:33.335 (Nuki DoorLock) Device: 1 - ID: 144, Name: 'Nuki DoorLock - Principal Chalet', nValue: 1, sValue: 'Locked'
2018-09-19 22:44:33.335 (Nuki DoorLock) Device ID: '144'
2018-09-19 22:44:33.335 (Nuki DoorLock) Device Name: 'Nuki DoorLock - Principal Chalet'
2018-09-19 22:44:33.335 (Nuki DoorLock) Device nValue: 1
2018-09-19 22:44:33.335 (Nuki DoorLock) Device sValue: 'Locked'
2018-09-19 22:44:33.335 (Nuki DoorLock) Device LastLevel: 0
2018-09-19 22:44:33.336 (Nuki DoorLock) My IP is 192.168.1.15
2018-09-19 22:44:33.336 (Nuki DoorLock) Nuki plugin started on IP 192.168.1.15 and port 8008
2018-09-19 22:44:33.336 (Nuki DoorLock) REQUESTING http://192.168.1.17:8080/list?token=-------
2018-09-19 22:44:33.465 (Nuki DoorLock) Lock list received [{"nukiId": ---------, "name": "Principal Chalet", "lastKnownState": {"state": 1, "stateName": "locked", "batteryCritical": false, "timestamp": "2018-09-19T18:08:24+00:00"}}]
2018-09-19 22:44:33.465 (Nuki DoorLock) I count 1 locks
2018-09-19 22:44:33.466 (Nuki DoorLock) Lock Principal Chalet already exists.
2018-09-19 22:44:33.466 (Nuki DoorLock) Lock batt False
2018-09-19 22:44:33.466 (Nuki DoorLock) Lock stateName locked
2018-09-19 22:44:33.466 (Nuki DoorLock) Lock state 1
2018-09-19 22:44:33.466 (Nuki DoorLock - Principal Chalet) Updating device from 1:'Locked' to have values 1:'Locked'.
2018-09-19 22:44:33.469 (Nuki DoorLock) Lock(s) created
2018-09-19 22:44:33.469 (Nuki DoorLock) 'Mode3':'60'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'DomoticzHash':'9e8ea72-modified'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'Author':'heggink'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'DomoticzBuildTime':'2018-09-09 18:27:57'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'Name':'Nuki DoorLock'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'Mode2':'------'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'Version':'1.0.0'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'Mode6':'File'
2018-09-19 22:44:33.469 (Nuki DoorLock) 'DomoticzVersion':'4.9999'
2018-09-19 22:44:33.470 (Nuki DoorLock) 'HomeFolder':'/usr/local/domoticz/var/plugins/domoticz-nuki-master/'
2018-09-19 22:44:33.470 (Nuki DoorLock) 'Key':'NukiLock'
2018-09-19 22:44:33.470 (Nuki DoorLock) 'Port':'8008'
2018-09-19 22:44:33.470 (Nuki DoorLock) 'HardwareID':'6'
2018-09-19 22:44:33.470 (Nuki DoorLock) 'Mode1':'192.168.1.17'
2018-09-19 22:44:33.470 (Nuki DoorLock) Device count: 1
2018-09-19 22:44:33.470 (Nuki DoorLock) Device: 1 - ID: 144, Name: 'Nuki DoorLock - Principal Chalet', nValue: 1, sValue: 'Locked'
2018-09-19 22:44:33.470 (Nuki DoorLock) Device ID: '144'
2018-09-19 22:44:33.470 (Nuki DoorLock) Device Name: 'Nuki DoorLock - Principal Chalet'
2018-09-19 22:44:33.470 (Nuki DoorLock) Device nValue: 1
2018-09-19 22:44:33.470 (Nuki DoorLock) Device sValue: 'Locked'
2018-09-19 22:44:33.470 (Nuki DoorLock) Device LastLevel: 0
2018-09-19 22:44:33.470 (Nuki DoorLock) checking callback http://192.168.1.17:8080/callback/list&token=------
2018-09-19 22:44:33.515 (Nuki DoorLock) Callback list received {"callbacks": [{"id": 0, "url": "http://192.168.1.15:8008"}]}
2018-09-19 22:44:33.515 (Nuki DoorLock) Found callbacks: 1
2018-09-19 22:44:33.515 (Nuki DoorLock) Callback already installed
2018-09-19 22:44:33.515 (Nuki DoorLock) Pushing 'ProtocolDirective' on to queue
2018-09-19 22:44:33.529 (Nuki DoorLock) Pushing 'ListenDirective' on to queue
2018-09-19 22:44:33.529 (Nuki DoorLock) Leaving on start
2018-09-19 22:44:33.530 (Nuki DoorLock) Processing 'ProtocolDirective' message
2018-09-19 22:44:33.530 (Nuki DoorLock) Protocol set to: 'HTML'.
2018-09-19 22:44:33.530 (Nuki DoorLock) Processing 'ListenDirective' message
2018-09-19 22:44:33.530 (Nuki DoorLock) Transport set to: 'TCP/IP', :8008.
2018-09-19 22:44:33.551 (Nuki DoorLock) Listen directive received, action initiated successfully.
2018-09-19 22:44:33.330 Status: (Nuki DoorLock) Entering work loop.
2018-09-19 22:44:33.330 Status: (Nuki DoorLock) Initialized version 1.0.0, author 'heggink'
2018-09-19 22:44:43.525 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-19 22:44:43.575 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-19 22:44:43.575 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-19 22:44:43.576 (Nuki DoorLock) onHeartbeat called 1
2018-09-19 22:44:53.721 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-19 22:44:53.771 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-19 22:44:53.771 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-19 22:44:53.771 (Nuki DoorLock) onHeartbeat called 2
2018-09-19 22:45:03.937 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-19 22:45:03.957 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-19 22:45:03.957 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-19 22:45:03.957 (Nuki DoorLock) onHeartbeat called 3
2018-09-19 22:45:14.132 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-19 22:45:14.152 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-19 22:45:14.152 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-19 22:45:14.153 (Nuki DoorLock) onHeartbeat called 4
2018-09-19 22:45:24.348 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-19 22:45:24.388 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-19 22:45:24.388 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-19 22:45:24.388 (Nuki DoorLock) onHeartbeat called 5
last logs repeated every 10 sec. aprox. everytime... is it normal??
Synology NAS ds215j, DSM 6.2
Domoticz Beta from Jadahl 9999
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge
Nuki Lock Plugin
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

Hmmm, that's weird. Can you tell me about your setup? Bridge type, #locks on the bridge? Appreciate if you can indeed turn on debug if it happens again. The returned message from the lock should be displayed right before the error. I suspect the message is a "success": false... It happens in some cases in my setup as well. Not sure why but it's no biggie unless it happens every 10 secs in which case the heartbeat is failing :-(.

In terms of the power, I used a 6V 3A power supply, bought a piece of wooden rod same diameter as a penlight, screwed the + to one side and the - to another, drilled a hole in the battery hatch and put everything together. I used a mini 6V UPS before but it struggled to provide adequate power which is a nightmare. Indeed you need to run the 6V wire through the door in some way. Luckily, the electrical cabinet is right next to my front door.
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 :-)
olafmarcos
Posts: 17
Joined: Sunday 27 December 2015 1:09
Target OS: NAS (Synology & others)
Domoticz version: 9999
Location: Santander - Spain
Contact:

Re: Python Plugin: NUKI locks

Post by olafmarcos »

My Setup:

Synology NAS DS215j, DSM 6.2
Domoticz Beta from Jadahl 9999 with Python
Python from Synology offical rep. 3.5.1
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge

About what type of bridge, i don't know, i though there was only one bridge type. I have this product: https://nuki.io/en/shop/nuki-combo/

Only one lock in the bridge. Debug on with 'True' option:
Spoiler: show
2018-09-20 15:27:14.450 Status: (Nuki DoorLock) Started.
2018-09-20 15:27:14.451 Status: Incoming connection from: 192.168.1.142
2018-09-20 15:27:15.148 Status: (Nuki DoorLock) Entering work loop.
2018-09-20 15:27:15.148 Status: (Nuki DoorLock) Initialized version 1.0.0, author 'heggink'
2018-09-20 15:28:16.466 (Nuki DoorLock) onHeartbeat called 6
2018-09-20 15:28:26.600 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:28:26.660 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:28:26.660 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:28:26.660 (Nuki DoorLock) onHeartbeat called 7
2018-09-20 15:28:36.816 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:28:36.846 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:28:36.846 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:28:36.846 (Nuki DoorLock) onHeartbeat called 8
2018-09-20 15:28:47.012 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:28:47.062 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:28:47.062 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:28:47.062 (Nuki DoorLock) onHeartbeat called 9
2018-09-20 15:28:57.207 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:28:57.257 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:28:57.258 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:28:57.258 (Nuki DoorLock) onHeartbeat called 10
2018-09-20 15:29:07.423 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:29:07.463 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:29:07.463 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:29:07.464 (Nuki DoorLock) onHeartbeat called 11
2018-09-20 15:29:17.619 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:29:17.669 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:29:17.669 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:29:17.669 (Nuki DoorLock) onHeartbeat called 12
2018-09-20 15:29:27.815 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:29:27.865 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:29:27.865 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:29:27.865 (Nuki DoorLock) onHeartbeat called 13
2018-09-20 15:29:38.031 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:29:38.061 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:29:38.061 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:29:38.061 (Nuki DoorLock) onHeartbeat called 14
2018-09-20 15:29:48.226 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:29:48.256 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:29:48.256 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:29:48.257 (Nuki DoorLock) onHeartbeat called 15
2018-09-20 15:29:58.432 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:29:58.452 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:29:58.452 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:29:58.452 (Nuki DoorLock) onHeartbeat called 16
2018-09-20 15:30:08.628 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:30:08.648 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:30:08.648 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:30:08.648 (Nuki DoorLock) onHeartbeat called 17
2018-09-20 15:30:18.824 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:30:18.844 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:30:18.844 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:30:18.844 (Nuki DoorLock) onHeartbeat called 18
2018-09-20 15:30:29.029 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:30:29.030 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:30:29.030 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:30:29.030 (Nuki DoorLock) onHeartbeat called 19
2018-09-20 15:30:39.235 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:30:39.285 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:30:39.285 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:30:39.285 (Nuki DoorLock) onHeartbeat called 20
2018-09-20 15:30:49.431 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:30:49.491 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:30:49.491 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:30:49.491 (Nuki DoorLock) onHeartbeat called 21
2018-09-20 15:30:59.647 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:30:59.677 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:30:59.677 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:30:59.677 (Nuki DoorLock) onHeartbeat called 22
2018-09-20 15:31:09.842 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:31:09.872 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:31:09.873 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:31:09.873 (Nuki DoorLock) onHeartbeat called 23
2018-09-20 15:31:20.068 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:31:20.078 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:31:20.078 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:31:20.079 (Nuki DoorLock) onHeartbeat called 24
2018-09-20 15:31:30.264 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:31:30.294 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:31:30.294 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:31:30.294 (Nuki DoorLock) onHeartbeat called 25
2018-09-20 15:31:40.460 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:31:40.490 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:31:40.490 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:31:40.490 (Nuki DoorLock) onHeartbeat called 26
2018-09-20 15:31:50.675 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:31:50.735 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:31:50.736 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:31:50.736 (Nuki DoorLock) onHeartbeat called 27
2018-09-20 15:32:00.871 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:32:00.931 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:32:00.931 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:32:00.932 (Nuki DoorLock) onHeartbeat called 28
2018-09-20 15:32:11.087 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:32:11.117 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:32:11.117 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:32:11.117 (Nuki DoorLock) onHeartbeat called 29
2018-09-20 15:32:21.293 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:32:21.323 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:32:21.323 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:32:21.323 (Nuki DoorLock) onHeartbeat called 30
2018-09-20 15:32:31.488 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:32:31.518 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:32:31.519 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:32:31.519 (Nuki DoorLock) onHeartbeat called 31
Synology NAS ds215j, DSM 6.2
Domoticz Beta from Jadahl 9999
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge
Nuki Lock Plugin
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

I see no errors in the logs with debug. Did I miss anything?

Specific to the bridge, there is the HW bridge from Nuki or the 'old android phone repurposed' bridge which Nuki also supports.
Wrt to the polling: make sure you set the polling to at least 30 minutes in your case as your batteries will drain too fast. There no real need anyway as, on start, the plugin syncs the state. It's there in case network goes doen, batteries are replaced but the lock is changed meanwhile, unforeseen stuff like that.
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 :-)
olafmarcos
Posts: 17
Joined: Sunday 27 December 2015 1:09
Target OS: NAS (Synology & others)
Domoticz version: 9999
Location: Santander - Spain
Contact:

Re: Python Plugin: NUKI locks

Post by olafmarcos »

Uh, ok... it is the hardware bridge not the Android version.

I don't see any error in the logs neither, but i don't know if it is normal all those logs every 10 seconds approx...
Spoiler: show
2018-09-20 15:29:17.619 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-09-20 15:29:17.669 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-09-20 15:29:17.669 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-09-20 15:29:17.669 (Nuki DoorLock) onHeartbeat called 12
I have 60 minutes in time to poll. Is there any setting to disable polling? I guess setting to 0.

Thanks again!!
Synology NAS ds215j, DSM 6.2
Domoticz Beta from Jadahl 9999
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge
Nuki Lock Plugin
olafmarcos
Posts: 17
Joined: Sunday 27 December 2015 1:09
Target OS: NAS (Synology & others)
Domoticz version: 9999
Location: Santander - Spain
Contact:

Re: Python Plugin: NUKI locks

Post by olafmarcos »

Hi Heggink!

Do you have any updates on the logs every 10 seconds? I put a clean start of the plugin during 1 minute more and less.. Every 10 seconds there is a "Pushing 'onHeartbeatCallback' on to queue". I set the polling to "0" in the config but it did the same with "60". I didn't see any error that give me any clues... :S
Spoiler: show
2018-10-23 13:00:14.349 Status: (Nuki DoorLock) Started.
2018-10-23 13:00:15.427 (Nuki DoorLock) 'DomoticzBuildTime':'2018-09-09 18:27:57'
2018-10-23 13:00:15.427 (Nuki DoorLock) 'DomoticzVersion':'4.9999'
2018-10-23 13:00:15.428 (Nuki DoorLock) 'Mode3':'0'
2018-10-23 13:00:15.428 (Nuki DoorLock) 'DomoticzHash':'9e8ea72-modified'
2018-10-23 13:00:15.428 (Nuki DoorLock) 'HardwareID':'6'
2018-10-23 13:00:15.428 (Nuki DoorLock) 'Key':'NukiLock'
2018-10-23 13:00:15.428 (Nuki DoorLock) Device count: 1
2018-10-23 13:00:15.428 (Nuki DoorLock) Device: 1 - ID: 144, Name: 'Nuki DoorLock - Principal Chalet', nValue: 0, sValue: 'Unlocked'
2018-10-23 13:00:15.439 (Nuki DoorLock) Device ID: '144'
2018-10-23 13:00:15.439 (Nuki DoorLock) Device Name: 'Nuki DoorLock - Principal Chalet'
2018-10-23 13:00:15.439 (Nuki DoorLock) Device nValue: 0
2018-10-23 13:00:15.439 (Nuki DoorLock) Device sValue: 'Unlocked'
2018-10-23 13:00:15.440 (Nuki DoorLock) Device LastLevel: 0
2018-10-23 13:00:15.440 (Nuki DoorLock) My IP is 192.168.1.15
2018-10-23 13:00:15.440 (Nuki DoorLock) Nuki plugin started on IP 192.168.1.15 and port 8008
2018-10-23 13:00:15.441 (Nuki DoorLock) REQUESTING http://192.168.1.17:8080/list?token=avbilb
2018-10-23 13:00:15.537 (Nuki DoorLock) Lock list received [{"nukiId": 316143889, "name": "Principal Chalet", "lastKnownState": {"state": 3, "stateName": "unlocked", "batteryCritical": false, "timestamp": "2018-10-23T10:59:40+00:00"}}]
2018-10-23 13:00:15.538 (Nuki DoorLock) I count 1 locks
2018-10-23 13:00:15.538 (Nuki DoorLock) Lock Principal Chalet already exists.
2018-10-23 13:00:15.539 (Nuki DoorLock) Lock batt False
2018-10-23 13:00:15.539 (Nuki DoorLock) Lock stateName unlocked
2018-10-23 13:00:15.539 (Nuki DoorLock) Lock state 3
2018-10-23 13:00:15.539 (Nuki DoorLock - Principal Chalet) Updating device from 0:'Unlocked' to have values 0:'Unlocked'.
2018-10-23 13:00:15.543 (Nuki DoorLock) Lock(s) created
2018-10-23 13:00:15.543 (Nuki DoorLock) 'Mode1':'192.168.1.17'
2018-10-23 13:00:15.544 (Nuki DoorLock) 'Author':'heggink'
2018-10-23 13:00:15.544 (Nuki DoorLock) 'Mode6':'Debug'
2018-10-23 13:00:15.544 (Nuki DoorLock) 'Version':'1.0.0'
2018-10-23 13:00:15.544 (Nuki DoorLock) 'Port':'8008'
2018-10-23 13:00:15.544 (Nuki DoorLock) 'Name':'Nuki DoorLock'
2018-10-23 13:00:15.544 (Nuki DoorLock) 'Mode2':'avbilb'
2018-10-23 13:00:15.544 (Nuki DoorLock) 'HomeFolder':'/usr/local/domoticz/var/plugins/domoticz-nuki-master/'
2018-10-23 13:00:15.545 (Nuki DoorLock) 'DomoticzBuildTime':'2018-09-09 18:27:57'
2018-10-23 13:00:15.545 (Nuki DoorLock) 'DomoticzVersion':'4.9999'
2018-10-23 13:00:15.545 (Nuki DoorLock) 'Mode3':'0'
2018-10-23 13:00:15.545 (Nuki DoorLock) 'DomoticzHash':'9e8ea72-modified'
2018-10-23 13:00:15.545 (Nuki DoorLock) 'HardwareID':'6'
2018-10-23 13:00:15.545 (Nuki DoorLock) 'Key':'NukiLock'
2018-10-23 13:00:15.545 (Nuki DoorLock) Device count: 1
2018-10-23 13:00:15.546 (Nuki DoorLock) Device: 1 - ID: 144, Name: 'Nuki DoorLock - Principal Chalet', nValue: 0, sValue: 'Unlocked'
2018-10-23 13:00:15.546 (Nuki DoorLock) Device ID: '144'
2018-10-23 13:00:15.546 (Nuki DoorLock) Device Name: 'Nuki DoorLock - Principal Chalet'
2018-10-23 13:00:15.546 (Nuki DoorLock) Device nValue: 0
2018-10-23 13:00:15.546 (Nuki DoorLock) Device sValue: 'Unlocked'
2018-10-23 13:00:15.546 (Nuki DoorLock) Device LastLevel: 0
2018-10-23 13:00:15.547 (Nuki DoorLock) checking callback http://192.168.1.17:8080/callback/list&token=avbilb
2018-10-23 13:00:15.591 (Nuki DoorLock) Callback list received {"callbacks": [{"id": 0, "url": "http://192.168.1.15:8008"}]}
2018-10-23 13:00:15.591 (Nuki DoorLock) Found callbacks: 1
2018-10-23 13:00:15.591 (Nuki DoorLock) Callback already installed
2018-10-23 13:00:15.591 (Nuki DoorLock) Pushing 'ProtocolDirective' on to queue
2018-10-23 13:00:15.598 (Nuki DoorLock) Pushing 'ListenDirective' on to queue
2018-10-23 13:00:15.599 (Nuki DoorLock) Leaving on start
2018-10-23 13:00:15.599 (Nuki DoorLock) Processing 'ProtocolDirective' message
2018-10-23 13:00:15.599 (Nuki DoorLock) Protocol set to: 'HTML'.
2018-10-23 13:00:15.599 (Nuki DoorLock) Processing 'ListenDirective' message
2018-10-23 13:00:15.599 (Nuki DoorLock) Transport set to: 'TCP/IP', :8008.
2018-10-23 13:00:15.599 (Nuki DoorLock) Listen directive received, action initiated successfully.
2018-10-23 13:00:15.408 Status: (Nuki DoorLock) Entering work loop.
2018-10-23 13:00:15.421 Status: (Nuki DoorLock) Initialized version 1.0.0, author 'heggink'
2018-10-23 13:00:25.606 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-10-23 13:00:25.616 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-10-23 13:00:25.616 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-10-23 13:00:25.617 (Nuki DoorLock) onHeartbeat called 1
2018-10-23 13:00:25.617 (Nuki DoorLock) onHeartbeat check locks
2018-10-23 13:00:25.617 (Nuki DoorLock) Checking lockstatus http://192.168.1.17:8080/lockState&nuki ... ken=avbilb
2018-10-23 13:00:35.186 (Nuki DoorLock) Lock status received {"state": 3, "stateName": "unlocked", "batteryCritical": false, "success": true}
2018-10-23 13:00:35.187 (Nuki DoorLock) Principal Chalet is UNLOCKED
2018-10-23 13:00:35.187 (Nuki DoorLock) UpdateDevice called with 1 0 Unlocked 255
2018-10-23 13:00:44.902 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-10-23 13:00:44.912 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-10-23 13:00:44.912 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-10-23 13:00:44.913 (Nuki DoorLock) onHeartbeat called 1
2018-10-23 13:00:44.913 (Nuki DoorLock) onHeartbeat check locks
2018-10-23 13:00:44.913 (Nuki DoorLock) Checking lockstatus http://192.168.1.17:8080/lockState&nuki ... ken=avbilb
2018-10-23 13:00:47.083 (Nuki DoorLock) Lock status received {"state": 3, "stateName": "unlocked", "batteryCritical": false, "success": true}
2018-10-23 13:00:47.083 (Nuki DoorLock) Principal Chalet is UNLOCKED
2018-10-23 13:00:47.083 (Nuki DoorLock) UpdateDevice called with 1 0 Unlocked 255
2018-10-23 13:00:56.780 (Nuki DoorLock) Pushing 'onHeartbeatCallback' on to queue
2018-10-23 13:00:56.780 (Nuki DoorLock) Processing 'onHeartbeatCallback' message
2018-10-23 13:00:56.780 (Nuki DoorLock) Calling message handler 'onHeartbeat'.
2018-10-23 13:00:56.780 (Nuki DoorLock) onHeartbeat called 1
2018-10-23 13:00:56.780 (Nuki DoorLock) onHeartbeat check locks
2018-10-23 13:00:56.781 (Nuki DoorLock) Checking lockstatus http://192.168.1.17:8080/lockState&nuki ... ken=avbilb
2018-10-23 13:01:05.014 (Nuki DoorLock) Lock status received {"state": 3, "stateName": "unlocked", "batteryCritical": false, "success": true}
2018-10-23 13:01:05.014 (Nuki DoorLock) Principal Chalet is UNLOCKED
2018-10-23 13:01:05.014 (Nuki DoorLock) UpdateDevice called with 1 0 Unlocked 255
2018-10-23 13:01:08.467 (Nuki DoorLock) Pushing 'DisconnectDirective' on to queue
2018-10-23 13:01:08.497 (Nuki DoorLock) Processing 'DisconnectDirective' message
2018-10-23 13:01:08.497 (Nuki DoorLock) Disconnect directive received for ':8008'.
2018-10-23 13:01:08.497 (Nuki DoorLock) Handling disconnect, socket (:8008) is not connected
2018-10-23 13:01:08.498 (Nuki DoorLock) Pushing 'DisconnectedEvent' on to queue
2018-10-23 13:01:08.557 (Nuki DoorLock) Processing 'DisconnectedEvent' message
2018-10-23 13:01:08.557 (Nuki DoorLock) Disconnect event received for ':8008'.
2018-10-23 13:01:08.558 (Nuki DoorLock) Pushing 'onDisconnectCallback' on to queue
2018-10-23 13:01:08.558 (Nuki DoorLock) Pushing 'onStopCallback' on to queue
2018-10-23 13:01:08.558 (Nuki DoorLock) Processing 'onDisconnectCallback' message
2018-10-23 13:01:08.558 (Nuki DoorLock) Calling message handler 'onDisconnect'.
2018-10-23 13:01:08.558 (Nuki DoorLock) onDisconnect called for connection 'Server Connection'.
2018-10-23 13:01:08.558 (Nuki DoorLock) Server Connections:
2018-10-23 13:01:08.558 (Nuki DoorLock) Processing 'onStopCallback' message
2018-10-23 13:01:08.559 (Nuki DoorLock) Message handler 'onStop' not callable, ignored.
2018-10-23 13:01:08.617 (Nuki DoorLock) Deallocating connection object 'Server Connection' (:8008).
2018-10-23 13:01:08.460 Status: (Nuki DoorLock) Stop directive received.
2018-10-23 13:01:08.468 Status: (Nuki DoorLock) Exiting work loop.
2018-10-23 13:01:08.697 Status: (Nuki DoorLock) Stopping threads.
2018-10-23 13:01:08.697 Status: (Nuki DoorLock) Stopped.
Thanks in advance...
Synology NAS ds215j, DSM 6.2
Domoticz Beta from Jadahl 9999
Z-wave (AEOTEC Aeotec Z-Stick Series GEN5,Fibaro FGRM222, FGS222, FGMS001-ZW5 Motion Sensor+)
Philips Hue Bridge
Nuki Lock Plugin
User avatar
BartdaMan
Posts: 20
Joined: Sunday 22 May 2016 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Amersfoort
Contact:

Re: Python Plugin: NUKI locks

Post by BartdaMan »

Hello Herman,

Thank you for writing this plugin, I installed it just now.
But...:

2019-05-19 21:25:43.829 Error: (NukiLock) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-nuki/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-05-19 21:25:43.829 Error: (Nuki) Module Import failed, exception: 'TabError'
2019-05-19 21:25:43.829 Error: (Nuki) Import detail: File: /home/pi/domoticz/plugins/domoticz-nuki/plugin.py, Line: 88, offset: 96
2019-05-19 21:25:43.830 Error: (Nuki) Error Line ' Domoticz.Log("Nuki plugin started on IP " + self.myIP + " and port " + str(self.callbackPort))
2019-05-19 21:25:43.830 '

I'm not at all knowledgeable in Linux, so could you please help me solve this?

It is running on a Raspberry 3.

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

Re: Python Plugin: NUKI locks

Post by heggink »

Hmmm, weird. I'll take a look tomorrow.

Verstuurd vanaf mijn SM-G955F met Tapatalk

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 :-)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

Can you try again? Do a git pull please.

Verstuurd vanaf mijn SM-G955F met Tapatalk

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 :-)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

Pls also pm me. Some things good to know.

Verstuurd vanaf mijn SM-G955F met Tapatalk

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 :-)
User avatar
BartdaMan
Posts: 20
Joined: Sunday 22 May 2016 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Amersfoort
Contact:

Re: Python Plugin: NUKI locks

Post by BartdaMan »

Alright, new installation from Github, but still:
2019-05-20 19:01:51.977 Error: (NukiLock) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-nuki/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-05-20 19:01:51.978 Error: (Nuki) Module Import failed, exception: 'TabError'
2019-05-20 19:01:51.978 Error: (Nuki) Import detail: File: /home/pi/domoticz/plugins/domoticz-nuki/plugin.py, Line: 217, offset: 88
2019-05-20 19:01:51.978 Error: (Nuki) Error Line ' Domoticz.Log(self.lockNames[foundlock] + " requests update: " + Response["stateName"])
2019-05-20 19:01:51.978 '

I will PM you.
User avatar
BartdaMan
Posts: 20
Joined: Sunday 22 May 2016 22:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Amersfoort
Contact:

Re: Python Plugin: NUKI locks

Post by BartdaMan »

Hmmm, the PM seems to stay in my Outbox. Did you get it?
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

yup.
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 :-)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

Fixed the taberror and port issues.

Verstuurd vanaf mijn SM-G955F met Tapatalk

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 :-)
Bidibulle
Posts: 7
Joined: Wednesday 22 May 2019 22:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11361
Location: Paris
Contact:

Re: Python Plugin: NUKI locks

Post by Bidibulle »

Hi,

Alright, upgrade plugin but still:

2019-05-22 22:24:40.601 Error: (NukiLock) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-nuki/:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabihf:/usr/lib/python3.5/lib-dynload:/usr/local/lib/python3.5/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.5/dist-packages'.
2019-05-22 22:24:40.601 Error: (Nuki de Bidibulle) Module Import failed, exception: 'TabError'
2019-05-22 22:24:40.601 Error: (Nuki de Bidibulle) Import detail: File: /home/pi/domoticz/plugins/domoticz-nuki/plugin.py, Line: 88, offset: 38
2019-05-22 22:24:40.601 Error: (Nuki de Bidibulle) Error Line ' sef.bridgePort = Parameters["Mode4"]
2019-05-22 22:24:40.601 '
2019-05-22 22:25:48.268 Error: Nuki de Bidibulle hardware (23) thread seems to have ended unexpectedly

Test connect to bridge http://192.168.0.158:8080/configAuth?en ... en=XXXXXXX
success : true

install on raspberry, Domoticz Version: 4.10810 Build Hash: 315b45b6 - Python Version: 3.5.3
Plugin commit 921e908

Thanks :)
User avatar
heggink
Posts: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python Plugin: NUKI locks

Post by heggink »

Apologies for the taberror. I never noticed that the github editor auto indents using tabs instead of spaces. Fixed this issue now.
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: Google [Bot] and 1 guest