Vera Alexa Plugin 7.32
-
Thought I had the newest version, but I downloaded the files again and uploaded. Fixed the “Please install JQ” message but still am getting the same error with startup failure and latest response
-
Could you please enable debug mode and post some more logs?
Also, look at the files in storage/ to better understand what’s going on. Maybe it can’t generate the cookie.
Thanks. -
Sorry for the delay..
Did a reload to see what comes up in the start-up logs here are some errors that I found01 03/16/21 17:34:00.191 Device_LuaUPnP::CreateServices removing incomplete service from 632 <0x77fa1320> - - - 01 03/16/21 17:34:54.915 LuaInterface::CallFunction_Startup-1 device 632 function startupPlugin failed /etc/cmh-ludl/L_VeraAlexa1.lua:89: bad argument #3 to 'format' (string expected, got nil) <0x775cb520> 01 03/16/21 17:34:54.915 LuImplementation::StartLua running startup code for 632 I_VeraAlexa1.xml failed <0x775cb520>```
-
Trying to get more logs but I keep seeing the same logs as my original post when I try to send a TTS command
Update: I SSH into my Vera and deleted all VeraAlexa files and reuploaded. That seems to have fixed any errors showing up in the logs. Unfortunately now I cannot get past the cookie issue, have tried multiple cookie files and multiple OTP but no help. I guess this parts on me to solve!
-
If @toggledbits or @rafale77 still have a build environment setup, we could try to compile oath tool and I could host in a public repo, so it could support 2 factor authentication and avoid the captcha problems.
-
No luck... I unfortunately deleted my ramips OpenWRT build environment shortly after migrating away from the vera.
-
Please excuse my n00b questions, since I just installed the VeraAlexa plug-in for the first time on my Vera Plus (7.32) and got the device to appear in Devices just fine.
But even after entering my Amazon login credentials (specifically, email address and password), I keep seeing "cookie does not exist. logging in ... ERROR" under the "LastResponse" variable.
Questions:
*Must I also edit alexa_remote_control_plain.sh in /storage/alexa? (Lots of defaults seem different from my Amazon account)- Where can you find all the possible 'DefaultEcho' names? (So I know exactly which text to place in that variable)
- My Vera's file system does not display the file '.alexa.login' in '/storage/alexa/' (mentioned in "LastResponse")
Trust me, I really, really, really tried to follow all the setup steps as written on Github, but worry that something important was omitted.
-
@librasun Have you tried getting the cookie file from Firefox outlined in the Vera forum? The link to that is in Github.
You can get the device list from your Alexa app too, its just whatever your Alexa device is called in the app (case sensitive).
-
I'll go look for that now, thanks. The nearest such info I saw read as follows, which became kind of a puzzle for me to solve (unsuccessfully, it seems):
"cookie does not exist. logging in ... ERROR: Amazon Login was unsuccessful. Possibly you get a captcha login screen. Try logging in to https://alexa.amazon.com with your browser. In your browser make sure to have all Amazon related cookies deleted and Javascript disabled! (For more information have a look at /storage/alexa/.alexa.login) To avoid issues with captcha, try using Multi-Factor Authentication. To do so, first set up Two-Step Verification on your Amazon account, then configure this script (or the environment) with your MFA secret. Support for Multi-Factor Authentication requires 'oathtool' to be installed."
I did delete all browser cookies before logging into alexa.amazon.com (again, cuz I was already logged in!), but never quite disabled Javascript (nor is it clear why or when to turns these features back on).
-
Per Catman's post back on MCV forum, the contents of /storage/alexa are supposed to be:
.alexa.cookie
.alexa.devicelist.all
.alexa.devicelist.json
.alexa.devicelist.txt
alexa_remote_control_plain.shBut mine only has the last file shown. Rather than re-create that long discussion HERE, I'll just keep reading back on Vera Forum to see what my next steps are. I may then recommend that all these additional steps be included somewhere on the VeraAlexa github repo for others to follow.
-
I only have the .alexa.cookie.txt .alexa.login amd alexa_remote_control_plain.sh files too. I think the rest will populate when you get a successful login, which I havent been able to get. Have you tried inputting the OTP in too? From what I remember its very finicky to login this way.
-
CORRECTION: Based on other Forum suggestion, I finally found "Show hidden files" (under WinSCP > Options > Panels) and turned that on, so I now see .alexa.login in that directory.
Oh, this is agonizing. About to give up... but won't.UPDATE: Immediately after attempting to execute one of the sample Lua commands from Readme, more (hidden!) files populated the /storage/alexa folder:
.alexa.cookie
.alexa.devicelist.all
.alexa.devicelist.json
.alexa.devicelist.txt
alexa_remote_control_plain.sh -
No, I never even saw directions about finding such a cookie (there are still hundreds of thread replies for me to read though!), so I never tried.
It just appeared. Also, after inspecting the .TXT version of the DeviceList, I see that individual Echo devices' names are listed under 'accountName' so I can work from that.
Will help with constructing commands. LOL, I still don't expect this to work... feels very ungainly. (Certainly I could not instruct another human HOW to do all this!) -
@librasun heres the post if you need to grab the cookie https://community.getvera.com/t/alexa-tts-text-to-speech-and-more-plug-in-for-vera/211033/156
-
LibraSunreplied to Pabla on Mar 23, 2021, 9:06 PM last edited by LibraSun Mar 23, 2021, 5:43 PM
@pabla said in Vera Alexa Plugin 7.32:
@librasun heres the post if you need to grab the cookie https://community.getvera.com/t/alexa-tts-text-to-speech-and-more-plug-in-for-vera/211033/156
Thanks. I'd like to believe that somehow the correct .alexa.cookie file has already populated my Vera automagically, as noted above, so am loathe to (a) retry creating it, much less (b) installing Firefox just to experiment.
I appreciate you having located that URL for me, which hopefully will help others. IF it's still necessary (and if it IS, I'd love to think @therealdb could augment his "README" file with all that info??).
UPDATE: HOLY SMOKES, this finally worked (I had to establish the EXACT device name to use after -d; not all of them responded)....
luup.call_action("urn:bochicchio-com:serviceId:VeraAlexa1", "RunCommand", {Command="-e weather -d 'Living Room'"}, 344)
Helped to watch Vera's LuaUPnP log all the while. Somewhere along the way, I definitely had to perform another hard refresh of the browser as well, to force a Luup enging restart after the .alexa.cookie file had been created. Ugh, so many steps!
-
FWIW I just tried the command up there and it didn't work
It's really not that hard, and it is brilliant, especially since you can use Reactor to do notifications
C
-
-
@librasun said in Vera Alexa Plugin 7.32:
@Pabla, I plan to attempt Announcements later today, as my 2nd experiment. Should be fun!
@CatmanV2 did you make sure to alter the devNum to match that of the "Alexa TTS" device on your Vera? (Ha, look at me, trying to give YOU directions, lol)
I'm always happy to learn but yes, I did do that
uup.call_action("urn:bochicchio-com:serviceId:VeraAlexa1", "RunCommand", {Command="-e weather -d 'Living_Room_dot'"}, 22)
Total silence.
2021-03-23 21:51:41.439 luup_log:0: ALTUI: runLua(luup.call_action("urn:bochicchio-com:serviceId:VeraAlexa1", "RunCommand", {Command="-e weather -d 'Office'"}, 22)) 2021-03-23 21:51:41.439 luup.call_action:: 22.urn:bochicchio-com:serviceId:VeraAlexa1.RunCommand 2021-03-23 21:51:41.886 luup.variable_set:: 22.urn:bochicchio-com:serviceId:VeraAlexa1.LatestResponse was: sending cmd:weather to dev:Everywhere type:A3C9PE6TNYLTCH serial:de3b4a21ca844817bc180e826e636425 customerid:A1CVTZ... now: sending cmd:weather to dev:Office type:A32DOYMUN6DTXA serial:G090U50991550NLS customerid:A1CVTZEBJIUFJI #hooks:0 2021-03-23 21:51:41.886 luup_log:0: ALTUI: Evaluation of lua code returned: nil
Odd
It also throws an 'unknown device' even if I give it a device I know is right, so I assume I'm screwing my syntax
C
14/119