Installed Version 09.26
Now its working again. Great job, thank you again.
Pimatic would be dad if there are not guys like you.
is there anyone using Nuki dooropener
Installed Version 09.26
Now its working again. Great job, thank you again.
Pimatic would be dad if there are not guys like you.
It’s strange
[pimatic-nuki-reloaded] Current callbacks: [
16:37:16.941 [pimatic-nuki-reloaded]> {
16:37:16.941 [pimatic-nuki-reloaded]> "id": 0,
16:37:16.941 [pimatic-nuki-reloaded]> "url": "http://192.168.178.104:51989/nuki-api-bridge"
16:37:16.941 [pimatic-nuki-reloaded]> },
16:37:16.941 [pimatic-nuki-reloaded]> {
16:37:16.941 [pimatic-nuki-reloaded]> "id": 1,
16:37:16.941 [pimatic-nuki-reloaded]> "url": "http://192.168.178.100:12321/nuki-api-bridge"
16:37:16.941 [pimatic-nuki-reloaded]> }
16:37:16.941 [pimatic-nuki-reloaded]>]
I do not have any device with 192.168.178.104.
Have to look for it
some weeks ago I had a raspi with iobroker running. This was the ip 104. But actual there is no device on it.
what exact do I have to do?
@ortin said in is there anyone using Nuki dooropener:
I found the update to 0.9.25. In my case with this version the states of
StateName
anddoorsensorStateName
are not shown anymore in my English test environment?
With 0.9.26 my problem is gone. Works now. Thanks for the update. Can you say what was wrong?
Hi bertreb, I like to ask for a tiny improvement of this plugin. As I mentioned above, I am primary using an own scripted way to handle my nuki lock. But your UI looks better :D
Due to a hardware problem I have since some days, I am missing an information whether the lock is okay or not.
In my script I send a telegram message if the API response is not as expected.
In my current special fault case the lock gets triggered, but it hangs due to a hardware defect and neither lock nor unlock works sometimes. Means the lock will not response locked
after I send the command
From my point of view, it would be a benefit to see on the UI. If the lock works as expected or not and if not to be able to use a rule to trigger whatever…
What you think?
Correct I am using curl commands and pipe the response trough “jq” curl ...| jq '.[] | select(.name | contains("HWR"))' | jq -r .lastKnownState.stateName
This is a method of my script to check the state after I send an action:
schliessStatus ()
{
schliessStatusPimaitc=`curl -s -u $user:$pwd $addr:1234/api/variables/nuki-status-schloss | jq -r .variable.value`
kommando=`curl -s "http://$addrNuki:8080/list?token=$token"`
ergebnis=`echo $kommando | jq '.[] | select(.name | contains("HWR"))' | jq -r .lastKnownState.stateName`
case $ergebnis in
unlocked)
echo "\nStatus: $ergebnis\n"
if [ $schliessStatusPimaitc != offen ]
then curl -s -X PATCH -H "Content-Type:application/json" -u "$user:$pwd" -d '{"type": "value", "valueOrExpression": "'"offen"'"}' $addr:1234/api/variables/nuki-status-schloss
fi
;;
locked)
echo "\nStatus: $ergebnis\n"
if [ $schliessStatusPimaitc != verschlossen ]
then curl -s -X PATCH -H "Content-Type:application/json" -u "$user:$pwd" -d '{"type": "value", "valueOrExpression": "'"verschlossen"'"}' $addr:1234/api/variables/nuki-status-schloss
fi
;;
*) echo "\nRückgabewert fehlerhaft ! ! !\n"
;;
esac
}
With | jq -r .success
I check if the action command was successfull. As long it is true all is fine. False or something else cause in an negative announcement.
Could be, but I am just locking for “locked” when I want to lock my nuki and “unlocked” when I want to unlock it.
I missed to show this
kommando=`curl -s "http://$addrNuki:8080/lockAction?nukiId=$id&$aktion&token=$token"`
ergebnis=`echo $kommando | jq -r .success`
This responses true or false and in special cases something else, as I remember, but I catch this by *)
. As long as it is true I am fine with it.
When it is false I try to send the action two more times. If it still not works then I send the message…
EDIT:
Here the whole method to be more clear. Ignore the not nuki related stuff, because I have some additional dependencies for my actions:
schliessen ()
{
hwrTuer=`curl -s -u $user:$pwd $addr:1234/api/variables/kontakt-tuer-hwr-garage | jq -r .variable.value`
if [ $hwrTuer = offen ]
then python /home/ortin/telegram/telegramText.py "Nuki HWR - KEINE AKTION, da die Tür OFFEN steht!" Daniel #alle
exit 0
fi
case $modus in
auf) aktion=action=1 ;;
zu) aktion=action=2 ;;
esac
kommando=`curl -s "http://$addrNuki:8080/lockAction?nukiId=$id$aktion&token=$token"`
ergebnis=`echo $kommando | jq -r .success`
case $ergebnis in
true)
case $modus in
auf) curl -s -X PATCH -H "Content-Type:application/json" -u "$user:$pwd" -d '{"type": "value", "valueOrExpression": "'"offen"'"}' $addr:1234/api/variables/nuki-status-schloss
echo `date +%d.%m.%Y-%H:%M:%S` - Nuki HWR AUFGESCHLOSSEN >>/home/ortin/Homation/log/actionNuki.log
;;
zu) curl -s -X PATCH -H "Content-Type:application/json" -u "$user:$pwd" -d '{"type": "value", "valueOrExpression": "'"verschlossen"'"}' $addr:1234/api/variables/nuki-status-schloss
echo `date +%d.%m.%Y-%H:%M:%S` - Nuki HWR ABGESCHLOSSEN >>/home/ortin/Homation/log/actionNuki.log
;;
esac
# Schließstatus prüfen und Pimatic updaten
schliessStatus
# Rückgabewert ausgeben
echo "\n----------------------"
echo "Rückgabewert: $ergebnis\n"
exit 0
;;
false)
while [ $loop != 3 ]
do
loop=$(( $loop + 1 ))
echo " ∟ API "$loop"x angesprochen (case -> false)" >>/home/ortin/Homation/log/actionNuki.log
sleep 5
schliessen # $modus ist an dieser Stelle schon durch den Methodenaufruf bekannt.
done
case $modus in
auf) python /home/ortin/telegram/telegramText.py "Nuki HWR - Aufschließen hat NICHT geklappt!" Daniel ;;
zu) python /home/ortin/telegram/telegramText.py "Nuki HWR - Abschließen hat NICHT geklappt!" Daniel ;;
esac
# Rückgabewert ausgeben
echo "\n----------------------"
echo "Rückgabewert: $ergebnis\n"
exit 0
;;
*)
while [ $loop != 5 ]
do
loop=$(( $loop + 1 ))
echo Loop = $loop
echo " ∟ API "$loop"x angesprochen (case -> *)" >>/home/ortin/Homation/log/actionNuki.log
sleep 5
schliessen
done
python /home/ortin/telegram/telegramText.py "Nuki HWR - API Rückgabewert ungültig!" Daniel
echo "\nRückgabewert fehlerhaft\n"
;;
esac
}
Remember I am not Dev, I just play around with code
Hi, i released 0.9.28
Testing the error conditions would be helpful
Update is installed. Will make some test today. But what I have seen till now looks good. Will report.
Found no problem till now. My hardware problem didn’t occure from yesterday. But as I blocked the motor I saw the related status
The picture is just from my playground where I play around with some stuff. On my production system I have a light version running.