News:

HOT TIP! In the command editor, you can ctrl-click and drag an item to create a copy of it.

Main Menu

Gmail notifier - Using IP camera email notifications to trigger events in VC

Started by nime5ter, July 25, 2014, 12:31:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mirac78

Quote from: nime5ter on February 18, 2015, 02:05:33 PM
Yup, looks like gmail doesn't like this script. I'll review it to see if I made some mistakes while trying to meet the last user's "special needs", but it's possible things have changed on Google's end.

... I did see that I'd accidentally uploaded a version that checks gmail every second (which is BAD), but even when I try to check my mail once I'm getting an authorization error.

I'll look into it and get back to you.

Yes i see that was 1 sec and try to change to higher value. Hope you will find solution cause the whole idea is great. I just get new IP camera and will use it like baby monitor  ;D

nime5ter

OK, looks like an easy fix. I'll replace the python in the first post soon.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Mirac78

Quote from: nime5ter on February 18, 2015, 02:42:00 PM
OK, looks like an easy fix. I'll replace the python in the first post soon.

Great news..tnx on your effort.

nime5ter

OK, the revised script is posted (http://voxcommando.com/forum/index.php?topic=1679.msg14606#msg14606), but you may prefer to simply update the python script you already have.

UPDATED SCRIPT 18-FEB-2015 -- resolved authorization error by updating the "realm" parameter within the get_feed() function to "mail.google.com" (see http://stackoverflow.com/questions/28547395/gmail-atom-feed-stopped-working-lately). Also restored default interval of 30 seconds.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)


nime5ter

Quote from: Mirac78 on February 18, 2015, 02:08:37 PM
I just get new IP camera and will use it like baby monitor  ;D

@Mirko -- Which IP camera did you get? Because there are a few other ways to send events from some IP cameras to VC that may be better, depending on what your camera model is capable of doing. (Maybe you already know this.)
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Mirac78

Quote from: nime5ter on February 18, 2015, 06:31:13 PM
@Mirko -- Which IP camera did you get? Because there are a few other ways to send events from some IP cameras to VC that may be better, depending on what your camera model is capable of doing. (Maybe you already know this.)

I read something about some other trigers but didnt find other settings for that. This workaround working great on my test's. I get this one http://us.dlink.com/products/baby-monitor/wi-fi-baby-camera/

It's ok, will see the ful power for about 3-4 weeks :-)


Mirac78

I forgot to mention that camera sends three diferent alerts.
One for sound, one for movment and one for temperature with diferrent subjects.

Combination of your script and vc works amazing in my case. If temp go below treshold temp, vc get notification and tell my nest to start heating (baby will be in other room)

For motion and sound i set some TTS speak, my HUE lamp's start flashing, and on my TV, XBMC start the live video feed from camera :-D

So once again tnx on your and others effort!

Mirko

nime5ter

Get your technology tinkering done now while you still are on a regular sleep schedule. :)

It doesn't look as though the baby camera offers more efficient alternatives for communicating with Vox, but it's great that you've found a way to use so many of VC's many possibilities. You're a model user!

Maybe your baby will be first child raised on Vox. -- "GaGa" means "Excuse me VoxCommando, please increase the temperature in my quarters by 2 degrees Centigrade," and "Goo Goo" means "Please fetch my nursemaid, I'm ready for a snack!" .... And, of course, "Gurgle, Gurgle, meh" means send an SMS to Papa: "Urgent. Come change my diaper!"
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Mirac78

Quote from: nime5ter on February 19, 2015, 09:46:54 AM
Get your technology tinkering done now while you still are on a regular sleep schedule. :)

It doesn't look as though the baby camera offers more efficient alternatives for communicating with Vox, but it's great that you've found a way to use so many of VC's many possibilities. You're a model user!

Maybe your baby will be first child raised on Vox. -- "GaGa" means "Excuse me VoxCommando, please increase the temperature in my quarters by 2 degrees Centigrade," and "Goo Goo" means "Please fetch my nursemaid, I'm ready for a snack!" .... And, of course, "Gurgle, Gurgle, meh" means send an SMS to Papa: "Urgent. Come change my diaper!"

He,he nime5ter you really make me laugh!

If somebody of power scripting users like you see my vox, eventghost and tasker I don't know what kind of reaction would be. I found some script, then trying to adopt my needs, but that's one big mess, but...always is another but it's WORKING :-D

One good example is your script. To don't be boring with questions, a make two more copies with different file name, in script i edit subject line and event name. Tested and it's working like a charm. Only thing in this case is lot's of pings to google server :-)..must play with ping time to find best solution.

I already have a few scenarios that include phone triggering, tablet etc...

And you now what is the funniest thing? I live in 40m2  ;D ;D..but :-)

I found a very big bug in your code!

WRONG:
And, of course, "Gurgle, Gurgle, meh" means send an SMS to Papa: "Urgent. Come change my diaper!"

CORRECT:
And, of course, "Gurgle, Gurgle, meh" means send an SMS to Mam: "Urgent. Come change my diaper!"

nime5ter

Quote from: Mirac78 on February 19, 2015, 10:06:39 AM
One good example is your script. To don't be boring with questions, a make two more copies with different file name, in script i edit subject line and event name. Tested and it's working like a charm. Only thing in this case is lot's of pings to google server :-)..must play with ping time to find best solution.

Ha. Yes, that's very bad. ::club.

It's not a big problem. I'll post an example for you and you can edit it to replace the subject lines and event names. (It's really no different than using "If Then Else" logic blocks in VoxCommando.)


Quote
I found a very big bug in your code!

WRONG:
And, of course, "Gurgle, Gurgle, meh" means send an SMS to Papa: "Urgent. Come change my diaper!"

CORRECT:
And, of course, "Gurgle, Gurgle, meh" means send an SMS to Mam: "Urgent. Come change my diaper!"

::yikes
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

nime5ter

But:

There are several ways that we could handle your gmail notifications.

If your IP cam has its own special email address and all the notifications are coming from that address, it may make more sense to have the code trigger one "BabyCam" event any time you receive an email from that address. Then, we send the subject line as a payload in that event. Then, in VC, you have different commands triggered depending on the payload (subject line).

That way, you can add new BabyCam alerts, if you like, without altering the script. You would just have to add new commands in VC.

Is that a useful solution, or how does your system work?
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Mirac78

Quote from: nime5ter on February 19, 2015, 10:25:03 AM
But:

There are several ways that we could handle your gmail notifications.

If your IP cam has its own special email address and all the notifications are coming from that address, it may make more sense to have the code trigger one "BabyCam" event any time you receive an email from that address. Then, we send the subject line as a payload in that event. Then, in VC, you have different commands triggered depending on the payload (subject line).

That way, you can add new BabyCam alerts, if you like, without altering the script. You would just have to add new commands in VC.

Is that a useful solution, or how does your system work?

I just check the notification form my web cam and all notifications came from same email address with different subject.
This seems like great solution to use one script, but definitely will need help about that.


nime5ter

TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

Mirac78