Vera Alexa Plugin 7.32
-
Hello @therealdb , I have updated to the new vera FW and cant seem to get your plugin working. I keep seeing "install jq package" on the device itself and when I reset everything and got a new cookie file I see this in the device's
Latest Response
variable:ERROR: missing argument for -d /storage/alexa/alexa_remote_control_plain.sh [-d
.I have used the code to reset the cookies, added a new cookie file, added the OTP, updated the plugin (did this first actually) and still cant get it working.
Testing some TTS commands I see this response in my logs:
"Say", {Text="Hello from Vera Alexa", Volume=50, GroupZones="Bar Echo", Repeat = 3}, 632)) <0x6bc41520> 08 03/14/21 10:57:57.179 JobHandler_LuaUPnP::HandleActionRequest device: 632 service: urn:bochicchio-com:serviceId:VeraAlexa1 action: Say <0x6bc41520> 08 03/14/21 10:57:57.179 JobHandler_LuaUPnP::HandleActionRequest argument Repeat=3 <0x6bc41520> 08 03/14/21 10:57:57.179 JobHandler_LuaUPnP::HandleActionRequest argument Text=Hello from Vera Alexa <0x6bc41520> 08 03/14/21 10:57:57.180 JobHandler_LuaUPnP::HandleActionRequest argument GroupZones=Bar Echo <0x6bc41520> 08 03/14/21 10:57:57.180 JobHandler_LuaUPnP::HandleActionRequest argument Volume=50 <0x6bc41520> 50 03/14/21 10:57:57.180 luup_log:632: VeraAlexa[0.9.0@632]:addToQueue: added to queue for 632 <0x6bc41520> 01 03/14/21 10:57:57.181 LuaInterface::CallFunction_Job device 632 function SVeraAlexa1_VeraAlexa1_Say_run failed /etc/cmh-ludl/L_VeraAlexa1.lua:89: bad argument #3 to 'format' (string expected, got nil) <0x6bc41520> 50 03/14/21 10:57:57.181 luup_log:0: ALTUI: Evaluation of lua code returned: nil <0x6bc41520> ```
-
I’m out at the moment, but I’ll take a look tomorrow morning my time.
-
Just adding some extra info that I am seeing now. Got a blue banner saying Alexa Startup Lua Failure
-
It seems you're running an old version. Just get the files from GitHub and try again
-
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!
7/119