We have moved at community.getvera.com

Author Topic: Message Priority and Notification Configuration Tab  (Read 602 times)

Offline Theboob

  • Full Member
  • ***
  • Posts: 169
  • Karma: +2/-0
Message Priority and Notification Configuration Tab
« on: August 20, 2015, 07:19:22 pm »
Hi. Couple questions. New to the plugin.

Question 1)
The documentation states that to change a message priority, add "{priority=1}" to the message call.  So here is my generated code for a scene that I modified, but the priority seems to stay the same. What did I do wrong?
Code: [Select]
--[[StartVeraAlerts]]luup.call_action('urn:richardgreen:serviceId:VeraAlert1','DeviceNotification', {Msg='Running%20scene%3A%20Garage%20Door%20Now%20Closed', Name='Garage%20Door%20Now%20Closed', Description='Running%20scene%3A%20Garage%20Door%20Now%20Closed', DeviceID=0, HouseModeMask=undefined, Service='', Variables='', Recipients ='BLAHBLAH'}, {priority=1}, 52)--[[EndVeraAlerts]]

The priority that I added is right at the end. Should it have gone inside the previous {}?

Question 2)
On the Notification Configuration Tab, it seems that everytime I enter that tab, it rewrites the LUUP code in my scenes. That's not really very good for me as I'm writing my own LUUP code for the scenes.

How can I stop it from doing that?

My setup is pretty basic. 2 iPhones receiving alerts via PushOver. Some messages sent need to be high priority (House Alarm, middle of the night).

Offline Theboob

  • Full Member
  • ***
  • Posts: 169
  • Karma: +2/-0
Re: Message Priority and Notification Configuration Tab
« Reply #1 on: August 20, 2015, 09:08:14 pm »
I figured out the Answer to Question 2. The code looks like this. The Priority and Sound parameters are part of the Message parameter:
Code: [Select]
luup.call_action("urn:richardgreen:serviceId:VeraAlert1", "SendAlert", {Message = "Garage Closed at {DateTime(CurrentTime,%H:%M on %A %B %d, %Y)} {priority=1} {sound='tugboat'}", Recipients = "MyProfile", }, 52)

For Question 1, it's a 2 part answer. For starters, don't modify the Automated code added by the Vera Alerts app. ie, all the code between [[StartVeraAlerts] and [[EndVeraAlerts]].  But I'm still NOT sure how to stop it from automagiacally adding code whenever you click on the Notification Configuration tab. Actually, I found one way to stop it. On the SCENE, you can NOT turn on any of the Vera "Notify These Users" when the scene runs. Because, I'm assuming that is what the Notification Configuration tab is looking for when it adds it's own custom code. So as along as you turn all those off and manually add in your own LUUP code, it should work.

Right?


Offline Theboob

  • Full Member
  • ***
  • Posts: 169
  • Karma: +2/-0
Re: Message Priority and Notification Configuration Tab
« Reply #2 on: August 20, 2015, 10:44:45 pm »
Pretty cool. OVer dinner time, the Vera Alerts app must have auto updated. The "Reload" buttons are now gone and it automagically updates on changes. Cool stuff. I like it when stuff just works right.