Quickly change notification recipients or profiles

I’m sorry if this has been covered but I’ve been searching like crazy. I’d like to set up Vera Alerts so that I can easily change notification recipients based on toggling a scene, virtual switch, etc. Example scenario:

[ul][li]I have Vera Alerts sending notifications (speakable alerts) to a permanently-mounted Android tablet whenever doors/gates/garage are opened. [/li]
[li]When I’m away from home, I don’t want to receive these alerts on my iPhone.[/li]
[li]When I’m home, I’d like the Android tablet to continue speaking all alerts. But I’d also like push notifications sent to my iPhone (e.g., I’m going to work outside so I activate some kind of profile/scene/virtual switch from Homewave to receive the notifications on the iPhone).[/li]
[li]I’d rather not use Arm/Bypass on the sensors since I’m already using a scene to Arm the sensors and trigger a siren when the doors are opened.[/li][/ul]

The only way I’ve been able to figure out how to do this is brute forcing the Vera Alerts UserProfileAssociation via a scene, e.g.,

luup.call_action("urn:richardgreen:serviceId:VeraAlert1", "SetProperty", {PropertyName="UserProfileAssociation", PropertyValue="xxx"}, 32) luup.sleep(900) luup.call_action("urn:micasaverde-com:serviceId:HomeAutomationGateway1", "Reload", {}, 0)
where xxx is the desired UserProfileAssociation such as "[‘DefaultRecipients=’,‘fcol=’]

I’m brand new to Lua (and don’t know how to code in general; I just cobbled this together based on other forum posts). Any suggestions for improvement? I’m forcing the Reload since this was the only way I could make it the Property stick. And one side effect is that the Profile checkboxes under Vera Alerts Settings tab no longer accurately reflect their “true” state.

Thanks

You are using undocumented/private interfaces for Vera Alerts.
So things could change in the future …

You do not need to reload your Vera … but you do need to refresh your browser.

Understood. If things do break, then hopefully it will be for the better… :wink:
Thanks for the great plugins and great support.

@RTS: The same functionality appears to be directly available within PLEG (as shown in the attached screenshot).

That does not make it public.