Nuki Card with Callback support (supports both Lock & Opener, it replaces the official integration)

I don’t have to worry. You’re coding all night …

because it’s during the day that you’re not home. :sweat_smile:

I wouldn’t count on that: homeoffice since March 2020.
She is at work and you sleep at day time :wink:

You got me!! :smiley:

Okay.
It’s a bungalow on top of a building. Just you get the pictures out of your head and be able to code.


I’m almost in vacation mode…no coding, only thinking…:slight_smile:

Congrats Peter, seems your chances are growing.

You have duplicate sensors…bad thing. :frowning:

Please check all entities that start with sensor.nuki_ and see how many duplicates you have.

You need to clean this stuff…remove the nuki card package, delete those sensors and reinstall from a clean state.

What a mess…never seen that before…what hw are you using for HA? RPi?

You are a mean guy… :sweat_smile:

I didn’t meant to be … I thought it is working now untill I saw your post about it.
Anyway I am off - nice evening.

I thought you were joking. Sorry.

Good evening.

1 Like

Done, same problem as before but as far as I see no double sensors any more. Do I have to create new Nuki Tokens etc.?

checked this too, seems to be ok


These are the stats after updating all the stuff. sensor again not intitialized?

What do you have in HA logs? Search for errors related to Nuki Card: you should have errors relative to REST calls to the bridge…

Good Morning, Do you sleep sometimes ;-), the following lines are my log:
2021-08-07 09:09:42 WARNING (MainThread) [homeassistant.components.rest.sensor] REST result could not be parsed as JSON
2021-08-07 09:09:42 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{% set ns = namespace() %} {% set ns.callback_list = [] %} {% if (value_json.callbacks | count) > 0 %}
  {% set hook = states('input_text.nuki_bridge_callback_url') %}
  {% for callback in value_json.callbacks %}
    {% if hook == (callback.url|urlencode) %}
      {% set ns.callback_list = ns.callback_list + [ callback.id ] %}
    {% endif %}
  {% endfor %}
{% endif %} {{ ns.callback_list }}'

Hi and good morning,
guess this was to expect since there is no callback.
I don’t know if this matters but I noticed you haven’t set the long-lived token for the webhook in quotation marks.
Or try with a new long-lived token.

1 Like

This means the bridge answer was not valid and could not be parsed as JSON. Something isn’t going well with the callback REST sensor, but I really can’t understand why…

Anyway, the callback has been correctly configured on the bridge, so the callbacks should arrive. What do you see on the door and lock sensors? Do they update?

Another thing, @Joerg is right, your 4 secrets, none of them is quoted: please update all of them, make sure they are correct, and double quote each entry, like this:

nuki_bridge_url: "http://10.1.10.117:8080"
nuki_bridge_token: "yyxxzzd"
nuki_bridge_webhook: "eyJ0eXxxxxxxyyyyiJIUzI1NiJ9.eyJpc3MiOiI3OGQxMDJkNT"
nuki_ha_internal_url: "http://hass.axel.dom:8123"