SMS and Email Notifications

Discussions about RaZberry - Z-Wave board for Raspberry computer
cbnidk
Posts: 41
Joined: 14 May 2015 11:25

Re: SMS and Email Notifications

Post by cbnidk »

Hi islipfd19

I am setting up your modul but I can't get it to Work
will you show how the .syscommands file will look with the
(bash progs 'echo' and 'mail' must be added to .syscommands)
in it ?
the file by me is emty from start is this right?
bogr
Posts: 190
Joined: 16 Nov 2015 22:46

Re: SMS and Email Notifications

Post by bogr »

The only thing the .syscommands file have to have is the path to the mail script, like:

/som/path/where/the/script/is/mail.bash

Don't forget that the script has to be executable of course.
cbnidk
Posts: 41
Joined: 14 May 2015 11:25

Re: SMS and Email Notifications

Post by cbnidk »

Hi

Is the mail script also something I have to make and if yes how will it look
I have install sendmail and I can send mail from command line but the z-way server will not sendt mail

CB
bogr
Posts: 190
Joined: 16 Nov 2015 22:46

Re: SMS and Email Notifications

Post by bogr »

Can you actually send mail via the script? I.e by just typing at the prompt:

> /whole/path/to/the/script/mail.bash

Do you see any info in the log-files - /var/log/mail.*?
cbnidk
Posts: 41
Joined: 14 May 2015 11:25

Re: SMS and Email Notifications

Post by cbnidk »

Hi

I don't know where to look for the mail.bash script this is my problem now
is the mail script something I have to make and if yes how does it look?
and yes I can send mail from the conmmand line of the Raspberry pi wish the z-way-server is install on
I have install the Email module from here https://github.com/islipfd19/home-autom ... ules/Email

cb
bogr
Posts: 190
Joined: 16 Nov 2015 22:46

Re: SMS and Email Notifications

Post by bogr »

Aah, sorry, I just checked out his script and it looks a bit different than my own that I'm writing ;). He's using

system('echo "' + self.config.message + '" | mail -s "' + self.config.subject + '" ' + email);

while I'm calling a bash-script with this command. I then put by bash script in .syscommands. In that case I actually don't know if echo and mail has to be in .syscommands. I wouldn't think so but you never know ;), you can always try to add them and see what happens. No info in the z-way log?
cbnidk
Posts: 41
Joined: 14 May 2015 11:25

Re: SMS and Email Notifications

Post by cbnidk »

Hi

It is working now the problem was that mailutils should to be installed, and I had installed only sendmail
it is working 100% now

very nice email module

I have 2 lines in .syscommands

echo
mail

This is for the module https://github.com/islipfd19/home-autom ... ules/Email

CB
tom87
Posts: 1
Joined: 20 Dec 2015 18:58

Re: SMS and Email Notifications

Post by tom87 »

Hi,

I'm new to this so sorry for my stupid question.

This module - sending email - is what I'm looking for.

But is there anyway some kind of tutorial how to install this into my z-way application?

Where shall i copy/past this code from github??
Corn001
Posts: 2
Joined: 12 Mar 2016 16:05

Re: SMS and Email Notifications

Post by Corn001 »

Hi,

I am new to this, I have a email notification script working by executing the python script. I want to create and event in z-wave smart home to run this python script.

read many posting nothing is clear. Can someone explain how to create an event and point to my executable file.

Thank you
islipfd19
Posts: 126
Joined: 07 Jul 2014 03:35

Re: SMS and Email Notifications

Post by islipfd19 »

Corn001 wrote:Hi,

I am new to this, I have a email notification script working by executing the python script. I want to create and event in z-wave smart home to run this python script.

read many posting nothing is clear. Can someone explain how to create an event and point to my executable file.

Thank you
I believe your python script needs to be in an executable path, like /usr/local/bin or /usr/bin. I also believe it needs to be executable by anyone.

The script file name also needs to be added to the .syscommand file located in /opt/z-way-server/automation. If your python script uses any bash commands, it would be safe to add those to the .syscommand file as well.
Post Reply