We have moved at community.getvera.com

Author Topic: How to Pass device info to the Notification?  (Read 1142 times)

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1985
  • Karma: +61/-193
How to Pass device info to the Notification?
« on: February 05, 2017, 01:53:02 pm »
I'm trying to make my Notifications more robust, hopefully without needing to create a ton of new ones.

Example of existing Condition...

SleepMode AND (PlayRoomMS_armed or MediaRoomMS_armed or OfficeMS_armed or MudRoomMS_armed or GarageMS_armed or Garage2MS_armed or LivingRoomMultiMS_armed)

I'd like to have the Notification pass through WHICH device was True so i know which motion sensor is getting triggered.

It this possible / how?

thx



Offline RichardTSchaefer

  • Moderator
  • Master Member
  • *****
  • Posts: 10091
  • Karma: +764/-143
Re: How to Pass device info to the Notification?
« Reply #1 on: February 05, 2017, 03:37:33 pm »
You can use Conditional Logic (with PLEG expressions) determining which String you pass to the VeraAlert SendAlert action.

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1985
  • Karma: +61/-193
Re: How to Pass device info to the Notification?
« Reply #2 on: February 06, 2017, 12:11:00 am »
You can use Conditional Logic (with PLEG expressions) determining which String you pass to the VeraAlert SendAlert action.

 I learn best by example :) ... Can you point me to a posted example?  I'd like to have the name of motion sensor(s) that were tripped listed in the Vera Alert Notification. So I suspect it would be something that looked at the MS status for each.

thanks!

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: How to Pass device info to the Notification?
« Reply #3 on: February 06, 2017, 06:17:26 am »
I Have a similar PLEg for all my sensors , to check when I leave my house and doors - windows are closed.

Maybe this helps for you as well.

For every sensor 2 triggers ( open and close)
and a virtual switch which triggers it all , for when I want to check what is open and close.

Condition which sends me a notification when all sensors are in the correct state, including timers to have a bit of a delay:
Code: [Select]
Z_check_sensors and ( Z_check_sensors ; ! Timer_xx_seconds) AND Z_frontdoor_closed and Z_frontdoor_locked_good and Z_Bathroom_window_closed and Z_Garage_closed AND Z_Window_living_left_closed AND Z_Window_living_right_closed AND Z_Window_kitchen_closed AND Z_Window_corridor_dwn_closed AND Z_Window_bedroom_closed
And for every sensor another condition which sends me a notification if the sensor is in the other position:
Code: [Select]
Z_check_sensors and Z_Bathroom_window_closed_fail
Cor





Offline Aaron

  • Hero Member
  • *****
  • Posts: 1985
  • Karma: +61/-193
Re: How to Pass device info to the Notification?
« Reply #4 on: February 06, 2017, 10:44:07 am »
@Cor, you have separate notifications for each sensor - this is what I'd like to avoid. For my Condition (above), I'd like to have a single Notifications that tells me which sensor is tripped. I have over 50 sensors, to create a condition and notification for each is tedious and if I need to change/add anything a major PITA especially with how buggy Vera is to add/change/save message overrides.

Offline Cor

  • Hero Member
  • *****
  • Posts: 1249
  • Karma: +8/-4
Re: How to Pass device info to the Notification?
« Reply #5 on: February 06, 2017, 11:04:55 am »

Offline Aaron

  • Hero Member
  • *****
  • Posts: 1985
  • Karma: +61/-193
Re: How to Pass device info to the Notification?
« Reply #6 on: February 08, 2017, 08:14:48 pm »
You can use Conditional Logic (with PLEG expressions) determining which String you pass to the VeraAlert SendAlert action.

Richard, I cannot find any examples of what I want to do.

example...

CONDITION
PlayRoomMS_armed or MediaRoomMS_armed or OfficeMS_armed or MudRoomMS_armed or GarageMS_armed or Garage2MS_armed or LivingRoomMultiMS_armed

NOTIFICATION  <pass only the sensor that are tripped>
These sensors tripped, OfficeMS_armed, MudRoomMS_armed

do you have example code?  thx