kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
179 stars 35 forks source link

Nuki door sensor response time #114

Open Nebur692 opened 1 year ago

Nebur692 commented 1 year ago

Goodnight,

I have the Nuki 3.0 Pro connected via wifi and using your web api integration. I have the Nuki door sensor.

My problem is the following: When I open the door, Home Assistant takes about 28 seconds on average to receive the opening of the sensor.

This is a problem since I have made an automation so that it turns on the lights when the door is opened.

Is there an option to reduce the communication time?

kvj commented 1 year ago

Hey,

I have the Nuki 3.0 Pro connected via wifi and using your web api integration. So you don't have any bridge, right? In this case, the integration is polling the device state using Web API (using the polling timeout you've set in configuration) and no immediate state is being pushed to the HA. That's expected.

bdurrer commented 1 year ago

I would expect the integration to not wait for the interval and refresh it's state immediately after issuing an action by web api. It knows exactly that the local state is outdated at this point.

Maybe it would also be nice to expose a HA service to trigger an immediate update

kvj commented 1 year ago

I would expect the integration to not wait for the interval

I get your point, but it won't change the whole state of things much. Even if this forced refresh could detect the latest state, then it won't be updated until the next scheduled refresh, so door sensor will be reported as "open" when it's closed already.

refresh it's state immediately after issuing an action by web api

Why can't you then trigger your automation right after this?

Many, including me, just use more reliable door sensor, z-wave or zigbee for such automations and don't rely on Nuki.

mindgam3s commented 2 weeks ago

Many, including me, just use more reliable door sensor, z-wave or zigbee for such automations and don't rely on Nuki.

because the sensor is already there and we do not want to use another sensor on top