The Vera Community forums have moved!

General => Remote Control => VeraAlerts => Topic started by: RichardTSchaefer on February 11, 2013, 05:15:54 pm

Title: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 11, 2013, 05:15:54 pm
There is an Android Version 3.0 and a Plugin Version 3.0.

The plugin version of 3.0 fixes the {TimeStamp}  field that I broke in version 2.0

The KEY feature for 3.0:
The ability to take  a snapshot or short video of a camera in Vera and attach it to the notification.
I need to work on the Video some more ... at this time all of Video Data is read at one time into Vera memory ... so keep the videos short for now. This is a function of amount of free memory on your Vera. I have test with 10-30 second clips. I have some ideas on improving this ... but not done yet.

In order to receive the Snapshots and Videos, your Android client will need to access your Vera to download these. These files are too big to send trough Google's Cloud Messaging. So in the settings page on Android is a place to set your UserName, Password, And Serial Number (info needed to connect to your Vera at cp.mios.com).

This will start the download as soon as it receives the Notification ... Chances are it will be downloaded before you get to look at it.

Once you get your Snapshot in the Android App ... there is a button to get a current snapshot.  This will be extended to videos when I solve the above problem.

With Videos you can zoom/pan and go backwards and forwards (like a DVR) .... Click the < and > keys to speed up ... touch the screen to pause.

And last ... in order to use this feature; add the following to your Notification Message:

{Picture(XXX)}  or {Video(XXX, YYY)
Where XXX is the Vera Device ID for one of your cameras ... and YYY is the time in seconds of Video to capture.

Note 1: At this time since it all goes through memory ... the message is NOT sent until the video is captured.

Note 2:On Android, the videos and pictures are stored on your SD card: as: /sdcard/Pictures/VeraAlerts
They are deleted when you delete the associated Notification from Vera.



Title: Re: VeraAlerts Version 3.0
Post by: Otje on February 11, 2013, 06:22:53 pm
wauw..

Richard, i have not even tried version 3 but the text of your announcement is already exciting... ;D
I will give it a try very soon.

I appreciate your efforts, Vera Alerts is becoming very complete in this way!
Title: Re: VeraAlerts Version 3.0
Post by: rifu9655 on February 12, 2013, 04:15:05 pm
This is a great app on both sides. Has anyone found a way to override the sound profile settings of the phone? I've been trying to find a profile scheduler for android that will allow this app to be an exception when on quiet mode, or segregate this app so it can have higher volume that other phone alerts. Even if I'm in a meeting at work I want to know if someone is entering my house. Thanks for the great work!
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 12, 2013, 07:24:24 pm
Vera Alerts uses the Notification stream on the Android.
This is a different sound level than Music, and Ringtones.
When you have a Vera Alerts window open and operate the volume buttons ... it will effect the notification stream volume.

On your Andoid: Goto Settings -> Sounds -> Volume to see the comparative level of each stream.
Title: Re: VeraAlerts Version 3.0
Post by: Otje on February 14, 2013, 04:29:08 pm
I have installed version 3 both on Vera and Android.
When I give the Picture or Video commands, then the message arrives at Android, but when i click the picture it does not load anything.

Also the pictures are not found on sdcard/pictures

i have entered username, password and veraID...

any suggestion?
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 14, 2013, 06:40:35 pm
I guess I would need to see the log file.
Start before you send a Notification with a picture.
http://YourVeraIP/cgi-bin/cmh/log.sh?Device=LuaUPnP (http://YourVeraIP/cgi-bin/cmh/log.sh?Device=LuaUPnP)

Stop when you get the Picture Viewer displayed on Vera without a picture.

Title: Re: VeraAlerts Version 3.0
Post by: Otje on February 15, 2013, 04:10:49 pm
Hi Richard

this is the log dump:

JobHandler_LuaUPnP::HandleActionRequest device: 49 service: urn:richardgreen:serviceId:VeraAlert1 action: SendAlert <0x2e7eb680>
JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=49 <0x2e7eb680>
JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:richardgreen:serviceId:VeraAlert1 <0x2e7eb680>
JobHandler_LuaUPnP::HandleActionRequest argument action=SendAlert <0x2e7eb680>
JobHandler_LuaUPnP::HandleActionRequest argument Message={Video(47,2)} <0x2e7eb680>
JobHandler_LuaUPnP::HandleActionRequest argument rand=0.39603769266977906 <0x2e7eb680>
luup_log:49: VeraAlert:49:SendAlert:Msg:(13):%7B%56%69%64%65%6F%28%34%37%2C%32%29%7D <0x2e7eb680>
luup_log:49: VeraAlert:49:WebGetInfo:admin:admin@192.168.0.62:80/snapshot.cgi <0x2e7eb680>
ZW_Send_Data node 17 NO ROUTE (nil) __LEAK__ this:8192 start:1077248 to 0xc67000 <0x2b5eb680>
<0x2b1eb680>
luup_log:49: VeraAlert:49:Msg::{video:va.47.8140629314883.mjpeg} __LEAK__ this:65536 start:1142784 to 0xc77000 <0x2e7eb680>
luup_log:49: VeraAlert:49:SendAlert:Return:200 <0x2e7eb680>
LOG_CHECK_MEMORY_LEAK pMem start 0xbd1000 now 0xc77000 last 0xc65000 leaked 679936 <0x2b1eb680>
ZW_Send_Data node 21 USING ROUTE 15.0.0.0 <0x2b5eb680>
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 19, 2013, 04:57:33 am
Just a couple of questions.....
1 what do I need to do to make Vera alerts send the timestamp of the event for every event to my android device ..is the the keyword {timestamp} sufficient or do I need to add addition text/string?
2 also ive just started using the new xbmc plugin and i think it should be possible to send a notifcation of what is playing whenever xbmc starts playing something....can you tell me how I might be able to do this?
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 19, 2013, 05:04:34 am
You can set the Aux Message to {timestamp}
Then this will be appended to ALL events sent to the Android client.

Go to you xbmc device. Check the notifications tab. See if they support the event you are looking for.

If not you can always use the Program Logic Event Generator plugin to monitor changes to the appropriate xbmc variable and generate a condition for that. Then use the Notification from the PLEG device.
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 19, 2013, 05:36:26 am
Hi Richard
I have created a notification for when xbmc starts playing but the xbmc device also has a variable for what is currently playing.. how can I modify the notification to tell me what is playing
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 19, 2013, 05:55:07 am
Go to the Vera Alerts device on the Vera Control Panel.
Then go to the Notification Configuration Tab. You will change the message for
the appropriate Notification to something like:

XBMC is now playing: {device([DeviceID].service[ServiceID].VariableName)}

You get the values for DeviceID, ServiceID and VariableName from the Advanced tab for the XBMC device. To get the ServiceID for a variable, let  the mouse hover over the variable name in the advanced tab.
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 19, 2013, 07:40:49 pm
You can set the Aux Message to {timestamp}
Then this will be appended to ALL events sent to the Android client.

Go to you xbmc device. Check the notifications tab. See if they support the event you are looking for.

If not you can always use the Program Logic Event Generator plugin to monitor changes to the appropriate xbmc variable and generate a condition for that. Then use the Notification from the PLEG device.
Is the timestamp added to the message or does it change the actual timestamp of the event?
As I'm not sure I have it working
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 19, 2013, 08:13:07 pm
The Plugin adds the current time stamp when it sees this tag.
This will be the time stamp from sending the Alert.
So if your phone is off for long periods of time ... It will still see the correct time stamps.

Quote
As I'm not sure I have it working
Can you describe your problem ?
Title: Re: VeraAlerts Version 3.0
Post by: tobiwankenobi on February 20, 2013, 01:33:00 am
For some reason VeraAlerts (in VeraLite) did not automatically update to version 3.0.  I had to uninstall the old version and install it from scratch.

The {timestamp} feature does work for me now, but only if I enter it in each item in the "Notification Configuration".  It does not work when I enter it as the Aux Message for all alerts send to the Android App.
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 20, 2013, 05:24:15 am
I have the string "at {timestamp}" in Aux message but the alert received just has "at " then the notification ie no timestamp in the message

Sent from my ASUS Transformer Pad TF300TG using Tapatalk HD
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 20, 2013, 09:15:35 am
It does NOT put the timestamp in the text of the Alert ... it sets the timestamp of the Alert.

Otherwise the date on the Android is the date when it is received. Not a problem usually because
messages are fast ... so received time is a few seconds after sent time.

But if you leave your Android off for extended periods of time ... then the messages might come  many hours later. If you do not use that tag ... they will show the time that the messages are received and not the time that they are sent.

There are other text expansion facilities if you want the date in the String such as:
 Current time is:{DateTime(currenttime,%A %B %d %Y %H:%M)}


 
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 20, 2013, 03:44:02 pm
Thanks for the clarification .....I will have to check this is working now....my issue is that the GCM service seems to be blocked when I'm connected to my work wifi.....when I disconnect I get all Vera alerts at once
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 20, 2013, 09:33:49 pm
Definitely not working for me . To test I put my device into airplane mode for a few hours then when I disabled airplane mode my notifications came through with the current time.
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 20, 2013, 11:08:26 pm
What Version of the Plugin do you have ?
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 21, 2013, 09:03:38 am
I am on version 3.0.....I have sent you a PM
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on February 23, 2013, 03:50:36 pm
Looks like you have been busy with your program logic plugins but have you had a chance to look at the pm I sent you?
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 23, 2013, 05:34:39 pm
Yes I did ... I do have an ordering bug in the code when I re-arranged things for Version 3.

I expand templates before adding the AUX message ... So {template} does not get expanded to it's correct value.

I will fix shortly ...
You can put {timestamp} in the actual message and that will work correctly for now.

Title: Re: VeraAlerts Version 3.0
Post by: snovvman on February 28, 2013, 09:48:25 am
You can put {timestamp} in the actual message and that will work correctly for now.

I'm on V3 and {timestamp} is not working for me.  I still get the time that my device receives the message.  Here is an example of my strings: {tone:3}{timestamp}{BGColor:xFFFF50}Living Room Sensor Batt 30%.  The message, tone, and color all work, but the timestamp does not.

Thanks for your efforts.
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on February 28, 2013, 11:46:28 am
Yep, I have a fix. {timestamp} does not work when it is issued from the AuxMessage.
That's because it needs to be expanded ... and I expanded templates before adding the AuxMessage.
It currently works when used in the message.

Title: Re: VeraAlerts Version 3.0
Post by: snovvman on February 28, 2013, 12:43:53 pm
Ah thanks. I didn't understand your previous post.  Now I do.  Cheers.
Title: Re: VeraAlerts Version 3.0
Post by: snovvman on March 01, 2013, 12:59:49 am
I tried both the video and picture options tonight.  I configured the Android client with the remote access options.  I do get the picture and video icons in the alert, but they are blank.  I doubled checked all of the entries.  Any ideas?  Thanks.
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 01, 2013, 09:31:15 am
Have you provided the login information for your Vera in the Android Settings ?
Pictures and Video are to big to send as an alert.
It creates the picture and video when the alert is sent from your Vera ...
The Android client then has to login to your Vera remotely to download the pictures to your phone.
The login info is the same information you would use at http://cp.mios.com (http://cp.mios.com)
Title: Re: VeraAlerts Version 3.0
Post by: snovvman on March 01, 2013, 09:39:23 am
Have you provided the login information for your Vera in the Android Settings ?
Pictures and Video are to big to send as an alert.
It creates the picture and video when the alert is sent from your Vera ...
The Android client then has to login to your Vera remotely to download the pictures to your phone.
The login info is the same information you would use at http://cp.mios.com (http://cp.mios.com)

I did--under remote settings--ID, password, and unit ID.
Title: Re: VeraAlerts Version 3.0
Post by: snovvman on March 04, 2013, 09:49:01 pm
Another question:  How does Vera/Vera Alerts clear out the videos taken from the {Video(DeviceID,NumSeconds)} string?  Seeing this advice "Note you can run Vera out of memory quickly ... I recommend you keep these short.", and knowing that my phone would initiate a download from Vera once it receives an alert, does the downloaded video get deleted automatically?  What if the download was not successful?

I'm just concerned about my Lite filling up over time.  Thanks.
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 05, 2013, 07:03:21 am
They get cleared out when they are up uploaded.

If they are still on your server ... them that means there was a connection problem.
I do know of an issue that I need to fix ... that causes connection problems. I will get to it soon.


Title: Re: VeraAlerts Version 3.0
Post by: snovvman on March 05, 2013, 08:52:01 am
They get cleared out when they are up uploaded.

If they are still on your server ... them that means there was a connection problem.
I do know of an issue that I need to fix ... that causes connection problems. I will get to it soon.

Thanks.  I have not been able to get it to work.  But through testing, many video events have been generated.  Is there a way for me to clear those videos on Vera manually?
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 05, 2013, 09:24:20 am
Just delete them .. they are in the  /tmp/log/cmh area.
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 09, 2013, 02:31:19 am
Hi Richard
Do you have an idea when the timestamp fix will be posted?
Btw I am curious to know why the default timestamp is the time the notification is received rather than Vera's time that the notification was triggered? I would have thought the latter would be more meaningful....it is for me anyway as I have a number of issues that prevent me from receiving them instantly.
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 09, 2013, 03:18:23 am
Go to the Vera Alerts device on the Vera Control Panel.
Then go to the Notification Configuration Tab. You will change the message for
the appropriate Notification to something like:

XBMC is now playing: {device(DeviceID].service[ServiceID].VariableName)}

You get the values for DeviceID, ServiceID and VariableName from the Advanced tab for the XBMC device. To get the ServiceID for a variable, let  the mouse hover over the variable name in the advanced tab.
Can you please give me an example of this syntax as I'm unsure which brackets are required as there seems to me that maybe it should be an extra [  around the device ID ?
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 09, 2013, 08:24:37 am
I fixed the example!

The documentations is at:
http://rts-services.com/VeraTemplates/ (http://rts-services.com/VeraTemplates/)
It is referened from the VeraAlert plugin documentation.

I also included my test file: veraTemplateTest.lua onto Vera during the plugin install.
So you can download it and look at the examples. Apps -> Develop Appps -> Download veraTemplateTest.lua

 
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 15, 2013, 03:48:09 am
Hi Richard
Do you have an idea when the timestamp fix will be posted?
Btw I am curious to know why the default timestamp is the time the notification is received rather than Vera's time that the notification was triggered? I would have thought the latter would be more meaningful....it is for me anyway as I have a number of issues that prevent me from receiving them instantly.
Hi Richard
Any update on this?
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 26, 2013, 07:23:05 pm
Go to the Vera Alerts device on the Vera Control Panel.
Then go to the Notification Configuration Tab. You will change the message for
the appropriate Notification to something like:

XBMC is now playing: {device([DeviceID].service[ServiceID].VariableName)}

You get the values for DeviceID, ServiceID and VariableName from the Advanced tab for the XBMC device. To get the ServiceID for a variable, let  the mouse hover over the variable name in the advanced tab.
I still can't get this to work....my xbmc device is 52 and the serviceId is urn:upnp-org:serviceId:XBMCState1 and I have tried the variables IdleTime and PlayerStatus but all I ever get is 0 for the result...any clue what i am doing wrong
so this it the actual string "XBMC is now playing: {device([52].service[XBMCState1].IdleTime)}"
does this look correct?
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 26, 2013, 09:36:17 pm
That does not look like a legit service ID ... but It could just be that the XBMC does not follow typical naming conventions.
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 27, 2013, 12:57:42 am
This is a screenshot of the XBMCState device ... does this help at all?
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 27, 2013, 07:16:01 am
The Service ID is that whole string ... not just a part of it:

      urn:upnp-org:serviceId:XBMCState1
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 27, 2013, 10:24:15 am
I have tried that string too...the result is the same
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 27, 2013, 11:26:04 am
What are you getting in the Vera log when you send the following from the
Vera Alerts device Send Alert tab:

XBMC is now playing: {device([52].service[urn:upnp-org:serviceId:XBMCState1].IdleTime)}
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 27, 2013, 09:25:38 pm
What are you getting in the Vera log when you send the following from the
Vera Alerts device Send Alert tab:

XBMC is now playing: {device([52].service[urn:upnp-org:serviceId:XBMCState1].IdleTime)}
How do I check the log?
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 28, 2013, 10:39:48 am
OK I tried your suggestion and it seems that the variable is not populated when the event is triggered? When the event is triggered the result is 0 but when I send the same alert a few seconds later manually the result is the video title.
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 28, 2013, 11:52:21 am
What event are you triggering on ?
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 28, 2013, 12:57:35 pm
the trigger event is the XBMCState plugin "player state changes":"video is starting" condition.
Title: Re: VeraAlerts Version 3.0
Post by: baxy_AU on March 29, 2013, 11:30:01 am
OK I tried your suggestion and it seems that the variable is not populated when the event is triggered? When the event is triggered the result is 0 but when I send the same alert a few seconds later manually the result is the video title.
Ok this may not be the case as it seems the variable (idletime) holds the last value (ie movie title)until it is overwriten as when i send the notification manually I always get a title...even when playback has stopped yet when triggered automatically the result is always 0
Title: Re: VeraAlerts Version 3.0
Post by: RichardTSchaefer on March 29, 2013, 12:45:24 pm
This is a plugin issue ...
I just call the Vera function luup.variable_get for the specified device ... service ... variable.

If what you say is true ... this should always return something ... apparently they are fiddling with this variable during the time of the event.

Title: Re: VeraAlerts Version 3.0
Post by: dklinkman on May 31, 2013, 01:33:03 pm
I have VeraAlerts 2.2 installed and I would like to update to 3.x  But I can't seem to find it on the MVC store (Apps tab, Install Apps). Am I looking in the wrong place?  I got 2.2 installed so I must have done it right at some point.

Thanks