Recommendations on how to clear Presence option

I want to hide or remove the Presence part of a device driver so it doesn't report in other apps.

Recently due to using Watchdog I was seeing the same devices repeatedly showing up as not having been accessed.
These devices are in rarely used places - and when I did access them, they cleared right up. so all was normal - just not getting status updates.
All of the offending devices are the same product. This product when installed gets a default "Generic Zigbee Outlet". I posted that I thought there was a bug in the Generic driver since a manual 'Refresh' works, but the automatic checking was not. @bravenel explained it carefully to me and although I didn't really truly get it, I understood I needed to try something different.
I implemented 2 things - I installed Idle Node Refreshers and implemented the OhLa Labs Zigbee - Generic Outlet (with Presence) and my problems went away.
This injected a different problem into my world and I can't find a way to solve it. I recently began work on a touchscreen using HubitatDashboard app for Andriod. In that app, for these devices that are using the OhLaLabs driver - I have 'Not Present' now showing. Since the devices do NOT have a presence sensor in them I know this is a self-induced problem. If the HE Generic driver worked the same as the OhLaLabs driver, I wouldn't have this trouble I guess.
How can I make 'Presence' in a driver NOT work? I have no disable option. Is this a custom driver thing? Should I beg the OhLaLabs to release a similar driver without the presence? Should I modify the driver I use? How does one go forward on something like this?

Which product is this?

Does this help:

  • Copyright 2020 Markus Liljergren (
  • Version: v1.0.1.1123
  • This program is free software: you can redistribute it and/or modify
  • it under the terms of the GNU General Public License as published by
  • the Free Software Foundation, either version 3 of the License, or
  • (at your option) any later version.
  • This program is distributed in the hope that it will be useful,
  • but WITHOUT ANY WARRANTY; without even the implied warranty of
  • GNU General Public License for more details.
  • You should have received a copy of the GNU General Public License
  • along with this program. If not, see
  • NOTE: This is an auto-generated file and most comments have been removed!


// BEGIN:getDefaultImports()
import groovy.json.JsonSlurper
import groovy.json.JsonOutput

// END: getDefaultImports()
import hubitat.helper.HexUtils

metadata {
definition (name: "Zigbee - Generic Outlet (with Presence)", namespace: "", author: "Markus Liljergren", filename: "zigbee-generic-outlet", importUrl: "") {
// BEGIN:getDefaultMetadataCapabilitiesForZigbeeDevices()

I haven't used that particular driver from @markus. But ran into issues with several of his other drivers.

1 Like

@aaiyar oops. I saw your first post, then I saw it get deleted after I replied - the product is an eWeLink Zigbee Outlet.

1 Like

The developer behind this driver is no longer active on Hubitat, so I'd consider moving to something else long-term, like a built-in driver. It's not exactly clear to me what problem you're trying to solve; if it's a Device Watchdog issue, you may just need to increase the "time to consider inactive" setting in that app to reflect the typical time between device events. It does not work well for all devices, given that not all devices generate activity on a regular basis. I'm also not sure I'd really see the use of using it with an outlet, which shouldn't "fall off" your network or be of concern like most battery devices would be, but I suppose you may have your use case.

If you want to keep using this driver, you can comment out the capability "Presence" line towards the top of the driver. Just add two slashes, //, in front of the line (or remove it entirely). You might also want to add a line that says attribute "presence", "string" or similar if that isn't enough to confuse your Dashboard app (it would still get you the attribute for use with Watchdog if it looks for the attribute but not the capability--probably not, at least for initial selection, but may continue working after the fact).

But I'd probably just re-visit what needs you have and go from there.


Interesting. I have several of these on one of my hubs. Using the generic zigbee outlet driver. This is what mine look like:

Screen Shot 2021-08-16 at 13.21.44

1 Like

I tried really hard to be clear and concise. The generic driver works okay - except in low use areas where the Refresh that is built into Watchdog timer doesn't work. @bravenel tried to explain a nuance between the driver and my device not working correctly - not accepting Refresh commands.
When I used the OhlaLabs driver it DID refresh correctly. So to clear the watchdog report, I need to use Idle Node Refresher app to tickle these devices on a daily schedule. And that all is now working perfectly.

1 Like

Just curious, if you run a "Refresh" (without doing anything else) does it update "Last Activity At" in the the device metadata? If so, that would solve the OP's problem, but then the question would be what's different between your two setups. If not, they'd either need to re-write the driver to change some attribute (which I think is the only way to generate "activity," and the Oh-La driver probably does it with presence--which itself is intended to be a way to see if the driver thinks the device is still online-but I'm not sure what, since forcing the "switch" attribute to be considered a state change would cause most subscribed apps to do something in response to that event, same as if it was just turned on after being off, which is definitely not what you'd want).

It would be helpful to link to this discussion since we are all guessing as to the real issue. :slight_smile: Here is my best guess from searching: Generic Zigbee Outlet missing from RM (legacy) with Device Watchdog - #9 by bravenel. In that case, if you're using a custom app, you're at the mercy of however they're selecting devices, or you/someone could modify it as needed. But if you just want to run a refresh command every day or so, you can do that with Rule Machine, and you don't need the "Refresh" capability to do that. As long as the device has the command, which the built-in generic driver does, you can use a "Custom Action" in RM to just run the refresh() command (no parameters).

I might again revisit the particular device: do you have problems with it dropping off your network? I find apps like Device Watchdog useful for battery devices or known "problem devices" (like Xiaomi/Aqara devices), but with most powered devices, this doesn't seem to be an issue for me, and the utility of such an app is greatly diminished. A longer "activity" interval--with the generic driver and without any of the above--may be enough to help if you use this device on a regular basis. Otherwise, hopefully one of the above ideas will also work while solving your other issue (which itself is unclear to me since I don't use that app, but I'm assuming it's capable of ignoring specific devices or not using certain capabilities just because they're there?).


No. Only the "On" and "Off" commands refresh "Last Activity At".

FWIW, I have five of these devices and they have never fallen off the network. The only powered zigbee devices I've had that particular issue with are Ikea Tradfri USB repeaters.

1 Like

@aaiyar - i've miscommunicated. These have never fallen off the network. In fact, they have been the most solid device IN my network! I switched to these after I had been recommended to removing all Peanut units.
The problem is they are not 'used' very often. They are outlets in the Garage that get triggered once a week or so. but they Always work. It's the refresh part that somehow doesn't work using the Generic Driver that led me down this path.
Follow the suggestion of @berabcd1234 I created a new driver by duping the OhLaLabs driver and began commenting out stuff. oh boy. That's a big black hole for me! I'll need to spend time reverse engineering the driver to get all the Presence stuff out of it. I got close by setting a default value to space. but in the hubitatdashboard it appeared as /. I'll need more experimentation - I've never tried to write a driver for HE before.

1 Like

Without the presence stuff, I suspect you'll have the same issue with Device Watchdog, but I'm not sure.