Renamed Event Devices are not renamed where they appear in rules

15 views
Skip to first unread message

ChrisM

unread,
Jan 29, 2023, 1:49:46 PM1/29/23
to MppDevices
Hi Mike when an event device is used in a rule, and renamed, the name of the device is not always updated in the rule.  

It seems that where the event device is used in an "on event" trigger in a rule, the name is not updated.  But where the event device is used in an action such as "set devices" the name is updated.

Weirdly, everything still seems to work properly even my IFTTT button recipes that call the old event device name.

Any thoughts?

Chris 


Mike P 4 MPP

unread,
Jan 29, 2023, 3:24:17 PM1/29/23
to MppDevices
Thanks a good question as it's a bit tricky.

An event is identified by a unique string which can't be changed.  It's used in event triggers as that string, if you send an HTTP post with that string to the AM REST API you can trigger it externally.
If you need to change an event string you would delete it and create a new event with the new name.

An EventDevice is created to wrap your defined events and/or if you create an EventDevice in the custom menu.  If you create an EventDevice initially the event and the device name are the same, and you can see the event in the UDN of the device.  If you remove an event you may need to "forget" the device that was created for it.  
Turning on an EventDevice will trigger the event it's been assigned, it will change state to ON for a short time then turn itself back OFF to allow the next trigger. 
Renaming an EventDevice renames only the device but it doesn't change the event string - you'll still find that event in the events list and the EventDevice UDN.  If the event is still in the list but you've removed the EventDevice for it, an EventDevice will be recreated (with that event name) next time you save your rules.
The triggers for the device should the device name, the triggers for events will continue to show the original event name.

In the rule you can use the event itself in triggers and in actions or you can use the EventDevice just like any device - if the event externally is triggered it will turn the device on for a short time too.

ChrisM

unread,
Jan 29, 2023, 4:49:35 PM1/29/23
to MppDevices
Thank you Mike. that is very helpful.  Just one last question please.

Right now when I create On-Event trigger, a list pops up with all of my events.  That list includes "legacy events" i.e. events that I no longer use.  Is there a way to remove/delete the unused events from that list?

Thanks again

Mike P 4 MPP

unread,
Jan 29, 2023, 5:18:30 PM1/29/23
to MppDevices
If you've removed an event from all of your rules (triggers, etc) it should be removed when you save the rules - easiest is to use the "Event" drop down in the rule editor sort to find them and remove the rules.  Once they're gone you can remove the EventDevices and they won't reappear.

ChrisM

unread,
Jan 29, 2023, 5:20:15 PM1/29/23
to MppDevices
Thanks Mike
Reply all
Reply to author
Forward
0 new messages