SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By Sinaz20
#175704
Hello, Sparkfun-- this is my first post here. I'm really excited to get moving on some projects I have in mind, but I need some help getting started.

I have just installed a Smartthings hub in my home and begun installing some simple z-wave switches. All the pre-manufactured stuff is working great, but now I want to hack some of my non-smart devices to include in my home automation network.

My first target is the media/gaming PC we have hooked up to the TV. THE GOAL: build a simple controller with an XBee radio that will intercept the leads going to the power button so I can send short and long presses via my phone app. I hope this will be simple enough a project to build a familiarity with integrating XBee (and probably Arduinos-- or whatever controller option is best) into an HA network so I can more independently plan and execute future projects.

I am capable of designing and writing code. I have an Army trained background in electrical engineering that mostly gives me confidence in working with solid state components, just not designing systems. I have entry-level familiarity with Arduinos (my last project being a prototype of two nanos playing laser tag against each other on a breadboard-- designed and coded by me.)

I have read a lot of forum posts on here and on the Smartthings board concerning XBees, read some documentation, read some tutorials on Sparkfun (yay, serial communication.) I'm still not sure, though, the avenue of approach for my project. What major components do I need? I gather the XBee radio is not enough-- that it needs some brain, either an XBee with a controller built into it, or an Arduino, or what? Considering suggestions on the components, some links to relevant documents or even some project tutorials that would steer me in the right direction would be appreciated. I'm just not entirely sure what keywords I'm searching for yet.

I could currently design an arduino to interface with the PC power switch and read the current power state. I just need to know how the XBee will be joined with this project and integrated into my z-wave/Smartthings mesh and whether or not there is a better option than using an Arduino.

Thanks-- pre-emptively-- and if this post is lacking the details you need, please ask, and I'll try to be prompt in my replies.
By Valen
#175741
I don't know how the Xbee series 1 or Series 2 work with home automation, or this z-wave stuff. I think the Digi.com forum is a better place to find answers on if you can and how. But the subject has come up here in the forums the last year or so.

In regards to powering up your pc: If you connect the green wire in the ATX powercable (going into the mainboard) to ground then it would make your PSU start up, so also make the PC boot up. It is normally pulled high by the powersupply to 5 volt. Imho, this is much safer than making a circuit that breaks the circuit on the mains side of the power supply. Any microcontroller can make this green wire conduct to ground via a npn transistor. Even a standalone Xbee can do this, if you send Remote Configuration API commands to it, turning a GPIO pin to output high turning on the transistor.

Turning the pc off might be trickier though. As killing power to the pc without a proper shutdown sequence of the OS is not advisable. It might cause system corruption at some point. I would issue shutdown commands via software over the network. (like with the freeware Poweroff program)
By Sinaz20
#175742
Thanks for the info-- yeah, my intentions were to simulate button presses for the power and reset buttons by intercepting the pins for the power switch and reset connectors.

I wouldn't want to shut down the PC by pulling the power at the mains... though I will be replacing the outlet it's connected to with a smart switch so that I can build a scene that will power down all the electronics appropriately, then shut off the outlet switch to deny electricity to power vampires.

Another forum directed me to a book by Faludi. I've begun reading that, and it is helping me to better understand the concepts that I should be searching for with future research.

I've bought my XBees and explorers so I can start following along with the learning exercises in the book.