Jump to content

Trying to write a complex program involving a garage door opener


timekiller

Recommended Posts

Posted

Ok, so here is the situation- I built an arcade that uses a PC to run various emulators. I have a 6 button keypad and I want to use one of the buttons to SAFELY shutdown the PC and kill power to the rest of the arcade.

 

I figure I can use a garage door opener (Insteon 74551) to accomplish this. The plan is to connect the button to the power button on the PC (momentary push is perfect for this) and the status to determine when the PC is off (relay hooked to a 5v power connector. When the PC is on, the relay trips, connecting the status wires).

 

I should also mention I have the whole arcade plugged into an Insteon outlet. Actually, it's a surge protector plugged into the outlet. Then the PC and other things (lights, etc) plugged into the surge protector.

 

Here is the logic I am trying to create:

 

If

outlet is ON

and keypad button is pushed

 

then

turn on outlet

momentary push garage relay (turns on PC)

 

If

outlet is ON

and keypad button is pushed

 

then

momentary push garage relay (sends power off signal to PC)

wait for garage sensor to report OFF (happens when PC completes power down)

then turn outlet OFF

 

Ideally, the light in the keypad button should reflect the state of things

 

I figure this probably can't be done with a single program or scene. I just have no idea how to accomplish everything.

 

Any help would be much appreciated.

Posted

A few quick thoughts:

 

Keypad buttons in their default state will toggle between ON and OFF.  There is typically no logical statement that is equivalent to "keypad button is pushed".  One can put the button into a state where each push is ON or where each push is always OFF.  In such a state, the program would then look for the ON or OFF command, as configured.

 

Furthermore, you might actually be able to do this in a single program.  ISY has THEN and ELSE paths.  In the logical form, it might be something like:

 

if

keypad button is pressed ON (keypad button configured to always send ON commands)

and

status outlet is off

then

turn on outlet

push relay

else

push relay

wait xx amount of time

turn off outlet

turn off keypad button

 

I suspect, however, that you will want to add further stuff which could drive you to multiple programs.  Things always get more complicated after you try things out and come up with new requirements.  Also, if it is imperative to wait for direct feedback from the computer being off, this will likely drive you to a second program.

Posted

Thanks for the advice, I came up with something different. Here it is:

 

Configured the grarage opener and keypad just like it was an actual garage door, as instructed here: http://homeautomationguru.com/insteon-enabled-your-garage-doors/

 

Except, obviously the relay is the PC power button and the sensor is hooked to a relay on a power molex in the PC (sensor is "off" when PC is off)

 

Then I made 2 programs:

 

Program 1 "PC Power ON"

-----

If

Status Arcade Outlet is Off

and Status Keypad button ON

 

then

Set Arcade Outlet ON

Set garage relay 3 (Beep Duration)

------

This detects the state change of the keypad button and turns the outlet on, then holds the PC power button for 3 seconds (long enough for power to get to the PC and power it up)

 

 

Program 2 "PC Power OFF"

-----

If

Status Arcade Outlet is ON

and Status Keypad button is OFF

and Status garage sensor is OFF

 

then

Set Arcade Outlet OFF

-----

This detects that the PC is off (sensor), the keypad is off, and the outlet is on and simply turns the outlet off.

 

That's it. All my criteria are met here. The Keypad button basically acts like a PC power light. If the PC is on, the button is lit. If the PC is off, the button is not lit. Pushing the button powers everything up and safely shuts everything down.

 

I like it :)

 

If anyone is interested, this is the arcade I built:

 

http://imgur.com/a/eOurd

 

It emulates all classic arcade games, NES, SNES, N64, Sega Master System, Sega Genesis, Playstation, Laser Disc Games, Wii and a few others. There is also a Wii-U and PS3 console in the control panel.

Posted

I like it, too. Personally, I probably would not include the first two conditions of the second program, but I am funny about such things.

Posted

I like it, too. Personally, I probably would not include the first two conditions of the second program, but I am funny about such things.

I didn't want a race condition where amd turning it on and the sensor does not register the PC on yet and it shuts the whole thing down. :)

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...