Alexa guard via Vera-Alexa and spoken command support
-
So, Amazon recently released the ability to execute spoken commands.
dbochicchio/VeraAlexa: Alexa plug-in for Vera and openLuup. (github.com)
Using my plug-in, you could just do something like this:
luup.call_action("urn:bochicchio-com:serviceId:VeraAlexa1", "RunCommand", {Command="-e textcommand:'Alexa, I’m leaving' -d 'Bedroom'"}, 666)
Or any spoken command that's not directly accesible via routines. Something like
"Play music everywhere"
"TV volume to 32"
"Pause TV"and much more
Give it a try!
-
Seems very cool. I need to look into this....
Maybe add your app to the AltAppStore?
-
ahh, right, I was not looking closely enough. Sorry.
-
Is anyone using Vera Alexa to successfully (and hopefully silently) detect whether a particular Echo device is online? Amazon's Alexa devices notoriously rebuff any attempt at PING via TCP, yet will reveal their presence via ARP -A if you know their assigned IP address in advance.
But that got me to wondering whether the Vera Alexa plug-in might permit a shortcut, using MSR in my case, to elicit a response from each Echo device telling me, "I'm here. I'm awake. I'm online." My primary goal is to send alerts when one of my devices drops offline, which they sometimes do without warning.
Thoughts?
-
I could in theory look at the device.json and use it to construct something, like a Devices variable or similar. Not sure how often this is updated, and I'm not sure if you could find something useful inside. For example, I'm parsing it to detect the alarms. I'm seeing an "online" property that might be useful to you.
-
@therealdb said in Alexa guard via Vera-Alexa and spoken command support:
I'm seeing an "online" property that might be useful to you.
Heck, even if it just updates daily that might suffice. I just hate when I go to speak to an Alexa device and realize that it's been "offline" for days, and I've never come up with a suitable warning notification for that condition.
Thanks!
-
Just curious, do you know why your alexa device went offline? When I had some, it was pretty rare and when it did happen, I recall that it would be because of an automated firmware update which failed to reboot the device or because of wifi/cloud issues. They were pretty rare (still one of the reasons why I hate the cloud for home automation with a passion) but was wondering if and why you had a higher frequency of these.
-
LibraSunreplied to rafale77 on Apr 26, 2021, 7:36 PM last edited by LibraSun Apr 26, 2021, 3:38 PM
@rafale77 said in Alexa guard via Vera-Alexa and spoken command support:
Just curious, do you know why your alexa device went offline?
An alexa might drop out maybe four times a year or so. My hometown has a LOT of power outages, so I always assumed that was part of it. Other times, I'd just notice an Echo Dot sitting there with its light spinning. But the most recent occasion involved an accessory (that ironically includes a battery backup for a Dot, with built-in speaker) whose power light continued to glow even after it stopped providing current to the Dot.
So it's not one particular thing happening, it's rarely the same device, and it's never under my control. The reason I don't immediately notice the drop-out is that I'm never out of earshot of at least 3 Alexa devices in my small home.
-
therealdbreplied to LibraSun on Apr 26, 2021, 7:42 PM last edited by therealdb Apr 26, 2021, 3:43 PM
@librasun I don’t have children in this a plugin, so if you’re able to parse a json/text, I could save it in a variable for sure. Maybe something like this
DeviceName,online,volume DeviceName,online,volume
Or similar.
-
@therealdb said in Alexa guard via Vera-Alexa and spoken command support:
@librasun I don’t have children in this a plugin, so if you’re able to parse a json/text, I could save it in a variable like DeviceName,online,volume
Yes, that's more than sufficient for my needs, since MSR can store HTTP replies and parse JSON objects with ease. Meraviglioso!
Of course, I'm sitting on my hands waiting for the next revision of Vera Alexa to come out, in hopes that the plug-in's basic functionality also returns. Version 0.94 only succeeds with the RunRoutine command, while all else is silent (the mirror opposite of 0.92).
I know you're very busy with other things, so no hurry either way!
-
My dots only go offline when there are wifi issues or, I think, a couple have crashed maybe twice total since I started using them about 3 years back.
AltUI says I'm on 1.0 and speech is fine, no routines.
C
-
@librasun it's done on my dev branch, but I'll need a more couple days to look at your problem. I'll probably release it later this week. it's not json based, but a simple comma-separated list, as I've anticipated before.
-
-
LibraSunreplied to therealdb on Apr 27, 2021, 1:28 PM last edited by LibraSun Apr 27, 2021, 9:56 AM
@therealdb said in Alexa guard via Vera-Alexa and spoken command support:
0.95 is on GitHub. I've managed to fix your problems
Ooh, exciting! I'll get right on that and report back ASAP.
(Planning to d/l the ZIP, unzip it, and drop the relevant files into Vera > Dev Apps > Luup Files > restart > Ctrl-F5 refresh > leave "Configured" = 1, "Debug" = 0, "Announcements" = 0 and then run my test suite from MSR (via Lua commands).)
THANKS, DB!
QUICK FEEDBACK: Did the above and so far, no improvement.
For instance, I send this to Vera from MSR:
"luup.call_action("urn:bochicchio-com:serviceId:VeraAlexa1","RunCommand",{Command="-e weather -d 'Living Room'"}, 366)"and get this response with no errors:
"sending cmd:weather to dev:Living Room type:A15ERDAKK5HQQG serial:eb48978706f5459f890ef0ec5aa9fce9 customerid:A3SL3Z0HELH3YG"
but still no audible sound. Will investigate, and likely go the "Configured=0" route to prompt any updates needing doing. (Did that, no improvement. Captured logs and sent to DB.)
-
Thanks. Just DL and unzip into the VeraAlexa folder, yes? Or Via AltApp store?
Cheers
C
-
@catmanv2 said in Alexa guard via Vera-Alexa and spoken command support:
hanks. Just DL and unzip into the VeraAlexa folder, yes? Or Via AltApp store?
It should be the same.
I've tested RunCommand and it's working for me.
-
Updated from GitHub Master. Have lose all TTS and recreating the .alexa.cookie does not resolve
C
-
Same here I keep getting
50 04/27/21 10:32:06.865 luup_log:952: VeraAlexa[0.92@952](@279):Response from Alexa.sh: "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.ca 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." <0x6ce0c520>
Even though I have tried getting a cookie file multiple times, oddly enough even though I used the Github files from today my plugin still show 0.92