Also just noticed that giejay forked the plugin with a bunch of fixes. Adopted these just now. Still rather new to this whole github thing so bear with me .
Hope it's all OK 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 :-)
Well, it only gives an error if you switch the lock again within ±20 s after the previous switch action. And that normally does not happen. So for me this version is fine now! Thanks a lot, Herman!
I'm having one issue with this plugin : it fails at some time and never recover.
Here is the type of error I receive :
2019-09-01 12:05:36.961 Error: (Nuki) 'onStart' failed 'RemoteDisconnected'.
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 345 in 'C:\Program Files (x86)\Domoticz\plugins\domoticz-nuki\plugin.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 161 in 'C:\Program Files (x86)\Domoticz\plugins\domoticz-nuki\plugin.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 222 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 525 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 543 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 503 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 1345 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 1323 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-01 12:05:36.961 Error: (Nuki) ----> Line 1353 in 'C:\Program Files (x86)\Python37-32\Lib\http\client.py'
2019-09-01 12:05:36.965 Error: (Nuki) ----> Line 306 in 'C:\Program Files (x86)\Python37-32\Lib\http\client.py'
2019-09-01 12:05:36.965 Error: (Nuki) ----> Line 275 in 'C:\Program Files (x86)\Python37-32\Lib\http\client.py'
It seems the error occurs when the plugin hit the refresh interval (60 min for me) though I'm not sure. It may be because the plugin fail to contact the bridge (like a temporary network error).
I'm currently running Domoticz on a Windows 10 PC.
Otherwise the plugin works fine : it does see the brige, the lock, update the lock status and can lock / unlock the lock.
I turned debug to see if I can pinpoint the moment it fails, will let you know if I notice something obvious.
Please do. I can't test under Windows as I only run on rpi and have no spare locks to test.
Sent from phone.
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 :-)
2019-09-02 02:49:52.288 Error: Nuki hardware (18) thread seems to have ended unexpectedly
2019-09-02 02:50:06.742 Error: Nuki hardware (18) thread seems to have ended unexpectedly
2019-09-02 02:50:12.092 Error: (Nuki) 'onHeartbeat' failed 'RemoteDisconnected'.
2019-09-02 02:50:12.092 Error: (Nuki) ----> Line 368 in 'C:\Program Files (x86)\Domoticz\plugins\domoticz-nuki\plugin.py'
2019-09-02 02:50:12.092 Error: (Nuki) ----> Line 308 in 'C:\Program Files (x86)\Domoticz\plugins\domoticz-nuki\plugin.py'
2019-09-02 02:50:12.092 Error: (Nuki) ----> Line 222 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-02 02:50:12.092 Error: (Nuki) ----> Line 525 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-02 02:50:12.092 Error: (Nuki) ----> Line 543 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-02 02:50:12.096 Error: (Nuki) ----> Line 503 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-02 02:50:12.096 Error: (Nuki) ----> Line 1345 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-02 02:50:12.096 Error: (Nuki) ----> Line 1323 in 'C:\Program Files (x86)\Python37-32\Lib\urllib\request.py'
2019-09-02 02:50:12.096 Error: (Nuki) ----> Line 1353 in 'C:\Program Files (x86)\Python37-32\Lib\http\client.py'
2019-09-02 02:50:12.096 Error: (Nuki) ----> Line 306 in 'C:\Program Files (x86)\Python37-32\Lib\http\client.py'
2019-09-02 02:50:12.096 Error: (Nuki) ----> Line 275 in 'C:\Program Files (x86)\Python37-32\Lib\http\client.py'
2019-09-02 02:50:20.849 Error: Nuki hardware (18) thread seems to have ended unexpectedly
There is one thing taht I fail to understand, the way I see it, it does fail trying to open the bridge URL urlib.request.urlopen(req).read(), but the log file locate the error in the catch block for URLError in Domoticz.Error('NUKI HTTPError code:' + str(e.reason)). So it means that the real URLError is masked by the RemoteDisconnected in the Domoticz.Error function...?
I'm currently looking for a door smart lock. I've just found this Nuki Smart Lock product and your plugin.
I've a simple question. Is there any way to connect this Nuki Smart Lock product to a home automation system like Domoticz without using the Nuki Cloud, I mean Domoticz talking directly to the Nuki bridge.
Hi Antori91,
This is exactly what the plugin does. It uses the published http api to communicate directly to the bridge. It does not need an internet connection. Please note that connecting the locks to Domoticz is always a security risk so make sure your system is well protected.
Herman
Sent from phone.
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 :-)
It's simple http calls but since it's inside my network, I don't mind. I use MAC authentication for wireless access so someone would have to gain access through my internet connection. External access is through VPN.
Just google for nuki bridge http api and you can find it.
Sent from phone.
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 :-)
I've downloaded the Nuki Web API V1.3.0 whitepaper. The chapter 1.Introduction mentions:
The Nuki Web API offers various ways to interact with a Nuki Smart Lock. The API transmits all commands directly through a permanent HTTPS/TLS connection to the corresponding Nuki bridge, which forwards it via Bluetooth to the Smart Lock for execution. Responses are directly fed back into Nuki Web.All commands are performed with the server-stored Nuki Web Authentication Key which was created when Nuki Web has been initially activated by the Smart Lock administrator. Because of having its own Authentication Key, Nuki Web acts independently of other clients (e.g. Nuki iOS or Android App). ???
Anyway, I don't go further with NUKI because my door lock is not compatible.
That's the web api that uses the nuki cloud. I use the local bridge api. Different one. I don't like all those web services. When the internet is down, nothing works...
Sent from phone.
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 :-)
heggink wrote: ↑Tuesday 05 May 2020 9:13
That's the web api that uses the nuki cloud. I use the local bridge api. Different one. I don't like all those web services. When the internet is down, nothing works...
Ah OK, I see. I will not like too using the cloud to open my main door (it was my first question) !
Thank you for your answers. Have a nice day
There is a new (testing) version of the plugin adding support for the door sensor for the V2 lock (thanks to StephaneM60). Please note that the device numbers in domoticz have been renumbered so installing this will create new devices and you need to delete the old ones. In order to test, you need to switch to the feature-unlatch branch on github.
At some point, I will move that to master.
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 :-)