Get CPR certified in 30 minutes at CPR Test Center.
Echo & Alexa Forums

Alexa Echo to run a .bat file on my win10 pc

0 Members and 1 Guest are viewing this topic.

digger73

Alexa Echo to run a .bat file on my win10 pc
« on: May 28, 2016, 09:49:14 pm »
How do I get Alexa Echo to run a .bat file on my win10 PC It works and tells jokes etc.

vegasguy

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #1 on: May 29, 2016, 05:37:21 am »
Alexa already tells jokes without having a PC or a bat file.


Sent from my iPhone using Tapatalk

greenpjs

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #2 on: May 29, 2016, 10:59:06 am »
I have the same need.  My PC is set up to control a lot of things and being able to run bat files via an echo command would be wonderful.  I had an idea that I could write software for the PC to emulate a WeMo device which the echo can already control.  I have started looking into that, but the WeMo protocol is much more complex than I envisioned (lots of UPnP stuff to emulate in addition to the messages to turn things on and off).  Emulating a WeMo is just one idea, though.  Does anyone have any others?  The end goal is to be able to say, "Alexa, tell my PC to run xyz.bat" or something similar.

Pat

Offline kevb

  • ****
  • 250
Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #3 on: May 29, 2016, 11:16:17 am »
I'm not sure if this will help, but here is a link to a Hue emulator which I use to have the Echo communicate with a VeraPlus and Harmony Hub. You might be able to have it run your file on your pc, but that is a bit over my head. 

https://github.com/bwssytems/ha-bridge

DParker

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #4 on: May 29, 2016, 11:51:34 am »
Yeah, a simple Google searc on the terms "WeMo" "emulator" "PC" turns up several solutions, the first being: http://hackaday.com/2015/07/16/how-to-make-amazon-echo-control-fake-wemo-devices/

Maff

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #5 on: May 30, 2016, 06:40:30 pm »
It's really simple. Use a combination of an IFTTT channel called pushbullet to push a link on an Alexa command, then on your pc,  install pushbullet & an app called eventghost (and it's pushbullet plug in).  You can basically send a signal to your pc on any alexa trigger command, and have it do pretty much anything on your pc. I have it simply shutting down my windows 10 pc on command, but you could have it do anything.

greenpjs

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #6 on: May 31, 2016, 12:43:51 pm »
Thanks for all the ideas.  DParker's response was right along the lines I was looking for.  I had done a lot of google'ing but hadn't found that particular article.  I can't remember the exact search terms I used, but it must have not been those three.

greenpjs

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #7 on: June 01, 2016, 07:17:26 am »
Maff,
You say it's really simple, but I have never used IFTTT, Pushbullet, or EventGhost.  All three have so many capabilities that I am lost.  I have an IFTTT account and have installed Pushbullet and EventGhost.  However, I have no idea where to start.  Can you give an example?  Also, you mention a pushbullet plugin for EventGhost.  I can't seem to find that.

Thanks,
Pat

Update:  I found and installed the plugin - the one from Pako, right?  I'm still not sure where to start.
Update #2:  I got it to work after a lot of trial and error.  I can now tell Alexa to trigger an event on my Windows 10 PC and it runs a corresponding batch file.  (I have three different batch files I can run, but there doesn't seem to be any limit.)
It's a shame that in order to send a short message from my echo to my PC (both on my local network), I have to involve multiple servers (Amazon, IFTTT, & PushBullet) out on the Internet.  There must be a better way!  But, at least this does work as Maff said, and it is easy once you figure out how all the different apps work.

« Last Edit: June 01, 2016, 02:07:10 pm by greenpjs »

Maff

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #8 on: June 23, 2016, 08:44:33 pm »
Just spotted your response just now, apologies for the delay. Glad you got there with it. Yes, lots of services /servers involved unfortunately. But I have got all sorts of elaborate scenes and scenarios and devices working together on command using multiple levels of this kind of thing. I guess I'm a born tinkerer & love mini projects! I guess given a few years everyone will have an automated home assistant and normal appliances & computers will have much more polished interaction from kettles to your shoes. But by then it will be normal & not nearly so cool!

lchiu7

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #9 on: June 26, 2016, 06:00:52 am »
I'm not sure if this will help, but here is a link to a Hue emulator which I use to have the Echo communicate with a VeraPlus and Harmony Hub. You might be able to have it run your file on your pc, but that is a bit over my head. 

https://github.com/bwssytems/ha-bridge

I am doing just that with the later version of the Bridge

http://bwssystems.com/#/habridge

I need to run a Javascript program when I ask Alexa to take an action on a emulated Hue bulb and the Javascript program actually runs some SOAP code to fire off a URL to a Dlink smart WiFi switch.

So I can say  "Alexa turn on the bedroom" and this fires off the Javascript code to send the SOAP command to the Dlink switch which switches the floor lamp in the bedroom

tetraecho

Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #10 on: August 10, 2016, 08:20:52 pm »
Maff,
You say it's really simple, but I have never used IFTTT, Pushbullet, or EventGhost. 

You don't need IFTTT, or Pushbullet
http://www.eventghost.net/forum/viewtopic.php?f=2&t=7429 lets Alexa talk to EventGhost without them.


remotemass


Re: Alexa Echo to run a .bat file on my win10 pc
« Reply #12 on: March 18, 2017, 10:42:26 am »
I also run HA-Bridge and trigger several batch files.
No need to create complicated scripts, the batch file is a script.

You simply add a name then in the on item add the path to your batch file click add button on that row
go back to top of page and click save.
tell Alexa to discover devices
Done! ;)