SL4pro - Get (poll) battery status via MQTT

Hello everyone,

I am running a local MQTT server (mosquitto) and find that it is very comfortable/fast to open the door via MQTT instead of going the Bluetooth route. I am using

mosquitto_pub -h 192.168.1.2 -m "3" -t nuki/XXXXXX/lockAction

in Termux Widget on an Android phone, enabling a very fast single touch door opening.

I would like to poll/get the current battery level,as I do not open the app anymore. I see status messages every two hours when subscribing to “nuki/#” , but as I am using this on a mobile phone I can not be constantly subscribed to the topic.

mosquitto_pub -h 192.168.1.2 -m "3" -t nuki/XXXXXX/batteryChargeState
did not work successfully for me, though I probably misunderstod the API docs in this regard.

Is there a way to get the battery evel on request (polling) resp. get the complete lock state including the battery level on demand?

Thanks,

Joost

Just as reference:

mosquitto_sub -h 192.168.1.2 -t nuki/XXXXXCX/batteryChargeState

will return the last known battery charge state. I am not sure if this is polled from the lock or returning the last cached value, though I believe this should not make a big difference, as it looks like it is updated every two hours.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.