Question about refreshing devices state automatically

Is it possible to configure Hubitat to automatically update the devices state after sending commands to them? I haven't found any configuration to do that, maybe it's doable via custom app.

Why Hubitat does not update the device state automatically? Example, when interacting with an outlet, if we send the command "on", the real device goes to the "on" state but Hubitat continues to hold its old state "off".

It does automatically update the device state as soon as the device indicates to the hub that its state has changed.

Imagine this - a device is sent the command to turn "on". For whatever reason (poor mesh?), the device doesn't receive the command. Should the hubitat device page be automatically updated to indicate the device is "on" as soon as the command is sent in this scenario?

OTOH, if a particular device doesn't indicate its state unless it is polled after each command, it should be up to that specific device driver to implement that - and not done globally.

2 Likes

I understand and agree with what you are saying, that makes sense, thanks.

So I presume the problem is that the device receives the command "on", it changes its state and does not notify Hubitat. Hubitat only shows the correct device state when I send/hit "refresh".

I'm talking about the device Ikea TRADFRI Control Outlet. I haven't installed any drivers for this device.

I have 5 of these. They definitely report their state back to the hub! So I'm not sure why yours aren't. Which driver are you using for them?

Also, can you click the "Configure" button on the device page for one of your outlets and see if it starts reporting changes automatically?

2 Likes

Thank you so much for this information.

I haven't installed any drivers for this device, Hubitat has discovered/configured automatically without any drivers. If this is an incomplete or wrong configuration, please let me know how to fix it.

When I click in the "Configure" button on the Hubitat UI for any Ikea outlet device, nothing happens.

You won't see anything happen. But can you check if the device now starts reporting on and off without your having to click "Refresh"?

The device is now reporting its correct state after sending the commands! I have missed this step of invoking "Configure".

So, I need to invoke "Configure" for all my devices after discovering them, right?

1 Like

Not normally. But if a device doesn't work in the manner you described, this would be the first thing to try.

Edit: OTOH, it won't hurt anything to click on Configure after adding a device.

1 Like

Hi, I have pretty much the same question. But mine is when I manually close the garage door using the physical button, hubitat will not update the status, unless I go in and manually click the update button on the device page for the garage door. How can I get this to just occasionally sent out a refresh command? There is no "configure" for this device.

The former posts here are all well and good, but don't apply to devices such as most deadbolts/dry contacts/etc which:

  1. are often operated manually just as much (if not more often) than via z-wave commands and
  2. only report their status after receiving a z-wave command and NOT after being manually activated

I made a Rule Machine automation for this, specifically for our Kwikset 910 front door lock (and soon to apply to the garage door opener), which updates its current lock status just fine if lock/unlocked via z-wave, but will never update if manually locked/unlocked, or the keypad is used (it does technically send event data to the hub, but not "lock/unlock" events, because kwikset sucks at implementing z-wave). This kind of thing is rarely Hubitat's fault, most battery powered z-wave devices made pre-2019 just suck and there's no way around it.

I called the new automation Auto-refresh. I set the Required Expression to be TRUE (run the rule) between 7 am and midnight (neither wife nor I will be manually operating the deadbolt while asleep, and contact sensors take care of security). I then set the trigger event to trigger every 5 minutes, and the action to run was Refresh: Front Deadbolt. Roughly half my devices support Refresh, but most don't need it.

What this does, every 5 minutes between 7 AM and midnight, is just send a wee lil refresh command to the lock, which then reports its current status. So let's say I'm just quickly going out at 10pm to put out the trash, manually unlock the deadbolt, come back in, and oops forget to manually re-lock it. No matter, in the next few minutes the Auto-refresh rule will run, update the lock's status, and boom I get my "door unlocked!" notification before bedtime so I don't wake up to the dog having let herself out again (I really thought a round doorknob would stop it, but she's crafty, only the deadbolt stops her). Without the Auto-refresh rule, its status will sit there as "locked" till the next discrete z-wave command is sent and it replies with its current status.

I have noticed my lock's battery is draining about 10% more quickly than before, probably because of the 12 refreshes/hour, but well worth it to keep everything synched up.

Hope this helps others in the same boat. Very few posts about this edge case.

1 Like