Author Topic: Google talk with my server - notify me  (Read 3202 times)

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Google talk with my server - notify me
« on: April 04, 2013, 08:15:04 am »
Hi all

Been trying to find a neat way to notify myself of events on my system.... I'm running weborbiter on my HTC so I don't get any notifications on my orbiter.
I had a brief look at notify my android but wasn't too impressed with that - have to get a premium licence if you want more than 5 notifications per day and you have to run another app on your device, register another username/password etc etc. It works but....

then I found this link below for sending messages to gtalk. Now gtalk is what I use anyway for IM on my phone so I thought it'd be pretty cool to use that to send notifications to myself. That way I'd get them regardless of whether I was at home or not too.

https://www.ebower.com/docs/ubuntu-scripted-gtalk/

Now what would be the best way of doing this? I saw the message below suggesting how to call a shell script as a command. Should be fairly simple to hook this up to an event - like motion detected on gate camera etc.

http://forum.linuxmce.org/index.php/topic,10768.msg74094.html#msg74094

Thoughts? I haven't tried yet but will as soon as I get a gap. If it works really nicely it might be cool to wrap the script in a DCE device that can listen for events directly.

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: Google talk with my server - notify me
« Reply #1 on: April 04, 2013, 08:38:26 am »
Good idea, but instead of executing commands directly, I would instead suggest a more generic approach/improvement.

Create a new DCE command like "Send Notification". This command would be sent to some (new) device/plugin that can be configured to send notifications using several means. One option could be gtalk, another could be email. This way, you have a common method to send notifications as a result of events, and you don't have to go through all events if you decide to change from gtalk later on. You would just change from gtalk to email in the configuration of the notification device/plugin.

On the other hand, I don't see any problem with experimenting with different ways to send notification, that will be required no matter what route we go.

- sambuca



jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: Google talk with my server - notify me
« Reply #2 on: April 04, 2013, 09:07:20 am »
Yes, the generic makes sense if there is no such thing already... as you say, would be good to have the "actual communication" separated from the generic functionality... then people can write their own communicators for the sending end. Will first make sure I can get the direct version running though ;-)

Since I'm starting with security cameras, I thought of embedding a link in the notification to the camera in question (I'm using IP cameras so each is directly viewable via the web).... and as a colleague just suggested... done cleverly that could also obviate the need for dyndns if that was your only requirement since the current external IP of your network could be embedded in the link.

jamo

  • Guru
  • ****
  • Posts: 463
    • View Profile
    • LMCE user Page
Re: Google talk with my server - notify me
« Reply #3 on: April 05, 2013, 08:13:52 am »
Woohoo, got it working  ;D
Really is very simple. I'm getting messaged very time the dog wags its tail so a little tweaking of the motion settings might be required but this is pretty cool.

Will clean it up a bit and wikify and then possibly later look at making it more generic.