News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Email/SMS messaging

Started by los93sol, February 04, 2010, 06:42:25 AM

Previous topic - Next topic

los93sol

I wanted to post some progress screenshots of something a coworker and I have been working on.  This is partly derived from the gmail setup script from the wiki, but has been extended to support configuration through the web admin and will let you setup email/sms notifications in Respond to Events.  Well, screenshots are always fun so enjoy.  I'll post a patch for this soon.





There are some common accounts that automate the setup, those are GMail, Hotmail, and Yahoo currently and can easily be extended.


If your provider isn't supported with automatic setup, you can plug in your settings and it will simply work.


You'll notice the device is Mailx, this will be changed to be included in the General Info Plugin once I have a full builder running.  It was originally created as a new device simply because I was not able to compile the General Info Plugin.


Would appreciate some feedback on this.

Kezza

This looks great. Email notifications is something been wanting to get for notifications before moving forward with security camera's etc.

Post up patch and some instructions to get it going and I'll give it test!

totallymaxed

Quote from: los93sol on February 04, 2010, 06:42:25 AM
I wanted to post some progress screenshots of something a coworker and I have been working on.  This is partly derived from the gmail setup script from the wiki, but has been extended to support configuration through the web admin and will let you setup email/sms notifications in Respond to Events.  Well, screenshots are always fun so enjoy.  I'll post a patch for this soon.





There are some common accounts that automate the setup, those are GMail, Hotmail, and Yahoo currently and can easily be extended.


If your provider isn't supported with automatic setup, you can plug in your settings and it will simply work.


You'll notice the device is Mailx, this will be changed to be included in the General Info Plugin once I have a full builder running.  It was originally created as a new device simply because I was not able to compile the General Info Plugin.


Would appreciate some feedback on this.

Nice work :-)

How will the SMS side work? How will the SMS message get actually sent? One idea i was toying with is to post these kinds of events to Twitter...then have twitter Tweet/SMS them to me :-)

Any great stuff. Nice to see someone working on this again.

All the best


Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses [url="http://forum.linuxmce.org/index.php?topic=14026.0"]http://forum.linuxmce.org/index.php?topic=14026.0[/url]

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: [url="http://wp.me/P4KgIc-5P"]http://wp.me/P4KgIc-5P[/url]

Facebook: [url="https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465"]https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465[/url]

[url="http://www.dianemo.co.uk"]http://www.dianemo.co.uk[/url]

dlewis

Possibly SMS via google-voice, using the google-voice stuff you've been working on los?

totallymaxed

Quote from: dlewis on February 04, 2010, 02:10:45 PM
Possibly SMS via google-voice, using the google-voice stuff you've been working on los?

Google-voice is a possible route for US based users but elsewhere as far as i know Google-voice does not offer SMS services

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses [url="http://forum.linuxmce.org/index.php?topic=14026.0"]http://forum.linuxmce.org/index.php?topic=14026.0[/url]

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: [url="http://wp.me/P4KgIc-5P"]http://wp.me/P4KgIc-5P[/url]

Facebook: [url="https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465"]https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465[/url]

[url="http://www.dianemo.co.uk"]http://www.dianemo.co.uk[/url]

jimbodude

SMPP ( http://en.wikipedia.org/wiki/Short_message_peer-to-peer_protocol ) may be an option, but you would have to find a gateway, and most of them are not too cheap for low volume.  I've worked with SMPP in the past - there are some open source libraries available.  There is a Java implementation on Google Code that I've used - it was pretty easy to get it going, maybe 4 hours to figure it out and plug it in to an existing notification system.

In my experience, it is easier to just send the messages to the phone's e-mail address - assuming you know what carrier the phone is on.  Since this is generally the case with notifications, that would be the approach I would take.  This would require no additional development - just e-mail.  Here's a few example phone addresses, I'm not sure how up to date it is:
http://www.tech-recipes.com/rx/939/sms_email_cingular_nextel_sprint_tmobile_verizon_virgin/

jimbodude

#6
Oh, and los93sol - this looks great.  I can't wait to have my house start sending me e-mails and SMS... keep it up.

Have you thought about hooking this in to a more generic notification system?  Something where we could say "Send notification 'blah' at level 'security breach'".  From there, the system would send 'blah' to all notifiable entities that are listening for 'security breach' or less.  Maybe several e-mail addresses could be registered at different levels, or maybe completely different types of devices like an LED display, SMS phone, HTML output, etc.

alx2k

#7
IMO, best option for sms is adding chan_sebi to asterisk and adding a device through the web interface or mixing some perl soft (on the link below) with email capability on the web interface.

I was planning to mess a little with chan_sebi not for sms sending, but to add a GSM trunk to linuxmce's asterisk.

I followed instructions on the next link to add it to an Elastix distro, and it worked well, I was planning to add it to Linuxmce when I finish reconverting my home.

http://www.saghul.net/blog/2009/11/07/howto-usar-el-movil-de-manera-remota-con-asterisk-y-chan_sebi/

USB modem have to be huawei, I belive all of them work for sms sending (e220 seems to work), for call making, K3520 or e169 do work (I tried both of them, but haven't tried e220 since I didn't integrate sms sending)

los93sol

The sms side depends on your carrier's email-sms gateway.  There is one other screenshot I forgot to include that should clear that part up a bit.  :)



You use the Email Setup screen to configure the account to send email from.  Then in your scenario, you set the message to be sent, (ie. House Disarmed, Door Opened, Camera x Tripped, etc.).  You can then tell it what addresses to send the message to using a comma-delimited list you're able to send to multiple recipients.  That is how you would send an SMS message to your mobile, just send it to your carriers gateway.

totallymaxed

Quote from: los93sol on February 04, 2010, 04:09:19 PM
The sms side depends on your carrier's email-sms gateway.  There is one other screenshot I forgot to include that should clear that part up a bit.  :)



You use the Email Setup screen to configure the account to send email from.  Then in your scenario, you set the message to be sent, (ie. House Disarmed, Door Opened, Camera x Tripped, etc.).  You can then tell it what addresses to send the message to using a comma-delimited list you're able to send to multiple recipients.  That is how you would send an SMS message to your mobile, just send it to your carriers gateway.

Of course the other option is Twitter :-)... use the twitter API to inject house status messages to you twitter account and then have that 'tweeted' to you as SMS messages :-)

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses [url="http://forum.linuxmce.org/index.php?topic=14026.0"]http://forum.linuxmce.org/index.php?topic=14026.0[/url]

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: [url="http://wp.me/P4KgIc-5P"]http://wp.me/P4KgIc-5P[/url]

Facebook: [url="https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465"]https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465[/url]

[url="http://www.dianemo.co.uk"]http://www.dianemo.co.uk[/url]

nite_man

Excellent work! Regarding to Twitter. As I know Twitter allows to send SMS not for all countries. It worked before but know it doesn't:

QuoteNote: We currently don't support sending SMS to this number.

BTW to have email notifications will be a good start IMHO.
Michael Stepanov,
My setup: [url="http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup"]http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup[/url]
Russian LinuxMCE community: [url="http://linuxmce.ru"]http://linuxmce.ru[/url]

los93sol

This has been committed, but the current version is not functional.  I have supplied a patch in TRAC and the relevant sqlCVS commits to fix the device.

jjbennet

Wow. Thanks for sharing this. I am starting to like this forum! Actually, I am going to start visiting this site everyday from now on! Thanks a lot.