LinuxMCE Forums

General => Users => Topic started by: richbl on June 29, 2008, 06:04:04 pm

Title: Using LinuxMCE for Home-Automation/Security?
Post by: richbl on June 29, 2008, 06:04:04 pm
Hello all,

I'm currently looking into an open source home-automation solution that provides the following features:

--z-wave sensor integration
--ip camera support
--cell phone notification

At the moment, LinuxMCE seems to be more than capable (with the added benefit of displacing my Windows MCE installation... good-bye Vista).

However, on this last point, I cannot seem to find a definitive answer, so here's my scenario/question:

If I have a z-wave sensor or ip camera that generates an event (e.g. IP camera motion-detection tripped), can LinuxMCE turn that event into either an email, or contact me via mobile phone (CDMA/Verizon)?


At the very least, I should be able to generate an email, but my limited understanding of LinuxMCE is that it doesn't run with a native mail server.

Thanks much.
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ddamron on June 29, 2008, 06:45:41 pm
Yes.  That is a standard scenario.
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: richbl on June 30, 2008, 07:45:24 am
Yes.  That is a standard scenario.

Thanks for the quick response.

As I was unable to find any information on a native LinuxMCE mail server, can you please point me to the documentation that details this?

Thanks again.
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ddamron on June 30, 2008, 08:20:22 am
Mail Server!?!? How old school!
(joke)

It doesn't send via a mail server, it sends to your cellphone via WAP/GPRS.
In WebAdmin, Advanced (at the top), Network, WAP/GPRS Settings.
You should be able to follow the instructions from there.

Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: nite_man on October 14, 2008, 08:49:44 am
Mail Server!?!? How old school!
(joke)

It doesn't send via a mail server, it sends to your cellphone via WAP/GPRS.
In WebAdmin, Advanced (at the top), Network, WAP/GPRS Settings.
You should be able to follow the instructions from there.

But is it possible just send notification by email? Because to use WAP/GPRS it's needed GSM gate with SIM-card. Currently I'm interested to receive just email with camera snapshot, for example. But I couldn't fine any info how to configure it. Will be very appreciated for any help :)
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: bulek on October 14, 2008, 10:01:20 am
Mail Server!?!? How old school!
(joke)

It doesn't send via a mail server, it sends to your cellphone via WAP/GPRS.
In WebAdmin, Advanced (at the top), Network, WAP/GPRS Settings.
You should be able to follow the instructions from there.

But is it possible just send notification by email? Because to use WAP/GPRS it's needed GSM gate with SIM-card. Currently I'm interested to receive just email with camera snapshot, for example. But I couldn't fine any info how to configure it. Will be very appreciated for any help :)

I'd also like to have this feature.... What we could do is to put something usefull into lines of /etc/motion/threadX.conf :

http://www.lavrsen.dk/twiki/bin/view/Motion/ExternalCommands (http://www.lavrsen.dk/twiki/bin/view/Motion/ExternalCommands)

I think on_save or on_ffmlpeg is the way to go... We should only check Security mode, cause we don't want to get flooded when we're home...

Currently we implement sending emails by changing Configuration field in surveillance cameras - if you put your line there, it will appear in /etc/motion/threadX.conf...

For instance I have this in Configuration field in one of my cameras :
Quote
norm 0
width 640
height 480
auto_brightness off

The only missing part is how to send email to certain address from LMCE in one liner and possibly snapshot of mpeg movie as attachment.... Anyone knows ?

Regards,

Bulek.
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: nite_man on October 14, 2008, 10:17:00 am
It can be something like that:
Code: [Select]
mutt -s "Subject" -a /tmp/file.tar.gz your@email.addr < /tmp/message-body.txtBut it'd be really useful to have something similar to Cellphone Notifications, but for email.
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: totallymaxed on October 14, 2008, 10:37:37 am
Mail Server!?!? How old school!
(joke)

It doesn't send via a mail server, it sends to your cellphone via WAP/GPRS.
In WebAdmin, Advanced (at the top), Network, WAP/GPRS Settings.
You should be able to follow the instructions from there.

But is it possible just send notification by email? Because to use WAP/GPRS it's needed GSM gate with SIM-card. Currently I'm interested to receive just email with camera snapshot, for example. But I couldn't fine any info how to configure it. Will be very appreciated for any help :)

Michael,

The mobile phone notification is not implemented using a local GSM/SIM gateway. It uses your VOIP provider to actually call the mobile or fixed line phone you designate. The recipient will hear a spoken message and will be offered a range of 'menu' options ie "Press 1 to cancel security Alert, Press 2 to Reset the Alarm, Press 3...." using the number keys you can then take the action you require from any phone anywhere.

It works very well indeed and we find that it totally blows people away when they see this side of the system during a demonstration.

All the best

Andrew
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: nite_man on October 14, 2008, 11:06:02 am
I didn't know that, Andrew :) It looks amazing! Will try to configure it and play with it.
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ccoudsi on March 28, 2009, 08:14:59 pm
I'm able to receive a call from my Hybrid 7.10 on my cell phone (iPhone), when my motion detector get tripped, but when I hear the "Announcement"

Quote
"The recipient will hear a spoken message and will be offered a range of 'menu' options ie "Press 1 to cancel security Alert, Press 2 to Reset the Alarm, Press 3...." using the number keys you can then take the action you require from any phone anywhere"

The system is not responding to my input commands, it keeps repeating the announcement, any ideas why??

Thanks in advance for any input!! :)

Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: totallymaxed on March 28, 2009, 08:27:08 pm
I'm able to receive a call from my Hybrid 7.10 on my cell phone (iPhone), when my motion detector get tripped, but when I hear the "Announcement"

Quote
"The recipient will hear a spoken message and will be offered a range of 'menu' options ie "Press 1 to cancel security Alert, Press 2 to Reset the Alarm, Press 3...." using the number keys you can then take the action you require from any phone anywhere"

The system is not responding to my input commands, it keeps repeating the announcement, any ideas why??

Thanks in advance for any input!! :)



I would imagine that the problem is in the Asterisk config somewhere...

Andrew
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: tschak909 on March 28, 2009, 08:36:53 pm
The most common problem with this lies in your trunk configuration.

Your dtmfmode for your trunk is set wrong.

I'm guessing this is because you re-appropriated an existing VOIP template for another provider for your use.

in the web admin, go to Advanced > configuration > phones setup

This will bring you into the FreePBX phone panel.

You can then select Trunks.

Then select your VOIP trunk from the list.

Look in both the PEER and USER details text boxes, look for

dtmfmode=inband

Change this to dtmfmode=rfc2833

Save and apply the changes.

Your menu should now properly respond.

Please let us know if this works.

-Thom
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ccoudsi on March 28, 2009, 09:20:41 pm
Thom,
I followed your instructions, and rebooted the system, still not responding, I signed up with BroadVoice, here's my Trunk setup FYI:
Code: [Select]
authname=650xxxxxxx
canreinvite=no
context=from-pstn
dtmf=inband
dtmfmode=rfc2833
fromdomain=sip.broadvoice.com
fromuser=650xxxxxxx
host=sip.broadvoice.com
insecure=very
nat=yes
secret=xxxxxxxxxx
type=peer
user=phone
username=650xxxxxxx

User Details:
Code: [Select]
context=from-pstn
dtmf=inband
dtmfmode=rfc2833
fromdomain=sip.broadvoice.com
host=sip.broadvoice.com
insecure=very
nat=yes
secret=xxxxxxxxxx
type=user
user=650xxxxxxx
username=650xxxxxxx
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: tschak909 on March 28, 2009, 09:21:54 pm
dtmf also needs to be set to rfc2833

-Thom
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ccoudsi on March 28, 2009, 09:45:52 pm
Thom,
I did that, and rebooted the system, then I tripped the motion detector, it called my Cell as before, but no response on my input, after that I changed the settings to call my PSTN home number instead of my cell, and it worked, then I pressed "4" to call my neighbor which my cell number and the system called my cell but no Announcement, just silent !!!
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ccoudsi on March 28, 2009, 09:58:25 pm
Thom,
I got it, when it called my PSTN number I pressed "4" then it called my Cell number and opned a voice channel so I can talk to the neighbor !!! slick system
I don't know why my iPhone DTMF not working??? I will try with my wife cell phone.

Cheers,
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ccoudsi on March 28, 2009, 10:08:29 pm
Thom,
Quick update, I tried my wife's cell Cingular "8125" same results as my iPhone, it looks the DTMF tone is weak to be detected by LinuxMCE, !!!
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: tricky_dicky on March 30, 2009, 12:44:52 pm
I've got a standalone Asterisk server for another project and I can use the keypad for navigating around(1 for this extensions ect). I'm using Sipgate as the provider so I don't know if that may have something to do with it. 
It may sound stupid but just check that you have tones enabled on your mobile phone.
Rich
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ccoudsi on March 30, 2009, 08:29:15 pm
Rich,
I just did more research and talked to iPhone tech-support, they acknowledged there is an issue with DTMF tones with their iPhone and AT&T network, they only support long tones, but I don't understand why the Cingular 8125 doesn't work either (Maybe because it is AT&T too)?? I tried both short and long tones, same results, even I verified both phones tone generation by calling my home number!!! the tones sound OK to me, I need to do more testing with different Cell phones/carriers, it could be the carrier because my home number uses Comcast, not AT&T that's why it works????

Charlie,
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: tricky_dicky on March 31, 2009, 11:36:15 am
Charlie,
When you say the tones sound OK to you are you measuring using anything or just pressing buttons and seeing what happens?
If you have dig on the net I'm sure there is a DTMF code decoder that you could play the tones too and see if it recognizes them.

Rich
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: ccoudsi on April 02, 2009, 07:35:30 pm
Rich,
What I meant is the DTMF tones did not sound weak, they sounded loud and clear when I called from my cell to my Home Comcast number, you're right I need to hook up a DTMF decoder to find out what is going on, yesterday I tried another friend's cell phone, same results LMCE did not detect the tones. Strange enough LMCE detects the tones when I use my home Uniden 5.8Ghz cordless phone??
Title: Re: Using LinuxMCE for Home-Automation/Security?
Post by: tricky_dicky on April 03, 2009, 11:08:42 am
Charlie,

I've had similar experiences, sometimes the tones come through just fine and other times I get bounced to the unknown extension.  This normally happens if there is a lot of background noise tbh or if I am using the mobile on speakerphone.
Internally should always be fine due to lack of factors mentioned above and also by the fact that the call doesn't have to go round the entire POTS system before it hits your LMCE box.

Best of luck getting it sorted.
Rich