Having trouble with %device% and %value%

I'm trying to move my last few things from WebCore, but I can't seem to get the %device% or %value% to work correctly. Below is my Rule. It sends either Null or last time Triggered. example: "Yo, Triggered has a low battery. It's at percent." (Triggered was odd and nothing between at and percent.)

here is another response: "Yo, null has a low battery. It's at 0 percent."

Does anyone know what I'm doing wrong?

BTW I know it will only send one at a time. I'm ok with that. My percentage is high for testing. I will have other rules like this for motion and leak sensing.

%device% and %value% are derived from the "trigger event" of the rule. In order to achieve what your after you will need to use the "battery level" as the trigger and then your announcement. You could also add a "wait for event - certain time" if you only want the alert at that time.

Unfortunately, this will not create a "list of devices/values" only the one that triggered it.

Edit: Example rule

Edit 2: That being said, another option is the built-in notifications app, it has this functionality, just not the ability to specify the announcement time.


I was typing something exactly like the above, so I don't have anything to add except that, as you've discovered now, RM doesn't have anything built in quite like webCoRE's "save matching devices to this variable" feature (or even devices as variables at all; %device% gives you a string representation of the name, though that is sufficient for your case--if if were populated). You can probably re-create something with a lot of conditionals (not fun with that many devices), but I like the idea suggested above as a workaround!

Alternatively, there are some community apps that can monitor battery level for you and send notifications like this. Device Watchdog is one I know of off the top of my head.

Finally, you should know that many people find battery reporting unreliable and just use an app like the above (or one of a couple other community solutions) to monitor device activity instead, which can be more helpful to know, assuming you're trying to tell when something may have stopped working. Battery is a bit more proactive and can be if you find the right values to test for, but with how unreliable it can be, you might never. :slight_smile:

1 Like

oh wow. That's a lot different than I expected it to work. Thanks! I can make those changes.

Yep, I don't even pay attention to them. I have some devices that stop working at 70%, 60%, or 50% and others that keep working all the way down to 0%.

I use the community app "Device Activity Check" to monitor if the device has reported within the last day and use that info to check if the battery is dead or the device has fallen off the mesh.

1 Like

Thanks! I do both. Like you said the battery is more of a Proactive functionality. I also do activity check once a day too.

1 Like