It’s a warning, not an error, it happens when the automation is triggered by two events in parallel. But I configured mode: single, so it prevents the parallel execution but issues the warning. I will optimize it, but for now I’m concentrated on making it work stable.
Nope, I already thought about that, it will create problems. We have to serialize the execution. Single is good, but it issues that warning. No big deal.
When using queued, the automations are serialized as far as I know, because the next one will start after the first one has ended instead of restart, then the running one will be ended and the newly triggerd one will start.
If you see nothing in output, you have no communication with the bridge, or you didn’t enable the API in the app, but you should because I see you have a token.
You are right, I was thinking at the parallel option. I will think about it…have to do some tests first…
Unfortunately, I discovered in last 2 days that the bridge resets itself and reboots often, even if you send no commands, I think it does it when it loses communication with the lock, or for some scheduled events. If you send commanda in those 5-10 secs, you have no return info, and that’s a problem. I’ve tried to make the automation as resilient as possible for these events, but obviously there are drawbacks. I’ll optimize when I know it’s working pretty stable. Thanks for the hint on queued.
Alessandro, Firmware is what HA reports in Nuki Bridge FW Version. Output of the last command is
|0||
|deviceType|0|
|nukiId|422231005|
|name|Schleiferberg|
|firmwareVersion|2.10.8|
|lastKnownState||
|mode|2|
|state|3|
|stateName|unlocked|
|batteryCritical|false|
|batteryCharging|false|
|batteryChargeState|64|
|doorsensorState|2|
|doorsensorStateName|door closed|
|timestamp|2021-07-23T11:33:54+00:00|
getting this additional error as well
Logger: homeassistant.components.automation.nuki_card_callback
Source: components/automation/init.py:517
Integration: Automation (documentation, issues)
First occurred: 2:19:09 PM (14 occurrences)
Last logged: 2:45:09 PM
Error while executing automation automation.nuki_card_callback: Error rendering data template: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I think then using the “max_exeeded: silent” option is best to use instead of queued, it keeps everything running as is now, without adding entries to the log.
Ok, so the basics are there, so you see the card populated with info of the sensors right? Can you show me the screenshot of the card with all the sensors please?
2021-07-23 14:09:09 WARNING (MainThread) [homeassistant.components.rest.sensor] Empty reply found when expecting JSON data
these are communication errors, the rest sensors called the urls and received bad or no data in return…strange. I have to check if the automation is calling the bridge too often…
when I opened the door no status change on card but the following error in log
Logger: homeassistant.components.rest.data
Source: components/rest/data.py:69
Integration: RESTful (documentation, issues)
First occurred: 3:09:32 PM (1 occurrences)
Last logged: 3:09:32 PM
another error came up
Logger: homeassistant.helpers.template
Source: helpers/template.py:1366
First occurred: 3:11:31 PM (5 occurrences)
Last logged: 3:11:31 PM
Template variable warning: 'None' has no attribute 'batteryCritical' when rendering '{% if states('sensor.nuki_bridge_endpoint_list') == "OK" %} {{ state_attr('sensor.nuki_bridge_endpoint_list','lastKnownState')['batteryCritical'] }} {% endif %}'
Template variable warning: 'None' has no attribute 'timestamp' when rendering '{% if states('sensor.nuki_bridge_endpoint_list') == "OK" %} {{ (as_timestamp(state_attr('sensor.nuki_bridge_endpoint_list','lastKnownState')['timestamp'])) | timestamp_custom("%H:%M:%S (%b %d)") }} {% endif %}'
Template variable warning: 'None' has no attribute 'batteryCharging' when rendering '{% if states('sensor.nuki_bridge_endpoint_list') == "OK" %} {% set battery_level = state_attr('sensor.nuki_bridge_endpoint_list', 'lastKnownState')['batteryChargeState'] | default(0) | int %} {% if state_attr('sensor.nuki_bridge_endpoint_list', 'lastKnownState')['batteryCharging'] %} {{ battery_level }} {% else %} {{ battery_level }} {% endif %} {% endif %}'
Template variable warning: dict object has no element Undefined when rendering '{% if states('sensor.nuki_bridge_endpoint_list') == "OK" %} {% set my_state = {1: 'deactivated', 2: 'closed', 3: 'open', 4: 'unknown', 5: 'calibrating'} %} {{ my_state[state_attr('sensor.nuki_bridge_endpoint_list', 'lastKnownState')['doorsensorState']] }} {% endif %}'
Template variable warning: dict object has no element Undefined when rendering '{% if states('sensor.nuki_bridge_endpoint_list') == "OK" %} {% set my_state = {0: 'uncalibrated', 1: 'locked', 2:'unlocking', 3: 'unlocked', 4: 'locking', 5: 'unlatched', 6: "unlocked (lock ‘n’ go)", 7: 'unlatching', 254: 'motor blocked', 255: 'undefined'} %} {{ my_state[state_attr('sensor.nuki_bridge_endpoint_list', 'lastKnownState')['state']] }} {% endif %}'