Log DeviceID from RM rule to Global Vairable for Pushover Notification

I am trying to create a RM rule which will log the device ID of switches that aren't turning off after repeating rule sends several times the command to turn OFF, but the switch remains on.

I'd like to track that event switch and send the device ID to to a global variable. I'm then sending a pushover message with a link to the cloud-endpoint of that specific device(s) to command them off.

Example:
Lamp (DEVICE ID: 412) left on.  
   Global Variable: %switchID% sets to 412. 
      Pushover notification includes html link to "https://cloud.hubitat.com/api/074a5084-05a5-4146-8701-xxxxxxx/apps/674/devices/%switchID%/Off/?access_token=XXXXXX-XXXXXX-XXXXXX"

My questions are can a device ID be logged from within RM rule? How do I get the RM rule to set the global variable for the event switch that was left on?

1 Like

I'm not confident at all tbh. I would be nice to send a link to turn it off using the command link and then a link underneath it to view the devices status.

The group didn't work out well in RL. I think it's due to the different types of switches and bulbs the group consists of. I even tried Bruce's ALL-OFF app, but still came home to lights staying on.

I definitely want to incorporate the notification link of the devices that didn't turn off after several attempts. The links are useful to me to see if it'll address that particular device without going into app while i'm out and about and having to navigate to that specific device to troubleshoot. Just a convenience feature added to the rule since the modified Pushover driver allows for links.

1 Like

If deviceID isn't extractable, I am leaning towards making a new rule that's triggered by a virtual switch. That VS switch will be triggered at the end of the original repeating rule finishes.

Once the rule is triggered, it'll look at each and every individual devices IF statements to see if the device has been ON for longer than X amount of time and then send that devices specific link that I'll need to populate for each device the if statement and the command/status links to send. TG RM has a copy/paste feature to speed it up a bit.

Just seems time consuming... I was hoping it would be easier to track and extract the culprit device from within RM rule.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.