Some of my things have batteries and was wondering what is the best way to have an event/rule notify in two ways, one, send notice to phone via sms and also change the color of a tile. With the tile piece, would I be able to make it smart enough so if I have a sensor like a motion detector which may not have a tile always on, then it would need to add a warning tile or something.
Being tech savvy, I imagine there are a number of ways to achieve, but am thinking I am over thinking and was hoping for input.
Mark-
Thanks for posting. It sounds like we are looking at two battery related items, so Iâll cover each accordingly:
Low Battery SMS Notifications
There are a couple of different ways to setup rules depending on what you are trying to accomplish. If you want an SMS notification as soon as the battery goes below a certain threshold, you can setup an event trigger where the battery is less than a specific value:
One challenge with this approach is anytime another event is received where the value is below the set threshold, it will trigger the notification again. For battery values, this likely isnât what you want as each time the battery gets reported, youâll get another notification.
An alternative approach is to use a time based trigger to periodically run the rule - almost like running a âreportâ. In this approach, you could set up a daily timer event to kick off the task⌠then in the task, use an IF condition to determine if the battery value is below a certain threshold and then send your desired notification.
Some people like to create a separate dashboard just for the status of their batteries. On this dashboard, theyâll add their various battery powered devices to the dashboard and then change the tile type of each to a âHero Attributeâ so they can display the value of the battery on the tile. While this doesnât give you the color that you were asking about (more on that in a bit), it does give you a quick place to look and see what the battery status is of multiple devices.
You can find more detail on using Hero Attribute tiles here:
The tile coloring is currently based on a concept of default and active states. The active state is based on the core capability of each device - so a switch is active when its âonâ, a lock when itâs âlockedâ, a door when itâs âclosedâ, a music player when itâs âplayingâ, etc.
That being said, weâve been thinking about a couple enhancements which might help. One is a dedicated battery tile layout - something that would have a simple visual indication of battery level (like a battery icon that shows how âfullâ the battery is). I hadnât thought much about color for that tile yet, but itâs a good point that perhaps the color should reflect red/yellow/green status based on how full the battery is!
Thanks for hte info on that Josh. Seems though that you still have to do one at a time and therefore create X number of these per each device. Is there a way to group âthingsâ? Then be able to select a group for the trigger or within a flow?
Yes, in the current Rule Engine design, youâll need to select each trigger, action, or condition individually.
That being said, you can create multiple triggers for a single rule and the rule will trigger if any of the triggers occur (eg. they are ORâed together). Similarly, an IF Condition can have multiple things in it and you can choose between any or all of the conditions needing to be met (eg. OR / AND)
@James is the lead Rule Engine developer and has been looking at options for improving multi-device selection. Thanks for sharing your use-case around multi-device selection in triggers and other parts of the flow - itâs always helpful to have specific use cases and examples to better understand potential enhancements!
I also think having a tile that would reflect green / yellow / red for battery life would be great. I already have a page full of battery status tiles. I like the once a day poll of all batteries that would send a SMS alert below a threshold. I already discovered any other way gets you endless text messages!