yeah i got firefox on ubuntu
Install this addon/extension for Firefox: https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/
Clear any Alexa.amazon.com/amazon.com cookies. Log in. Click the extension icon and download the cookies.txt file. Move it to your tmp directory, rename to alexa.cookie and you should be good.
So i don’t do it directly on the HASS device but my main desktop.
Thanks, that worked much better, but now getting this
[email protected]:/home/homeassistant/.homeassistant$ sudo ./alexa_remote_control.sh -a the following devices exist in your account: ./alexa_remote_control.sh: 500: ./alexa_remote_control.sh: jq: not found
Edit: ran this and it looks to be working!!
sudo apt-get install jq
I never saw that error, maybe try
sudo apt-get install jq. I don’t run mine as sudo too. Also make sure all the other amazon-related files but the cookie file are deleted in tmp
thank you. thank you thank you.
i got it working again.
somehow i expected it was a formatting problem, but i didnt know how to get the right format.
and indeed like @ptdalen got into, this script needs jq.
Glad you got it working , I did nothing special just added the login details as before.Just worked must be lucky
I also needed a last alexa sensor here are my details
- platform: command_line name: alexa last seen command: "/config/alexa_remote_control.sh -lastalexa"
@rogersmj I seem to remember alexa_wrapper.sh does not like spaces in the speech text have you tried “this_is_a_test”. ?
i create sensors with appdaemon.
that way i dont need to restart HA every time
Send voice commands FROM HASS TO Alexa using AVS
I have a question about this. I set it up, and it’s pretty cool. It takes a little bit to update. One of the things I’m hoping to be able to do is to run an alexa routine, that triggers an automation. For example at the moment I have an input boolean that turns on as part of an alexa routine, The input Boolean is a trigger for an automation that kicks off a TTS back to the Echos. Currently I have it do TTS to a specific Echo, but would love for it to run on the lastalexa instead. But as it stands now, its a bit too slow to update.
Anyway, what is the best way to that? Any tips, recommendations, scripts, sensors to share?
I use spaces in all mine and they work perfectly.
You can change the default 60 seconds scan interval
I have been using a dummy bulb rather than an input Boolean in the Alexa Apps as this give me 99 triggers rather than 1. Got fed up of lots of input booleans switches in the alexa app.
I did see the dummy bulb post the other day. Genius, and I plan on converting over to that. So simple and clean. I thought about scanning every 60 seconds, but even that is not quick enough. Is there a way in the automation, to get -lastalexa immediately?
I think if it like this.
“Alexa, give me the surf report” (Alexa Routine, ran in kitchen)
up to 60 seconds later
“The water temp is X, the UV level is X, High tide, is X”
Is a little too long.
Right now I get the response back right away, but… only on a designated echo (which is fine 90% if the time). I only have a few of these “reports or queries”, but would like to add a few more as I get more involved.
have you tried dropping the scan rate ? don’t know is this will slow down your server too much ?
I have not. So, I guess my question is more of - is there a way to run the " alexa_remote_control.sh -lastalexa" command on demand in an automation, and use the results in your automation. Rather than the sensor. I agree that for many types of automations, one a minute would be just fine. I also have a few automations already running that send me alerts or notifications on multiple alexas, so it could be “wrong” sometimes, or not what I expected. But if I ask a question, I know that the last alexa is the one I’d want to get a response on right away
The simplest way of getting results from external scripts is using Command line sensors. try dropping the scan rate. I put a response in the Alexa app saying something like “please wait while I check” this gives you another 10 seconds leeway
@ReneTode may have some clever options in Appdeamon, but I’m not aware of any other way of getting the info back to HA short of using the HA API and curl
My only concerns about running the script every 10 seconds would be the overhead on the echos? I guess it’s really just polling alexa.amazon.com, but do you think there is any sort of internal network traffic related to the echos?
Thanks for the great info, appreciate it
i wouldnt run the script every 10 secs. i think that would cause more trouble then it gives back.
what i do:
i got a custom skill from alexa. that can be in HA, but i got it connected to appdaemon)
if that gets triggered a piece of appdaemon is triggered so then i change the sensor.last_alexa.
i also scan every minute.
i also have emulated hue, that triggers some input_booleans. and the change from the input_boolean triggers an (appdaemon) automation. in that automation i also scan for the last_alexa.
so that way i can let alexa speak something when i use emulated hue.
its probably also possible to create a custom component from emulated hue and let the scan take place when theat component is triggered.
and i dont know if emulated hue gives some kind of event, because then that also could be used to trigger the scan.
Can you give more details on this?
I am using HA cloud. I’ve managed to not have to use emulated hue or appdaemon yet. I do have several input booleans, that I use with Alexa to kick off automations, I guess my question is how to you force the sensor to update?
Hmm, now that I’m typing do you maybe link your sensor to a different entity ID (like an input boolean in my case), and use that to cause it to update?
with emulated hue (probably also possible with cloud)
speak to alexa
input_boolean.A gets triggered
an automation gets started by the change from input_boolean.A
that automation can do everything you want.
- switch lights
- change heating
- scan for last_alexa
- send tts to last alexa
i use AD, but it can be done with all kind of things.
how do you get the alexa name back into HA from the last_alska call ? without using a command line sensor ?