Still having issues uninstalling the addon v. 0.5? Try this:
Hey y’all - if you’re still having problems removing the addon, here are the steps that worked for me. Note that the addon still shows somehow in the hassio panel (twice, actually), but these are safe to ignore. The custom_component by @keatontaylor now works just find and dandy. Thanks again to @keatontaylor for this!
First, enable debugging access to ResinOS. Instructions from the docs are here, but the steps are this:
Generate an authorized key on the device you’d like to use to access ResinOS (see this). I’m doing this on my mac laptop.
Important: On your computer, rename the id_rsa.pub file to authorized_keys without any extension. Usually this means that you’ll have to use your terminal. On mac, it’d be: mv .ssh/id_rsa.pub authorized_keys
Take your hassio SD card. Put it in your computer. Move the authorized_keys file to the main directory of the SD card…
Eject that SD card from your computer.
Put that SD card back in the hassio machine
ssh root@IPADDRESS -p 22222
Change directory to /
Now list files ls and you’ll see the resin-data directory.
Change into the directory: cd resin-data
Now we want to edit the addons.json. But first! Stop ha. Open another terminal window, and ssh into the docker machine: ssh root@IPADDRESS and enter the command: hassio ha stop
Back to the editing terminal window, we’re in a basic shell so we have to use vi. Edit addons.json with vi by vi addons.json
Scroll down, you’ll see where the alexa addon is described. Delete the entire entry line-by-line by pressing dd for each line. Make sure to retain JSON formatting for the stuffs you aren’t deleting.
Keep scrolling down, there’s another section. Do the same thing.
Exit vi by hitting ESC then : then wq then hit ENTER
Ok. We’re probably good now, but I went a bit further. There’s a few directories and files to clear out too.
Change directory to addons by typing cd addons
After listing directorys via ls you’ll see four directories: core, data, git, and local
Go into each of these directories and see what remains from alexa. Delete 'em via rm -r FILE_OR_DIRECTORY
Bam. Now restart ha and move on with the life.
This worked for me. I hope this helps someone. Not sure why the addon still shows in HA, but whatever. I don’t much care. I’ve got alexa_tts and media control again thanks to @keatontaylor.
I did put this into my browser: chrome://settings/content
And it brought up the flash settings, I added www.amazon.com to the allow list and restarted my HA, Thats when the magic happened and I heard her wonderful voice!
I’m happy to see you managed to get it working again too.
This is a beautiful component and its full potential is yet to come.
Glad I could help. Have a nice weekend @Corey_Maxim …
- id: family_greeting
alias: Family Greeting
trigger:
platform: state
entity_id:
- binary_sensor.cameron_home
- binary_sensor.corey_home
- binary_sensor.courtney_home
- binary_sensor.mom_home
- binary_sensor.morgan_home
- binary_sensor.wendy_home
- binary_sensor.andy_home
- binary_sensor.jasmine_home
- binary_sensor.brandon_home
from: 'off'
to: 'on'
for: '00:00:05'
action:
- wait_template: "{{ is_state('script.say_greeting', 'off') }}"
- service: script.say_greeting
data_template:
entity_id:
- "media_player.livingroom,media_player.bedroom,media_player.courtneys_room"
- media_player.fire_speaker
person: >
{{ trigger.to_state.name }}
{%- for s in states.binary_sensor
|rejectattr('entity_id','eq',trigger.entity_id)
|selectattr('state','eq','on')
if '_home' in s.entity_id and
(now() - s.last_changed).total_seconds() < 60 -%}
{{ (' and ' if loop.last else ', ') ~ s.name }}
{%- endfor %}
message: >
{{ ["Welcome back home PERSON",
"Guess who is home PERSON is!",
"PERSON is now in the house.",
"Welcome Home PERSON We have missed you Or at least I did.",
"Attention Everybody PERSON is home I repeat PERSON is home Welcome home PERSON",
"Our home is now complete, Rest your head and relax your feet, Welcome Back PERSON",
"Life is like a song, you’re back where you belong, Welcome home PERSON",
"Hey there PERSON Welcome Home!",
"Knock Knock. Who is There? PERSON is!",
"PERSON, you are home!",
"I know a secret. PERSON is home!",
"PERSON it's nice to see you again. Right where you belong. Welcome home PERSON",
"O M G it's PERSON. Oh how I missed your face. Welcome home",
"Welcome back to the best house in th 3 3 0 PERSON",
"Oh Goodie PERSON is home. Welcome back",
"When PERSON is here we are complete. Its nice to see you PERSON"
"Its not the same when PERSON isn't here, so from the MAXIM's welcome home"
] | random }}
Wow looks awesome,thanks for your hard work! One question, i am running hassio on a ubuntu server 18.4 VM on windows 10. Will it work, should i do anything different? Thanks for the help.
Could you maybe walk a noob through how and where to enter this and set it up. I have everything else working but cant wrap my head around the tts part and that is what i want the most.
I am running hassio on a ubuntu server 18.4 vm under windows 10 home. Thanks for your help if you can find the time!
For everyone who is having trouble with the CAPTCHA when you reboot, here is what I’ve done that seems to work for me so far. Before I reboot, I delete the ----cache---- folder located the following path: .../custom_components/media_player
During the restart it will recreate the cache folder (and sometime I delete it again just for good measure, not sure it is necessary)
I’m running the latest HASSIO 0.74.2 and Alexa.py version 0.7.1. If you are not getting the CAPTCHA in the first place you may want to delete the cache, refresh your browser and reboot.
updated my hass.io to 75.1 and now after i put the captcha in it says Error doing job: Future exception was never retrieved in my hass.io error log, and ive tried to restart and reset the raspberry pi but does the same every time.
(and for others, this is related to the JSON error many people are getting)
I did this, but i wasnt getting that flash error. However, all that said, it NOW WORKS
i was looking at your screenshot - where it has a button that says to send a code to login… then it hit me… 2-factor authentication. i disabled mine… and then did the elaborate login/logout/etc… and bam… .all works
also, its worth saying that I am NOT doing this from the computer where home assistant is installed. HA (not hass.io) is on an docker hosted on an archlinux system (in my house, but separate).
For everyone else, the JSON error (simplejson.errors.JSONDecodeError: Expecting value: line 8 column 1 (char 7)) effectively means that it FAILED to LOGIN.
I noticed that when I was success, i got another dialog box on my home assisstant front-end after the captcha… it had nothing in it - i had to X out. I believe we need a better ‘success’ message than this, and also better checking that we had a successful login… all it does now is see if the word ‘devices’ is included in the web page response!!! thats the real error here. should i code the correction? i learned python for this so i might as well use it!
now to see if i can re-enable 2-factor authentication…
ANSWER: No… Turning that back on breaks it directly.
Log Details (ERROR)
Sun Aug 05 2018 22:03:50 GMT+0100 (British Summer Time)
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/media_player/alexa.py”, line 173, in setup_alexa
update_devices()
File “/usr/local/lib/python3.6/site-packages/homeassistant/util/init.py”, line 325, in wrapper
result = method(*args, **kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/util/init.py”, line 325, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/media_player/alexa.py”, line 144, in update_devices
update_devices, url)
File “/config/custom_components/media_player/alexa.py”, line 209, in init
self.refresh(device)
File “/config/custom_components/media_player/alexa.py”, line 253, in refresh
self._media_image_url = self._session[‘mainArt’][‘url’]
KeyError: ‘url’
thats from my logs, cant get alexa to work again even after downgrading to 74.1 its now screwed
This is fixed in the next version coming out. You’ve successfully logged in, but for some reason your Alexa device isn’t providing a URL for the artwork. If you need the fix early, see my earlier posts.
Big thanks to @alandtse who single handedly worked on getting changes in place to solve a lot of the lingering issues with login. Please report your findings and let us know if it is working better for you.
Note: Please ensure when downloaded you are grabbing: ‘VERSION: 0.8.0’
Other improvements:
Session cookies stored in config, no longer required to type captcha in after HA reboot
Linting fixed 100% for eventually submitting to home assistant
Additional logging and catching of errors
Captcha configurator now shows proper error messages.
Thanks again @alandtse for the changes! If you see anything else you want to add here that I overlooked let me know!
I don’t know if it makes a difference that I’m in Australia but my account is US. I just get a constant captcha loop, telling me it can’t login, even though I’m sure I’m doing the captcha right.