HomeGenie Forum
General Category => Troubleshooting and Support => Topic started by: GlenDLF on November 23, 2016, 04:04:03 AM
-
I have been unable to get the email system working. My goal is to get the security system to send me an email when an alarm occurs. I have written a python script on the raspberry: /home/pi/Alarm.py which will send me an email when executed from a raspberry terminal window with the command: python Alarm.py
How can I execute this script from within HG?
Thanks,
Glen
-
You can launch a command line with something like that :
var proc = new System.Diagnostics.Process {
StartInfo = new System.Diagnostics.ProcessStartInfo {
FileName = "/bin/bash",
Arguments = "-c \"echo '"+text+"' | gammu-smsd-inject TEXT "+tel+"\"",
UseShellExecute = false,
RedirectStandardOutput = true,
CreateNoWindow = true
}
};
proc.Start();
while (!proc.StandardOutput.EndOfStream) {
string line = proc.StandardOutput.ReadLine();
Program.Notify("SHELL COMMAND", line);
}
But i advise to solve you problem ;)