more G-Labs products

Author Topic: Human Interaction  (Read 1725 times)

November 10, 2014, 02:32:18 PM
Read 1725 times

DutchHans

  • **
  • Information
  • Jr. Member
  • Posts: 39
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

November 10, 2014, 04:11:41 PM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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.

December 31, 2014, 06:17:32 PM
Reply #2

DutchHans

  • **
  • Information
  • Jr. Member
  • Posts: 39
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!

December 31, 2014, 07:58:32 PM
Reply #3

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
You can use the built in email support to send email with the following C# code:
Code: [Select]
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.

December 31, 2014, 09:37:42 PM
Reply #4

DutchHans

  • **
  • Information
  • Jr. Member
  • Posts: 39
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?

January 01, 2015, 02:12:25 AM
Reply #5

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
If you are asking about a way to notify within the HG web interface, use:
Code: [Select]
Program.Notify(title, message);
This will pop up a message in the upper right of the interface for about 1 second.