Nuki Smart Lock 2.0 - support all available API actions (i.e. add lock/unlock)

No i have not removed the HA NUKI Integration, im using it to the unlock and lock , since the scripts are not working , do i need to remove it ??

with HA Integration its like this

i see u using port 8081 , im going to try to change my port 8080 to that one !!!

You need to change it to the port you’ve setup in the App, right?

yes by default it has 8080 , not i changed in the app to 8081 , and changed the code , but so far its the same … baterry info doesnt work for me !!! its very strange because in the app i can see the batteries at 98% !!!

You need to exchange this

in

nuki_unlock: "curl -s 'IP:PORT/lockAction?nukiId=IDNUKISMARTLOCK&deviceType=0&action=1&token=TOKEN'"

to the Smart Lock ID of your lock in order to get the scripts working.
Go to the Bridge and choose the Lock, there is the ID of the Lock.
To be honest: I have no idea how to get the ID if no Bridge ist around.
In the App → Verbindungsstatus (connection status) - tipp on the Lock → there is the ID

ok i will try that …

my connection to the bridge with token , reports thar battery critical is yes , but iv changed the batteries and in the app it says 100% , and it doesnt show any field for batterychargestatus , so maybe that is the problem , what firmware does your bridge have ??

image

Version 2.9.3

im on 2.4.21 , doing a call to update firmware to see - fwupdate?token=

@Joerg , u send me the firmware of the lock ?? or the bridge , im on the lock on 2.10.8 , but on the bridge its on 2.4.21 , and after the comand to update it stayed in the same firmware , and the batterycritical : true continues , maybe i have to post in the nuki forum to see if its a bad bridge !!

ok now i now why no batt this is on the nuki forum :

Bridge API: get the battery in % for a Smart Lock (needs Smart Lock Firmware 2.8.1/1.10.0 or higher) Bridge API: get callbacks for door Opener ringactions which did n…

@Joerg thank for all your help , and sorry for the botther , leaving this info there so it might help anyonme that comes after

My Lock is also 2.10.8 but the Bridge is 2.9.3.
Try this to update:

http://192.168.*.*:8080/fwupdate?scope=1&token=

Its from the same forum…

Don’t worry, all good.
Fingerscrossed the update will work.

@Joerg again thanks for helping , it was the old firmware indeed , everything is working now , even scripts , thanks again !!!

1 Like

Good to hear and you’re welcome.

Thanks for this, it’s working fine. Status updates are not immediate, because of polling I guess, but it works.

@steinerl is working on major upgrade to the integration: Use callbacks instead of polling in nuki by steinerl · Pull Request #44310 · home-assistant/core (github.com)

it will include the door status (made by @pree) and callbacks vs polling. Nice stuff. Can’t wait to try it.

Hello to all

Anyone knows what is needed to add a second nuki with this script , because it uses the deviceType": 0, on both locks , and would like to add a second one … and have the battery and sensor status , the comands with script work fine … just need to see how with script i can reach the second lock in the bridge !!! ???

The Nuki Card was moved here: Nuki Card with callbacks (official integration not needed)

5 Likes

Hello Alex,
thanks for sharing your code with the icons, but its not my code - the original code was created and shared by @HITMIK there
I just “translated” it to english and tried to help some others in here.

sorry about not mentioning @HITMIK, credit to both of you then, I amended the post.

1 Like