Why are these devices listed "device is offline"?

I've had 3 power outages since I setup my Hubitat C8 Pro. When the Hubitat boots up, these same two devices have the red network icon with a line through it as shown in the picture. It says the device is off line, but it works normally. The last time this occurred (during the last power outage) I had to remove then re-add the devices to get rid of the red icon. Is there any other way to resolve this issue with the red network icons?

The feature is broken for Kasa devices brought in through the Kasa Integration app. Best to ignore it. I found that saving preferences is necessary to restore the online status after, e.g. a power outage.

Open the device up, comms error is probably true, or connection is offline or something.

I think running Configure or Saving the Preferences as @hubitrep said should fix it.
It must be an issue only with the system integration? I am still using the community integration and dont have this issue at all. It might depends on what device reboot first after a power outage. Maybe the hub is coming online first before the router or internet.

image

Can’t speak to the OPs setup but here the hub is on ups so comms error gets detected soon after power loss and never gets reset.

AFAIK community integration is identical to built-in. @djgutheinz

My hub, router, and modem are all on a UPS so it would be very rare for the hub to reboot while there is no internet, that also might be why I never see the issue.

Has nothing to do with reboot, at least in my observation.

The Kasa device loses power, the driver detects that, sets comms error to true. Power comes back, Kasa devices resume normal operation (including control from the hub) but comms error is not reset until preferences are saved.

1 Like

Thank you, saving preferences got rid of the bogus offline status. That's a good thought about the boot order. Maybe next power outage I'll disconnect the Hubitat and after power is restored and my Linksys router is back online, I'll power up the Hubitat. It's simple enough to fixt though.

1 Like

It sounds like a controlled shutdown is not involved. I'd try to avoid that. But you can always restore from a backup. Then again, if the radio table (or whatever it's called) gets screwed up, you need a Cloud backup to restore. I once was skeptical and did a bunch of power on and offs, and found out that, yes, it is a thing. I forget if the radio got screwed up though.

Likely won’t make a difference- see my other post above.

The Kasa Integration device drivers work via periodic polling of the device. If the device misses a poll (or a few - I think there is some retry logic) it is marked offline.

You can test this by pulling a plug from its outlet, opening the breaker a switch is on, or unscrewing a bulb for at least the poll interval time.

Recommend user open status setting box and select "comms error" as the attribute to display. None of the attributes listed would generate the wifi icon.

Design:
Error:

  • immediate retry up to 3 times or more
  • During the second, go to app and poll for kasa devices in case IP has changed.
    • Update ip if it has changed and try again
  • Set comms error if errors continue
    • This is the attribute commsError
    • The code does not mark the device off-line (if that is a thing).
  • Reduce polling frequency to alleviate a lot of errors on fast polling.
  • Each poll thereafter

Error clear:

  • If successful, set comms error false
  • Reset polling frequency to user selected.

Community vs Built in: The comunity version is no longer updated. It is deprecated and does not reflect the built-in version.

Note: The staff placed the a hubStartupHandler in the latest version. However, if done right after a total home power failure, this may not find all the wifi devices. It takes a minute or so for all the devices to reconnect to my router.

That "offline" icon was added with the new UI, and I am fairly certain someone asked for it to pick up on the error status of the Kasa devices. This is the second post around this issue I have seen in the last few weeks. I think I told the last person to try configure as well to see if it would clear it.

Thanks.

To solve issue, how does the hub detect off-line from devices? What is required of the driver/device to support this properly.

(I think the code mods by staff in 2.4.1 (hubStartupHandler) were meant to do this. But do they need to wait for a longer period for the network to stabilize. (The mods do a find-devices in the application which will update the IP address of all Kasa devices.)

The driver just has to populate one of the support attributes.

The only other ones I know of are:
healthStatus - online / offline

And then I assume the:
commsError - true / false is also triggering it.

@gopher.ny what drives the wifi icon for Kasa Integration devices ?

Found it (beta forum)

What needs to be successful? After comms error is set to true, no command, however successful, will get it reset to false. I have to save preferences.

1 Like

Found issue. Will take several weeks to get to it. Have to get to a stop point on what I am currently doing. Currently working on Tapo integration (which has same function). I will first try there then open up the Kasa code.

4 Likes

Yes, thanks, I might try a restore.

It's the commsError value.

2 Likes