Author Topic: Gmail notifier - Using IP camera email notifications to trigger events in VC  (Read 30644 times)

0 Members and 5 Guests are viewing this topic.

Mirac78

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
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

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
OK, looks like an easy fix. I'll replace the python in the first post soon.

Great news..tnx on your effort.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
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)

Mirac78

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
OK, the revised script is posted..

New version work's great!

M.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
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

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
@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

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
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

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
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

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
OK. I will try to post something a bit later.
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

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
OK. I will try to post something a bit later.

TNX, take your time..we have a few more week's..