[Project] Device Health Status [Tuya, Aqara, Ikea, Sonoff, Lidl and others]

You can do this using the Rule Machine built in app.
Use cuatom attribute from the capabilities list as the trigger

no status there (online-offline,) just the state (on-off)

Do you have the Status att in the device page?

Yes and I see it on webcore but the trigger not working when I use it as trigger.

I am not sure why RM is not letting you define as a trigger and I am not familiar with webcore.
Sorry

I think maybe it’s related to the driver, it’s smart life driver, but actually if it’s shown inside the device it should be in the rules manager too…

Does the driver you're using actually implement this capability? Rule Machine should let you use any attribute as a trigger. If the trigger you want is not part of a standard capability (and this one is not), you will need to use a "Custom Attribute" trigger. It is not clear from your description where the problem is.

its listed inside the device details and I can see it from webcore as well (I set a variable = status and it gives ONLINE).

You cannot use device data (what you are showing in your screenshot) to trigger automations, only things under "Current States" (top right of the page and what I was talking about) -- those are what generate events. Apps can read device data, but only on demand. If your driver doesn't have a "healthStatus" attribute under "Current States," which you could easily use with RM or webCoRE, then it does not implement this feature as proposed in the original post in this topic.

ok! I see... is it complicated to add this to the driver? Its the smart life/tuya driver, its a main item that refresh and pull data and all devices are child. I changed few things inthere (to make scene act like switch not a push button) but not sure if I could add this capability alone! :slight_smile: do you know where I could find help on this? Or maybe simply toggle a virtual device from the driver on the device data change...
thanks again!
Thanks again!

I just try to install device health status but I dont know how to use it. I see the code in app code but not in the app section ... I think I dont really understand how it work nor what its doing.

Hi @user3930 ,

As @bertabcd1234 said, the healthStatus is a custom attribite. The driver that you are using must send 'healthStatus online' and 'healthStatus offline' events, depending on the detected communication/activity status for the particular device.

What device driver you need to have the healthStatus attribute?

those devices I m looking to use the health status is with the tuya/smartlife driver
I just want to trigger an event when the wifi switch get online to set the right on-off position (power outage or if I unplug it to move it).
I have a online-offline status in the device but not the capability. But inside the rule manager I cant see the status even after installing your app.
It must not be compatible I guess!

Can you post a link to the driver?

Unfortunately, Jonathan is not active in this forum anymore, and the latest version of the "Tuya IoT Platform (Cloud)" driver does not have the healthStatus implemented .. : (

is this a big job or is it something that could be done by myself? I m not a programmer but I already added some line in the driver to make scene act like real switch and not just a push button...
But its with some code found on forum that I tested until it works...

This is a rather complex driver.... It will not be very easy to add healthStatus to each of the child devices.

All Tuya plugs that I know will retain the power-off behavior setting, so there should be no need to set it up again every time. You can do this from the Smart Life app.
Or this is not working even when you use the Tuya Smart Life? Have you looked at all the available settings there?

Actually, my wifi plug is used to turn on and off some light at specific time of the day nor when I come back home during the night and outside the period...
I would like to be able to unplug this switch and to turn it on when plug again if those condition are meet... Like if a power outage happen it would self turn on when it comes back if the trigger time is pass...
For power outage I could use another plug with the healthstatus but if I unplug the switch and plug it back it wont do anything...
The only way is to check the status every minutes... its a little overkill I think! :slight_smile:

The "Device Health Status" app ver. 1.0.8 was pushed for update via HPM.
It adds the "MAT" (Matter) controllerType as a physical device type.

image
Now, with this option switched on the Matter device will not be filtered as virtual/unknown type anymore.

Coming soon - healthStatus custom drivers for Matter bulbs and Matter plugs!

sneak peek:


Vote for the Linptech Human Presence Sensor with 24G mmWave Radar in the Product of the Year Elevated by Hubitat in 2023 !


3 Likes