HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: DutchHans on November 10, 2014, 02:32:18 PM
-
Hello all...,
I have a question about human interaction ...If I make a program that checks if the garagedoor is closed, simple by looking if a doorsensor is open or closed. Is it then possible that if the program "sees" that the door is open it "asks" me if i want to close it... and then responds to yes or no...by activating a module.. and the other way around... if its closed that it asks if i want to open it, and activates a module... would be awsome if it could "say" the questions and respond to voicecommands there.
Is there anyone who knows if its possible and give a hint how to set it up, maybe with an example?
Regards and cheers
-
You could certainly write something to do this in C#, but there is nothing coded directly to do this in HG. The alternative would be to have a simple C# code that checks during certain times of the day at a certain interval (every 30 minutes between sunset and sunrise) and then notifies you if the door is open. If so, then you can use the Android/Windows Phone/Web interface to close the door.
The one thing I would be cautious of with garage door control is that these are big heavy doors that can cause a lot of damage. I know automating them sounds very convenient, but safety and property damage could be at stake. If I were going to incorporate a garage door automation into my home, I would seriously consider installing a camera that could show if there were obstructions prior to blindly (essentially) closing the door. If I ever get cameras installed, this is likely something I will do since we have forgotten to close the door (or it decided to not close) when leaving the house.
-
Hi Bkenobi, you say in your reply that it can notify me...how do I do that? Will there be a popup on the screen, im not a c programmer, but when I read code from others I try to change it so that it does what I want...and until now I love the way Homegenie works
If you have an idea how to set it up.. please..
Cheers and happy new year!
-
You can use the built in email support to send email with the following C# code:
Net.SendMessage( recipients, subject, messagetext );
where,
recipients is a string containing the email address
subject is a string containing the email subject
messagetext is a string containing the message
You will need to set up the email notification with Messaging and Social -> E-Mail Account. Attached is a simple script to email you every 30 minutes.
-
Hi, thank you.. I have thought of it myself and its working, I create the subject of the email by building a string...but is it possible to create something more direct?..if you arm the security.. it gives after 10 seconds "armed" ..isn't it possible to show a notification like that?
-
If you are asking about a way to notify within the HG web interface, use:
Program.Notify(title, message);
This will pop up a message in the upper right of the interface for about 1 second.