Group of phones / echos

Newish to rule machine, but not to programming. Itā€™s not obvious, but what can I do so that all my rules go thru one method for sending any given message to all phones? This way I only have to update the list of phones in one rule.

Thanks

what are you using for messaging or notifications?

The send to phone (hubitat app) in rule machine.

You should be able to choose multiple devices to notify.
I use pushover for my notifications and it will notify all of my devices of an event with one rule.

image

Yes. Thatā€™s exactly how it works. And then when I get another phone I have to go update 50 rules. I need to do this better.

I want to write something that sends any passed in message to the phones. Then I can go to that one place and update the phone list.

Ahkay I get what you're saying. I'm talking out loud here (in theory) so maybe something will spark the right dialogue. You'd need a group that your rules can refer to. In that group, you could add and remove devices as needed. So you'd need a way to pass that group variable over to the rule. I have no idea how to make that happen, but that's what immediately comes to mind.

What you would need to do is to set up a central notification rule and then use a global variable to pass the message from one rule to another. So, within whatever rule that is detecting something that you want to notify everyone about, instead of sending the notification, you would update a global variable. Then in another rule you would detect that the global variable has changed and then send that variable to all of your phones. That way, you would only have to update 1 rule.

However, I would pose 2 questions....

  1. You are going to have 50 rules that will notify you about something?
  2. You're going to be adding new phones to your hub that often?
1 Like

And the underlying feature request here (like before in other threads) is a mapping table to map any device to a virtual counterpart or anything like it to prevent everything from falling apart when devices are replaced. I still hope this will be somewhere on the list of features of HE to implement. Would make backups a whole lot more complete too.

This rule is close. Might need 2 globals; one for the message and like a message counter or something. This way I could send the same message back to back.

Sending messages to Alexa is the same concept. I continue to add more of those.

You could...or you could just include the current time with the message from the originating rule. That way the message is always different so the variable always changes.

I hope this might help. I use one rule and one variable to sort this out with many alert rules.

This rule does the actual work. It has no trigger and is called in all the rules I alert with. I use the string variable "alerts_house" to take the alerts and push them to Pushover and announce them on the house. I have another rule which does the same thing except it only announces the alert on my kitchen Sonos.
05%20AM

Here's how I use it. This rule announces alerts for a few conditions with my fish tank. The point being I can change what the variable is and use the same rule (via the Run Actions) to push it out.

I threw together a "notification proxy" app and driver a while back that sounds like what you're looking for:


Would this work for you?

I'm a bit late to this party. However would the new facility to swap devices in RM cure this problem. I.e. replace old phone with new phone. Thus updating all 50 rules

Two different things could solve the problem nowadays:

  • The hub-wide Settings > Swap Apps Device feature (sounds like this might be what you mean? it's not RM-specific, though), assuming your notification devices are not child devices and ineligible for this feature; or
  • The platform-level export/import or clone features, formerly an RM-specific feature that also would have done the same; this offers you the ability to replace one device with another when importing or cloning the app (or rule).

That being said, I'm still using my solution above. Still seems easier to me. :smiley: (Initial setup aside.)

1 Like

Yeah that's what I meant. Bad language on my part :slight_smile: