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.
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!