I’m trying to get a shell_command to show up on the emulated hue bridge via an echo. I can’t seem to find anything about this in the documentation, adding
exposed_domains:
- shell_command
doesn’t make it show up either (my Samsung TV is detected if I add media_player to this same spot however, so it’s picking up something at least.
I’m literally just trying to make it able to run an arbitrary script. Currently just to do ‘Alexa, turn on computer’ and have it send a WoL request. The shell_command works fine when I test it via the HA API
Scripts work fine, so running the shell command via script will work, just be aware that you will need a different script for OFF. If you need OFF it might be better to try and use a switch instead of script?
I’ll take a look. Currently I just need an on. Off is all timer/use based automatically so I don’t think I’ve explicitly needed to turn them off for years.
Edit: I’m on a computer now instead of my phone, and command line switches sound great if they show up on the echo. Thanks!
Oooh yes. that shows up. Now to figure out a way that I don’t need to switch things on/off each time. Do you have any ideas for something like that? just a one-shot type thing, like a toggle button that always sends the same command?
I’m away from home at the moment remoting in to set it up so I can’t test with alexa, but when setting the state to on repeatedly via the API it doesn’t re-run the script, it only runs on a state change.
It seems your initial suggestion of the script function works as I wanted, so when I get back I’ll give it a go with the echo itself and make sure it doesn’t sound too stupid when I’m telling it what to do.
Hmm. so it works, mostly. It does turn on my computer now using the script function and saying 'Alexa turn on ’ but, it times out and says the device isn’t responding (even though it woke up)