So I know that using a wifi shield, an Arduino can send a Wake On LAN command. Can it also send a Hibernate command to a PC? There's got to be something out there because Unified Remote (Android app) can do it. Or can an Arduino wirelessly run a .bat file on a remote PC (same network) to achieve the same Hibernate state?
The only way I can see to do it would be to write a program that runs on the PC. Have it listen for a message from the arduino over TCP or UDP and on receipt, invoke hibernation.
There's unlikely to be a more mainstream way of doing it, because if there were, people would use it as a prank on their friends/coworkers PCs.
wildbill:
The only way I can see to do it would be to write a program that runs on the PC. Have it listen for a message from the arduino over TCP or UDP and on receipt, invoke hibernation.There's unlikely to be a more mainstream way of doing it, because if there were, people would use it as a prank on their friends/coworkers PCs.
For sure. I would write a script on my PC, but would the Arduino be able to run it over wifi?
Not directly no. All the arduino can do is send packets to the PC. The PC would need some program listening for network traffic on whatever port the arduino is sending to.
GoBetwino sounds a bit like what you're looking for, but the arduino talks to the PC over serial, not wifi.
Bummer, I was hoping to do it over wifi. I have an EasyVR (voice recognition shield) that controls the lighting in my apartment. I thought it would be super cool to have my "I'm home" command send a Wake On LAN and my "I'm leaving" command to send a Hibernate.
majhi:
For sure. I would write a script on my PC, but would the Arduino be able to run it over wifi?
You'd have some program running on your computer listening - the arduino sends it some signal, and it reacts to that. This would work over WiFi no problem.
I'd probably hack it together with an http server (xampp is a nice development stack - comes with apache, php, and other stuff, and have it react to requests for a certain page by kicking off an appropriate script (probably a php script that launches a batch file that actually does the shutdown?), since making a get request has gotta be the easiest and best described way for the Arduino to interact, since that's the biggest use case for arduino internet connectivity.
How good is the voice recognition shield? I was unaware of any such product - I've been looking for years for a program that would interpret spoken word, and if it matched certain phrases, send HTTP get requests. I was under the impression that I wouldn't be able to get acceptable voice recognition without a beefier processor than the Arduino has (I was totally unable to find acceptable desktop software; oodles of things that will try to be your personal assistant, but I don't want that, I just want to match a few specific phrases to specific actions). Does your solution work? Very interested here!