Jump to content


Photo
- - - - -

HaikuHelper Email Notifications


  • Please log in to reply
7 replies to this topic

#1 Almen

Almen

    Newbie

  • Registered
  • Pip
  • 9 posts
  • Location:USA, Houston TX

Posted 08 April 2012 - 09:40 AM

Hi
How do I setup email notifications for alarms and troubles from my Omni iie controller. I have HaikuHelper and Haiku. I am getting push notifications already but would like to get email as well.
I would appreciate any sample scripting code for this .
Thanks.

Edited by Almen, 08 April 2012 - 11:01 PM.


#2 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 08 April 2012 - 02:12 PM

Its quite easy:

 
 
function onTrouble(trouble) {
	helper.sendMail(controller, '[email protected]', 'Trouble: ' + trouble, 'Trouble Reported for Controller: ' + controller.name + ': ' + trouble);
}
 
function onAreaAlarm(area) {
	helper.sendMail(controller, '[email protected]', 'Alarm: ' + area.alarmsDescription + ' in ' + area.bestDescription, 'Alarm Reported for Controller: ' + controller.name + ': ' + area.alarmsDescription + ' in ' + area.bestDescription);
}
 

Edited by lupinglade, 08 April 2012 - 02:14 PM.


#3 mdpeterman

mdpeterman

    Cocooner

  • Registered
  • PipPip
  • 17 posts

Posted 08 April 2012 - 07:54 PM

Is there a way to have HaikuHelper send the emails to multiple addresses? If not, I'll just setup a distribution group when that is needed.

#4 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 08 April 2012 - 11:31 PM

Either that or multiple sendMail lines would work. Create the subject and message as a string and reuse the string for each command. But a distribution group would be the best way to do it.

#5 Almen

Almen

    Newbie

  • Registered
  • Pip
  • 9 posts
  • Location:USA, Houston TX

Posted 09 April 2012 - 01:31 AM

Thanks. Multiple sendMail lines works great for me.
I have one more question. Is there any way to include zone that tripped alarm in same email message.
Thanks.

#6 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1047 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 12 April 2012 - 11:00 AM

hmm , yes provided the zone is marked as Tripped on the controller or not ready. You could loop through the zones and check for the ones that have a not ready status and include them in the report like so just before the sendMail and then include the report in the e-mail string:

var report = "\nZones Not Ready:\n\n";
 
var zones = controller.zones;
for(i in zones) {
    var zone = zones[i];
    if(zone.isNotReady) report += zone.bestDescription + "\n";
}


#7 arakasi55

arakasi55

    Cocooner

  • Registered
  • PipPip
  • 31 posts
  • Experience:average
  • Hardware:HAI OmniPro II
  • Tech:X10-PLC, UPB, ZigBee
  • Audio:Sonos
  • Video:Custom
  • CCTV:ip

Posted 14 May 2012 - 03:24 AM

I too am trying to configure email notification on alarm.
I've copied the above script and modified the destination email address, however the logs show the following when the alarm is tripped:


May 14/12 6:16 PM: Home: Sending e-mail notification to "[email protected]": Home: Alarm: Burglary in House (Alarm Reported for Controller: Home: Burglary in House)
May 14/12 6:16 PM: Error: Could not send e-mail message: -2: Unsupported login mechanism.

I've tried using both my exchange server and ISP's SMTP server with and without authentication details, however both receive the same error.

Any help would be really appreciated

#8 arakasi55

arakasi55

    Cocooner

  • Registered
  • PipPip
  • 31 posts
  • Experience:average
  • Hardware:HAI OmniPro II
  • Tech:X10-PLC, UPB, ZigBee
  • Audio:Sonos
  • Video:Custom
  • CCTV:ip

Posted 14 May 2012 - 03:38 AM

Ah, nevermind! Ran a telnet test against the SMTP server and found the anti virus was scanning outbound email.
Disabled that and working fine!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users