bbindreiter / node-red-contrib-alexa-remote2-applestrudel

Node-Red Nodes for interacting with Alexa
https://flows.nodered.org/node/node-red-contrib-alexa-remote2-applestrudel
MIT License
74 stars 20 forks source link

Alexa events no longer firing #138

Closed dshmaui closed 2 months ago

dshmaui commented 11 months ago

I'm unsure what happened, but I'm using this node-red integration for my home assistant setup. It was working earlier this morning, but now the Alexa events are no longer firing, even though I haven't changed anything. I tried reloading the Alexa login, restarting node-red, and restarting home assistant, but none of that seemed to work. I'm on the latest version of the node. Any advice or fixes would be greatly appreciated. Thanks!

Edit: The whole node isn't broken, sending commands to Alexa still works, the node just won't fire events from Alexa

chx0003 commented 11 months ago

Exactly the same thing here

canabang commented 11 months ago

the same, since yesterday

brunialti commented 11 months ago

same here in Italy

Antani69 commented 11 months ago

Same, since yesterday :(

githubwesseln commented 11 months ago

the same, since yesterday

johnnygal commented 11 months ago

Yes, same here. Was working 18 hours ago but not firing now. Tried restart of nodered.

C450lly commented 11 months ago

Same here as of around 9pm yesterday UK time (though some dodgy responses for several hours before that).

This has happened before on node-red-contrib-alexa-remote2, which I understand these nodes are based on: https://github.com/586837r/node-red-contrib-alexa-remote2/issues/193 I'm working my way through that thread to understand the fix, and whether it might be applicable here too...

The Echo devices now appear to have multiple IP addresses on my network, and I've seen more than one Alexa master device IP address as well. It looks like Amazon may have changed something.

The Alexa Event node is initialising and listening, and not triggering on events. The Alexa Routine node appears to be working correctly.

Restart of node red and Echo devices does not change anything. Creating a new account does not change anything.

Any help appreciated.

broeselstein commented 11 months ago

the same, since yesterday (Germany)

niwre2019 commented 11 months ago

Same here, also Germay.

RDAppel commented 11 months ago

U.S. also.

bdydrp commented 11 months ago

Likewise for Australian accounts Been like this for about a week

Hummelchen01 commented 11 months ago

Since yesterday evening, the event [On Device Activity] no longer works for me (Austria) on a voice input via the Alexa Echo devices.

bst056981 commented 11 months ago

same here , i have tried a complete reinstall on a VM and same issues no activity for on device activity im in the USA

drvirtue commented 11 months ago

Same here. (U.S.) Using the latest node-red-contrib-alexa-remote2-applestrudel (5.0.27)

axelpip commented 11 months ago

Same here using version 5.0.27 on service host layla.amazon.de, page amazon.de, language de-DE. I am implementing a workaround using an Alex routine to flip a virtual switch (openhab) and then get the last active device via GET -> ACTIVITIES node which still works.

ichbinsjasicher1 commented 11 months ago

hab das gleiche problem (austria). gibt es eine lösung? bzw wird daran gearbeitet ? lg

brunialti commented 11 months ago

All this is embarassing. I spent a lot of time to integrate alexa with my system, even with chatgpt. Now it is half dumb, Do any of you have any other alternative node to the device event one? Do you suggest any microphone device acting locally able to hear a command after a wakeup word and pass it via any nodered node?

gerlinl commented 11 months ago

I have just started looking into this Rhasspy.

https://rhasspy.readthedocs.io/en/latest/

https://www.youtube.com/watch?v=IsAlz76PXJQ

I don't need too much brain power, just enough to understand the 20 phrases or so I use for my automation system, so I am hoping it is enough. If it works for me, I plan to run a central server (an existing Ubuntu server on a NUC), with a few satellite instances running on PI4s with something like Jabra Speak 410s attached. This is not cheap for a multi-room setup, I have a couple of extra PI4s already, so it is worth a shot. If this can break my cloud dependencies, I will be a happy camper. It looks like there may be cheaper ways to go with the satellites, I just started looking this today.

gerlinl commented 11 months ago

Whisper may be another option, though it sounds like it may need more horsepower to run quickly:

https://github.com/openai/whisper

I know they have integrated it into Home Assistant, not sure if there is node-red package or not.

brunialti commented 11 months ago

I should have a look at an ESP box running willow.

sdholden28 commented 11 months ago

Same here using version 5.0.27 on service host layla.amazon.de, page amazon.de, language de-DE. I am implementing a workaround using an Alex routine to flip a virtual switch (openhab) and then get the last active device via GET -> ACTIVITIES node which still works.

@axelpip can you post or link your nodered flow for this? I've got openhab and nodered linked up but I'm struggling with the last active device node.

DanPatten commented 11 months ago

Is this a problem with this plugin or alexa-remote2?

@bbindreiter

C450lly commented 11 months ago

Is this a problem with this plugin or alexa-remote2?

@bbindreiter

I've just tried installing node-red-contrib-alexa-remote2 on different instance of node red, appears to have the same problem.

tom666-debug commented 11 months ago

Same here since ~2 weeks now. Guess some changes on the Alexa-API side needs to be adapted.

bbindreiter commented 11 months ago

Is this a problem with this plugin or alexa-remote2?

@bbindreiter

Sorry, I haven't had the time to check it yet. 99% some change in the Alexa API.

Although it is tempting, its not reliable to build a smart home based on the reversed engineered Alexa API.

brunialti commented 11 months ago

Is this a problem with this plugin or alexa-remote2? @bbindreiter

Sorry, I haven't had the time to check it yet. 99% some change in the Alexa API.

Although it is tempting, its not reliable to build a smart home based on the reversed engineered Alexa API.

Yes. But are there nodered stable alternatives for voice input in your opinion ?

tjareson commented 11 months ago

A reliable path in my opinion is the workaround via a simulated light bulb. As this is simulated hardware (like hue for instance) I think it is more likely that this support will exist for a long time - otherwise a lot of smart lights would become useless with Alexa. I define then a routine for each command which sets one simulated light bulb to a certain dimming level, which I check then in Node Red. Issue is: I need a seperate routine then for every command, which is a bit annoying to maintain.

bbostock commented 11 months ago

Same problem here in the UK. returned from vacation to find my "Good Morning" command no longer made it through to HA to do all the fancy stuff.

bbindreiter commented 11 months ago

Not one we can buy of the shelf, at least I am not aware. And it makes sense because cloud gives them control and more revenue.

I have seen some DIY projects that run on Raspberries, e.g. Rhasspy. Also some development on HA.

The suggestion from https://github.com/bbindreiter/node-red-contrib-alexa-remote2-applestrudel/issues/138#issuecomment-1663524925 to use a fake light bulb device and set up some routines that set the brightness (0-100) is not bad. I use it myself (a little different). You can then can map the values to a command of your choice.

So for instance define a routine "Close Garage door" that actually sets the brightness of the fake lightbulb to 0, and "Open Garage door" sets it to 1. This change you can pick up in node-red and act on it.

https://flows.nodered.org/node/node-red-contrib-amazon-echo-theukshadow

tom666-debug commented 11 months ago

This approach will only work for some event types. In my case I need to catch the event type "On audio player state change"

brunialti commented 11 months ago

I need to parse the commands, so a true STT (speech--to-text) is required. May be i'll check for ESP boxes with Willow. But It Is not definitively out of the box...

bbindreiter commented 11 months ago

This approach will only work for some event types. In my case I need to catch the event type "On audio player state change"

Right, I did not think about those events.

tjareson commented 11 months ago

@bbindreiter quick question: what is the probability that you might find some time to look into it? ;-) I'm just asking before I'll at least move a few of the current commands then back to the previous light bulb approach and adjust the routines accordingly. family really got used to some alexa commands... :-) Let me know, if there is any support I can possibly provide.

sdholden28 commented 11 months ago

I've been looking for an alternative for a while now with no real luck. I have some nodered flows for room aware Alexa commands (fans, TVs, etc) and some custom Alexa responses based on device states. There's really no substitute in this case for the Alexa event node, as it passes both the Alexa that was spoken to and the audio string it received. It's not the end of the world as it's only a supplement an otherwise robust smart home, but it has been a nice addition for a while now. I'd love to support a fix, via testing, monetarily, or anything else that could be helpful.

bbindreiter commented 11 months ago

@bbindreiter quick question: what is the probability that you might find some time to look into it? ;-) I'm just asking before I'll at least move a few of the current commands then back to the previous light bulb approach and adjust the routines accordingly. family really got used to some alexa commands... :-) Let me know, if there is any support I can possibly provide.

At the moment I can barely keep up with reading all the comments 😔 I might be able to find some time later this month. I understand this is too late for some folks here relying on this functionality.

Maybe someone with some coding skills can start debugging. I am happy to accept PRs

notownblues commented 11 months ago

I'm personally hoping to replace Alexa by what the guys at Home Assistant / Nabu Casa are cooking with Assist, their voice assistant.

Mike Hansen the creator of Rhasspy is working with them on this project and they've been making really good progress so far. They should be announcing more info on Wake Word detection in the next few weeks and possibly how to create our own DIY solution so I'd really keep an eye on that.

Then devices can be easily integrated to HA so the switch can be done with most products and I imagine we could do as much (e.g. capture events, get device request) as well as Alexa Remote2 did if not better as it will be local so faster response and private.

brunialti commented 11 months ago

I'm personally hoping to replace Alexa by what the guys at Home Assistant / Nabu Casa are cooking with Assist, their voice assistant.

Mike Hansen the creator of Rhasspy is working with them on this project and they've been making really good progress so far. They should be announcing more info on Wake Word detection in the next few weeks and possibly how to create our own DIY solution so I'd really keep an eye on that.

Then devices can be easily integrated to HA so the switch can be done with most products and I imagine we could do as much (e.g. capture events, get device request) as well as Alexa Remote2 did if not better as it will be local so faster response and private.

No wakeup word and a montly fee. That Is not what I would like to use

tjareson commented 11 months ago

Related to overall replacement I find the Willow project so far most promising. This demo looks quite impressive, and it seems to follow the same concept than echo, where the heavy tasks are outsourced to a server for transcription tasks. Just that this one will run at home. If that gets a bit more evolved, then it would be an option to replace echo. On the other hand I don't understand why Amazon is just not offering a stable API for a little fee - I do not expect that they provide me data center services forever just because I paid once for a couple of devices. That doesn't look sustainable to me anyway. But we are kidnapping the issue here a little bit... :-D

mm20102010 commented 11 months ago

Same here (Brazil) and using the latest node-red-contrib-alexa-remote2-applestrudel (5.0.27)

smcgann99 commented 11 months ago

I found another node that still works with current API, see https://discourse.nodered.org/t/alexa-remote2-event-nodes-not-working-again/80266/10 for more details. I guess someone with better skills than me can compare them and figure out what needs changing.

bbindreiter commented 11 months ago

I just had a quick look and the commands are not even pushed anymore, others are, e.g. a volume change. But the voice commands are not pushed anymore.

ichbinsjasicher1 commented 11 months ago

bei mir klappt es wieder !!!!!! meine lösung: alle flows exportiert alle flows gelöscht alexa remote2 apfelstrudel gelöscht (alexa config auch) node red neu gestartet install node-red-contrib-alexa-remote-fork importiere alle flows wieder inklusive alexa config node red neu gestartet. alles arbeit wieder wie es soll inklusive alexa events nice!!!!!!

brunialti commented 11 months ago

bei mir klappt es wieder !!!!!! meine lösung: alle flows exportiert alle flows gelöscht alexa remote2 apfelstrudel gelöscht (alexa config auch) node red neu gestartet install node-red-contrib-alexa-remote-fork importiere alle flows wieder inklusive alexa config node red neu gestartet. alles arbeit wieder wie es soll inklusive alexa events nice!!!!!!

This could work properly now, but the latest update to remote-fork occourred more than 2 years ago. That make me worrying about supporto of the fork

bbindreiter commented 11 months ago

This fork uses alexa-remote2 3.8.1, how does this even work 😮

tjareson commented 11 months ago

idk... that would more sound like a configuration problem to solve. But just reinstalling everything w/o knowing what the root cause is doesn't look very reliable (as far as a cloud service is reliable at all anyway)

erauscher commented 11 months ago

node-red-contrib-alexa-remote-fork worked for me. My routines now work again.

Even though the distro is old, I'll take it, at least until this one is fixed :)

bbindreiter commented 11 months ago

The reason this old fork works is because it uses an old style to connect, called V1, and the new alexa-remote2 uses V2 per default, it still has V1 in the code. This has nothing todo with the fork, it's all in the alexa-remote2 lib, everyone uses.

If you want to change the behavior find alexa-remote2/alexa-wsmqtt.js, and change this.connectType2() to this.connectType1() in line 172. That should do the trick, no idea about what side effects this causes.

tjareson commented 11 months ago

Actually in line 172 there is the connect type 1 set already, as part of an if statement: connect() { let url; try { if (!this.macDms || !this.macDms.adp_token || !this.macDms.device_private_key) { this._options.logger && this._options.logger('Alexa-Remote WS-MQTT: Try to initialize old style push connection because macDms data missing'); url = this.connectType1(); } else { url = this.connectType2(); } So I have reversed both commands (1<->2) and initialized, then the event listener worked exactly once and then not anymore. Looks a bit random.

bbindreiter commented 11 months ago

Change connectType2 from the else block to connectType1. Not reverse them.

chx0003 commented 11 months ago

Change connectType2 from the else block to connectType1. Not reverse them.

Yes, that worked, thanks! It'd be interesting to know what are the advantages of connectType2 vs connectType1 though.