[RELEASE] Echo Speaks v3 + Actions

appreciate all your hard work man, you deserve a beer!

2 Likes

Ya, great work man. My ES has actually been quite stable since the release a week ago, so I'm going to hold off on this update for a few days. Only issue I've seen in the last week is having to manually resend cookies to the devices about every other day, but haven't had to manually refresh cookies to Amazon at all.

Honestly I would really overwrite the current with this new one it will definitely be better

Ok will do. Clicked on update button under app code and nothing came in. Is there a new repo path for this version?

I updated to the new 3.1 apps and driver. Now ES is not recognizing my Fabriq Riff speakers any longer (it use to). Here is the speaker's detail from when you added them in version 2.
image

I let is 'rest' for a half hour thinking it may be completing a setup process, but they never showed up.

Thanks.

Ok, got 3.1 installed. The parent app would not update with the 'update' button even after a reboot. Manually copied code in and saved, then ES-Actions and Device were able to update with the update button.
Things are back to the way they were. Speech to one or a few devices is working. Not a big deal, but for your troubleshooting, I am getting an error in the logs every minute, or when speech is pushed:

Still not working for me:
Announcements. Get error:


Also, now seeing this error every so often:

I haven't been able to get the update button to work on the apps at all only the drivers

As far as the errors ignore them for now... I swear I handled those but will look into it more...

1 Like

I added some more devices to the block list in the last release, I will fix it and you should be good in the next hour

Try opening the app and pressing done. It should sort itself out. Sorry for the trouble...

That did it. They are back. Thanks!

1 Like

I have zero errors in the log overnight and no hub slowdown so far. I have only the one Echo Dot included so far.

Wow...
I completely forgot you can do WS on Hubitat. The light bulb in my head is going crazy with ideas right now...

3 Likes

Does the light bulb in your head have a WS based API? :wink:

1 Like

Maybe... I'm already building it. The only hitch at the moment is passing headers to the websocket connect

As I understand it, even though the spec allows for it, most clients don't support it. Which headers are you trying to send? There might be a way around it.

let url = https://dp-gw-na${amazonPage}/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=${this.accountSerial}-${urlTime}`;
        try {
            this.websocket = new WebSocket(url, [],
                {
                    'perMessageDeflate': true,
                    'protocolVersion': 13,

                    'headers': {
                        'Connection': 'keep-alive, Upgrade',
                        'Upgrade': 'websocket',
                        'Host': 'dp-gw-na.' + this._options.amazonPage,
                        'Origin': 'https://alexa.' + this._options.amazonPage,
                        'Pragma': 'no-cache',
                        'Cache-Control': 'no-cache',
                        //'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
                        //'Accept-Language': 'de,en-US;q=0.7,en;q=0.3',
                        //'Sec-WebSocket-Key': 'aV/ud2q+G4pTtOhlt/Amww==',
                        //'Sec-WebSocket-Extensions': 'permessage-deflate', // 'x-webkit-deflate-frame',
                        //'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15G77 PitanguiBridge/2.2.219248.0-[HARDWARE=iPhone10_4][SOFTWARE=11.4.1]',
                        'Cookie': this.cookie,
                    }
                });
        }
        catch (err) {
            this.emit('error', err);
            return;
        }

There is a native alexa ws:// here is the JS version of the code

So, in Groovy, I believe that would be something like this:

interfaces.webSocket.connect(url, pingInterval: 45, headers: [
    "Connection": "keep-alive, Upgrade",
    "Upgrade": "websocket",
    "Host": "dp-gw-na.",
    "Origin": "https://alexa.",
    "Pragma": "no-cache",
    "Cache-Control": "no-cache"])

Thanks

Was this all discovered using trial and error? or is there docs somewhere?

https://docs.hubitat.com/index.php?title=Websocket_Interface

Docs.

LMAO... I'm usually much better than this. I don't even think to check the docs here because they used to be incomplete :expressionless:

2 Likes