Vera Alerts - Vera Plugin for Notifications
VeraAlerts provides notification of events that were originated from your Vera Home Automation system and delivered to an external device such as your mobile phone.
In addition to the text of the notification, Vera Alerts can also specify how a Notification is presented to the uses. This could include such things as controlling color, arrival ringtones, converting message text to speech, ...
The original author was Richard Green. Improvements were made by Richard Schaefer and Pieter Buts.
The VeraAlerts plugin has grown to take on an additional role as an alternate to Vera's notification service, providing Templated Text Expansion, and increasing set of target profiles as well as the ability to forward the notifications to other plugins such as the Push Notification or Sonos plugins.
It has been designed to easily handle new notification profiles as technolgy evolves.
Dependencies
- MiCasaVerde's Vera Home Automation controller
Details of this can be found at their website at http://GetVera.com.
- The Vera Alerts Plugin from Vera Apps Store. Click HERE for details.
Features
The feature set includes:
- Integrates nicely with the Existing Vera Notifications system. Notifications can be initiated from any of the following:
- The Notifications Tab of any Vera Device supporting notifications.
Select a User to receive the notification. See the Settings to see how this is handled.
- When a Scene's triggers are activated in the Scene's, Trigger's, edit tab.
This is similar to the Device Notification above. Just select a user.
- As the ACTION of a scene or PLTS/PLEG plugin.
- Go to the Advanced tab for the scene, or the PLEG/PLTS Plugin's Actions.
- At the top where it says: Pick a Device; select your Vera Alerts device.
- Select the SendAlert action.
- Add your message, and optionally your recipients (User Names, Profile Names, email address, or leave it blank to use the default recipients).
- From LUUP/LUA code you may write for Vera.
luup.call_action("urn:richardgreen:serviceId:VeraAlert1", "SendAlert", {Message = "Message String {tone:1}", Recipients = "Profile1, Profile2"}, 83)
- Support for multiple Notification Profiles.
- Vera Alerts Mobile (Currently Android, but IOS soon)
- Vera Alerts Mobile via Local Area Network WiFi connection
- Pushover Mobile (IOS and Android)
- Emailed via SMTP Mail Server. This does not use the MiCasaVerde's servers!
- Twilio Service ... Supports Voice Call to any phone and SMS to Mobile devices.
- Pushbullet ... (IOS and Android, Desktop)
- Pushalot ... (IOS and Android)
- Prowl ... (IOS and Android)
- Forwarded to another Vera Plugin such as the Push Notification or Sonos plugins.
Each profile provides its own specific options to customize how the notification message is delivered. See details of the various profiles below.
- Support for Multiple Users. Each user can have one or more Notification profiles associated with them.
You might use a Virtual User to identify a Wall Mounted Device to announce notifications.
- Override/Customize the Vera supplied Notification messages.
- Messages Strings can use Templates to access just about any variable from any device in Vera. No need for luup code ... but the syntax can be detailed.
- Provides a nice Web Based Report of all of your Notification settings.
License
When first installed you will have 30 days of unlimited access. After 30 days you will be allowed to use this software without a license with a max of 2 profiles and 20 messages per Vera Reload.
The purchase of a license will provide you unlimited messages for 2 profiles. The license is tied to your Vera via it's serial number. The cost for a license is $5.95 US and is a one time fee. If you need more profiles you can purchase multiple licenses.
If you change or upgrade your Vera you will need a new license (remember the license is tied to your serial number). The upgrade policy is as follows. If you have N licenses ... we will provide you with N Licenses for the price of N/3 rounded up to the next whole licenses. (i.e. if you had 1 license you will need to buy 1 license. If you have 5 licenses, you will have to buy 2 licenses). After purchasing your new license(s) email us to obtain your additional licenses.
You can purchase your license from the Registration Portal, which is accessible from the Plugin Device. You can always go back to the Registration portal if you want to obtain an additional license and/or retrieve your license key.
General Setup
Operation is as follows:
- Standard MiCasaVerde notifications are detected and processed by the Vera Alerts plugin as well as being sent to the MiCasaVerde servers for standard notification capabilities. More on this in a moment. At this point we have a MiCasaVerde formatted Notification Message and a (possibly empty) set of MiCasaVerde users.
- The Vera Alerts Plugin looks at the Set of users and converts that into a Set of Profiles to send the Notifications to.
If no recipients are specified. Vera Alerts will use the DefaultRecipients.
- The Vera Alerts Plugin looks at the Notification Message and has the option to modify or redefine it.
- Each Selected Profile sends the Modified Notification Message to the associated target device specified by the profile.
This is all controlled by the Settings, Profiles, and Configuration options described below. There are a lot of profiles supported. Just choose the ones that meet your needs.
A negative aspect of not being integrated by MiCasaVerde directly is that you MUST revisit the Configuration tab whenever you make any changes (add/modify/delete) to any notification in Vera. That's because this is where Vera Alerts Looks for, and places a hook to the Standard notifications.
If you want to send different Notifications to different Profile(s) then you will need to create multiple Vera Users. These users do not have to be physical users. For example you may create a logical user to represent an In House Verbal Notification system.
This is done from the Vera Web Dashboard ... ACCOUNT tab and Other Users sub tab.
Since this does not replace the MiCasaVerde notifications, you may want (but do NOT have) to disable the email and SMS notifications for each Vera user defined on the MiCasaVerde servers.
Profiles
Each profile has a unique name (That you can change) that uniquely identifies it.
Most profiles support a Parameter called MessagePrefix. The contents of this field will be inserted at the beginning of each Notification Message for the particular profile. Anything that is legal in a Message ... is also legal in the MessagePrefix field. If you have multiple Vera's this is useful for tagging which Vera is initiating the Notification, or for global message options like {timestamp}.
Vera Alert Mobile and Vera Alert LAN Profiles
Vera Alerts Mobile sends the Notifications to the Vera Alerts Exchange and then off to your Android phone using Google's GCM (Google Cloud Messaging). The GCM provides for storing the message until your phone is ready to receive it. Vera Alerts Mobile LAN sends message right from Vera to the Mobile App without any intermediate stops.
Both Profiles support the following options:
- Assign your message to one of 5 Alert Levels.
On your mobile device you can specify which ring tone is to be associated with each Level.
- Device Identifier:
The ability to specify your Vera Alerts Device Identifier. This identifier is like an email address for your phone.
With the LAN version, you specify the Host and Port information.
In either case the Vera Plugin and the Vera Alerts Mobile Device must share the same configuration information.
- Text to Speech:
In addition or in lieu of an Alert Tone, the message can requesting that it is announced by the phone's Text to Speech engine.
- Support for EarCon
This provides the ability to embed sound files in your TTS announcements. This can be something like a voice recording of you yelling at the dog to get off the couch!
- Support for Pauses
This provides the ability to embed pauses in your TTS announcements.
- Attach a picture(s) or short video clip(s) from one or more of your Vera cameras at the time of the notification.
- User Defined Tags:
The ability to specify user defined tags for any message. You can use these to logically categorize your messages.
- Message Color Tags:
The ability to specify some background and foreground colors for messages. You can use these to visually categorize your messages.
Create a separate profile for each Mobile device you would like to send notifications to.
See: Vera Alerts Mobile documentation for appropriate syntax.
Pushbullet Profile
Pushbullet sends the Notifications to the Pushbullet Server and then off to your Android or IOS device. To use this you will need to do the following:
- Signup at http://Pushbullet.com
- Install the Pushover App on your Phone (Android or IOS). Also available from a browser on your Desktop.
- You can get your AccessToken from the Settings on the Pushbullet web page.
Pushover Profile
Pushover sends the Notifications to the Pushover Server and then off to your Android or IOS device. To use this you will need to do the following:
- Signup at http://Pushover.net
- Install the Pushover App on your Phone (Android or IOS)
- When you signup you will be able to see/obtain your User Key. This will be saved in the Profile Parameter called UserPushoverID
- You next need to create an Application (on the same Pushover page). Do not worry ... you do not need to write any code.
- Download the Vera Alerts Icon from HERE
- Name your application Vera Alerts
- Set the Description to Vera Alerts
- Set the URL to http://rts-services.com/Vera/Plugin/VeraAlerts
- Choose the icon you saved from Step 1
When you do this you will get an Application API Token/Key. Use this value for the Profile Parameter called AppPushOverID. If you leave this field blank, you will share the default app with others. The shared app has a limit of 7500 msgs/month. If you create your own application ... you will have 7500 msgs/month for yourself!
Create a separate profile for each Mobile device you would like to send notifications to. You will only need one account on at http://Pushover.net. In each profile you will set the MessagePrefix as follows to identify which device to send the message to:
{device=YourDeviceNameAsListedOnThePushOverWebSite}
If you do not provide this .. it will send the message to all devices in your Pushover account.
SMTP Mail Profile
The Vera Alerts plugin allows you to send messages to any email address. This was added because of the problems with the MiCasaVerde's problems with delivering notifications. It has the other nice benefit of being able to attach Pictures to the Email, from cameras that you select, at the time of the notification.
To attach a picture add the following to your message for each camera you want to capture and attach:
{Picture(XXX)}
Where XXX is the Vera Device ID for the Camera.
This also supports the ability to override other profile parameters such as:
- {From=XXX@YYY.com}
- {Subject=This is a serious alert}
The defaults for this Profile are setup to send mail via your GMail account. SMTP settings can be complicated. You should be able to get the appropriate settings from your existing mail client.
If you use the Advanced Tab of a Scene or the PLEG/PLTS actions, or if you use LUA/LUUP then you can specify any target email address by supplying an email address as one of the recipients:
Email@SomeServer.com
This will override the To setting in the profile.
Twilio Profile
The Twilio service allows you to have your Notifications sent to ANY phone and to be spoken to the person who answers. By default there is no retries if the phone is not answered. You can also have the messages sent via SMS to any SMS enabled device. It costs $1.00 US/month. You can try it for free. But they add sales information at the beginning of each message.
To setup:
- Go to the http://Twilio.com website.
- Click the Signup For Free
- Click the Get Started
- You will ultimately end up with 3 pieces of information from this Getting started process.
- Your Account SID which will be stored in the Profile Parameter called TwilioAccountSID.
- Your Auth TOKEN which will be stored in the Profile Parameter called TwilioAutgToken.
Note: you will have to click on the little lock to see this value.
- The temporary phone number they provided. This is the number that the messages originate from.
If you pay for the service ... you get to find a phone number that you like. And this is what you are paying $1.00 US/month for.
You can call a number other than what is in the profile by using the following in the message:
{Called=+1 123-456-7890}
Note: That any number you call must first be validated on their website. So you can't use this for tele-marketing.
This service has the potential for bi-directional control. If you were to call your purchased phone, or as a result of the message you send to others, you can setup automated voice/response to initiate various activities. I will leave this as an exercise to the user to take advantage of these features. The parameter in the profile called TwilioCustomURL facilitates this activity.
Forwarded Plugin Profile
This is an ADVANCED USER feature. It allows you to use forward notifications to other Plugins in Vera. This is useful if Vera Alerts does not currently support a Profile for your needs. You need 4 pieces of information to use this.
I have summarized them for some existing Vera Plugins. In addition to the Plugin Device ID you will need:
- Homewave IOS Push Plugin
ServiceID = urn:intvelt-com:serviceId:HWPush1
Action = SendMessage
Args = Msg="{Message}"
- Push Notification Plugin - Prowl
ServiceID = urn:upnp-org:serviceId:IOSPush1
Action = SendProwlNotification
Args = Event="Notification", Description="{Message}", Priority=2, URL=""
- Push Notification Plugin - PushOver
ServiceID = urn:upnp-org:serviceId:IOSPush1
Action = SendPushOverNotification
Args = Title="Notification", Message="{Message}", Priority=1, ImageURL=""
- Twilio Plugin
ServiceID = urn:twilioapi-org:serviceId:TwilioInterface1
Action = CustomVoiceCall
Args = Message="{Message}", PhoneNumber="555-5555-1212"
- Sonos
ServiceID = urn:micasaverde-com:serviceId:Sonos1
Action = Say
Args = Text="{Message}", Language="en", Volume=60
- DLNA
ServiceID = urn:dlna-org:serviceId:DLNAMediaController1
Action = Say
Args = Text="{Message}", Language="en", Volume=60, Engine="MARY"
You can add or override any arguments passed to the forwarded plugin via the luup.call_action using the following IN THE message text:
- {ArgN=ValueN}
Do not need to quote the ValueN!
Send Alert Now
This allows you to send messages instantly ... This is useful for testing profile specific message overrides and templated message strings.
You can specify any combination of the following:
- The Recipients type in box. This is useful for typing in email addresses. But you can also type in Profile or User Names. This is how you enter data in the Advanced tab for Scenes and PLEG/PLTS actions.
- Select a user. This will send the message to any profile associated with that user(s).
- Select a Profile. This will send the message to the specified profile(s).
Note: The Message Processing will only send 1 message to each profile. So if there is duplication .... don't worry!
Settings
There are a few global settings described below:
Internal Alerts
If enabled, VeraAlerts will send an alert anytime its internal configuration is changed or Vera is restarted. These messages are sent to the Default Recipients defined below.
Process Notifications
If enabled, VeraAlerts will handle notifications in parallel with the standard MiCasaVerde handling of notifications.
Debug
Turns on some debugging information in the logs. You can see the results of a message my monitoring the Log when you send a message.
You can monitor your log with the following url:
http://Your.Vera.IP.Address/cgi-bin/cmh/log.sh?Device=LuaUPnP
User Profile Association
This is a two column table. All defined Vera Users plus one called DefaultRecipients on the left side, and the set of currently defined profiles on the right.
Select a user from the Left column, then associate one more profiles with that user.
As mentioned earlier, the DefaultRecipients is used when a Message is sent and NO recipients are indicated.
Notification Configuration
Note: That you need to open this tab when every you add, delete, and/or modify any Notification in Vera if you are using VeraAlerts to deliver the notifications.
If MCV would provide a hook I have requested this would go away ... see Requests below.
In this tab you have the option to override the default message associated with any of the Notification you have created in Vera. The override message can also have dynamic content in the form of Templates. When these notification messages are expanded the following templates definitions are also available:
- {Name}
The name of the Notification
- {Description}
The description of the Notification
- {DeviceID}
The Device ID that caused the Notification
- {Service}
The Service ID of the variables that caused the Notification
- {Variables}
The device variables that caused the Notification
If you want to see what these look like just override one of your notifications with the following template:
Name={Name} Description={Description} DeviceID={DeviceID} Service={Service} Variables={Variables}
Issues
Requests
- If you would like to have the ability to use this plugin as the default notification plugin in Vera ... please express your opinion here
Almost there ... but you still have to open the Notification Configuration tab if you change any notifications.
- Add back support for GoogleTalk
- Add Import/Export of settings.
Click HERE for a release history of this plugin.
Contact me at Schaefer@RTS-Services.com
|
© Copyright 2017, RTS Services Inc. All Rights Reserved 1675 Hickory Creek Rd Marble Falls, Tx 78654 |