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
75 stars 20 forks source link

Alexa events no longer firing #138

Closed dshmaui closed 5 months ago

dshmaui commented 1 year 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

haegar33 commented 1 year ago

can confirm this workaround is working. At least for now...

niwre2019 commented 1 year ago

Great, that works for me too, hope it stays that way. Thanks a lot!

AleksCee commented 1 year ago

I don‘t think thats the good way to fix it. Did anyone knows if Amazon disable v2 connection? The reason why wie have so many folks is the API changes in the last 1-2 years… who has the knowledge to fix this generally and update this project?

dshmaui commented 1 year ago

Does anyone using this with home assistant have any luck? I changed the code in the file editor so it looks like this

Screenshot 2023-08-04 at 10 05 50 AM

and restarting my raspberry pi but alexa events still don't seem to be firing

tjareson commented 1 year ago

and restarting my raspberry pi but alexa events still don't seem to be firing

I have the same results. Reversing them worked exactly once, just setting the else branch to type 1 doesn't change behavior at all.

dshmaui commented 1 year ago

Does anyone using this with home assistant have any luck? I changed the code in the file editor so it looks like this

Screenshot 2023-08-04 at 10 05 50 AM

and restarting my raspberry pi but alexa events still don't seem to be firing

This screenshot shows the file I edited

Screenshot 2023-08-04 at 10 08 56 AM
smcgann99 commented 1 year ago

Ideally this will need fixing as source then. Is @Apollon77 still maintaining alexa remote 2, there hasn't been any activity in a while ?

brunialti commented 1 year ago

I edited the file same as above examples. Nothing changed and even worse my nodered become higly unstable, restarting every few minutes

bbindreiter commented 1 year ago

Yes, this is not a fix at all. Just to make it somehow working. I can only repeat myself. Better not build your smart home around Alexa API.

@smcgann99 I think he's busy with other things atm. But if he's dropping it we're all in deep troubles. 99% of the functionality is from his lib.

mm20102010 commented 1 year ago

I also edited using above example. "on device activity" works now. "on audio player status change" not yet.

tjareson commented 1 year ago

Kind of strange that it works for some, for others not. Is it maybe depending on the region or is it somehow necessary to restart node red? I just triggered the initialise node. It worked then, but only once.

chx0003 commented 1 year ago

Kind of strange that it works for some, for others not. Is it maybe depending on the region or is it somehow necessary to restart node red? I just triggered the initialise node. It worked then, but only once.

I stopped nodered service, then made the change to the file alexa-remote2/alexa-wsmqtt.js and then restarted nodered service. All working fine from that moment on.

mm20102010 commented 1 year ago

for those whose changing to connectType1 fixed the issue, were you able to use "on audio player status change" as well?

chx0003 commented 1 year ago

for those whose changing to connectType1 fixed the issue, were you able to use "on audio player status change" as well?

I wasn't using "on audio player status change" in my flows, but I've just added it and tested, it seems that it's not working even with connectType1:

Captura de pantalla 2023-08-04 a la(s) 18 27 49
dshmaui commented 1 year ago

Is there any way to substitute in this new node from home assistant for an Alexa event node? I'm a little confused about how the sentence node works or if its even possible to connect it up with an Alexa

Screenshot 2023-08-04 at 3 38 02 PM
Apollon77 commented 1 year ago

@bbindreiter Do I really go tthat right that switching back to the old wsmqtt format solved the issues? Thats cool news ... please explicitely tag me with such stuff in the future or oipen issues that I can fix it!!

if this really fixes It I prepare a updated library for tomorrow

TechForLife2k commented 1 year ago

node-red-contrib-alexa-remote-fork

Worked for me after a restart.

smcgann99 commented 1 year ago

@bbindreiter Do I really go tthat right that switching back to the old wsmqtt format solved the issues? Thats cool news ... please explicitely tag me with such stuff in the future or oipen issues that I can fix it!!

if this really fixes It I prepare a updated library for tomorrow

@Apollon77 Based on feed back this resolves the issue with Alexa events, although users have reported that audio player status change still doesn't work.

brunialti commented 1 year ago

@bbindreiter Do I really go tthat right that switching back to the old wsmqtt format solved the issues? Thats cool news ... please explicitely tag me with such stuff in the future or oipen issues that I can fix it!!

if this really fixes It I prepare a updated library for tomorrow

This does'nt work for me even after a restart. Even worse, the "other" node does'nt work too: It restart nodered

bbindreiter commented 1 year ago

@bbindreiter Do I really go tthat right that switching back to the old wsmqtt format solved the issues? Thats cool news ... please explicitely tag me with such stuff in the future or oipen issues that I can fix it!!

if this really fixes It I prepare a updated library for tomorrow

I will, thanks for jumping in. V2 connection worked well, just most of the events weren't sent anymore. I guess they changed something to reduce the amount of events being sent. Maybe it's required to subscribe to a certain type of events now.

On V1 it does work for me, however as you probably read audio player change does not come through anymore. But I don't know if this was never the case 🤔

Apollon77 commented 1 year ago

I released a new versioniof alxa-remote which adds a new option to override the connectiontype to use. Please try it out

btsimonh commented 1 year ago

I made the change to us connectType1() instead of 2, and it's restored my non working setup - at least for the first two commands issued. mine's in the UK.

                url = this.connectType1();
                //url = this.connectType2();
Apollon77 commented 1 year ago

UPDATE: needed a fix ... new version from just now is working as intended

chx0003 commented 1 year ago

UPDATE: needed a fix ... new version from just now is working as intended

Still not working with v5.10.3 Went back to v5.10.1 changing line 174 to url = this.connectType1(); and it works again.

smcgann99 commented 1 year ago

I guess if there is a "new option to override the connectiontype" @bbindreiter would need to add this option to this node for it to work.

chx0003 commented 1 year ago

I guess if there is a "new option to override the connectiontype" @bbindreiter would need to add this option to this node for it to work.

You're probably right. Let's wait then for @bbindreiter to release an updated version to test.

Apollon77 commented 1 year ago

... yes he neds to :-)

bbindreiter commented 1 year ago

I will asap. A bit busy atm.

smcgann99 commented 1 year ago

@bbindreiter We do all appreciate your efforts !!

bbindreiter commented 1 year ago

Ok something weird happened. I hacked this in in naturally had to restart node-red a few times, so it initialized alexa-remote a bit too often it seems and now I don't receive events even on connect type 1. I will wait a few hours and see if it resolves.

bbindreiter commented 1 year ago

Alright, now with 5.0.34 it should work. Connect Type 1 is default if not set.

image

I'm not getting events after updating. Let's see for how long. Thank you @Apollon77, like always 99.99% of the work is his.

https://github.com/bbindreiter/node-red-contrib-alexa-remote2-applestrudel/releases/tag/5.0.34

chx0003 commented 1 year ago

Alright, now with 5.0.34 it should work. Connect Type 1 is default if not set. image

I'm not getting events after updating. Let's see for how long. Thank you @Apollon77, like always 99.99% of the work is his.

https://github.com/bbindreiter/node-red-contrib-alexa-remote2-applestrudel/releases/tag/5.0.34

Updated node-red-contrib-alexa-remote2-applestrudel to v5.0.34, set the new parameter "Events Connect Type" to 1, restarted NodeRed and I'm receiving events fine, nice work thanks!

image image

Note: "On Audio Player State Change" is still not working.

ftsguy commented 1 year ago

Fixed for me as well

Apollon77 commented 1 year ago

@bbindreiter Check the logs - if your push connection is "reconnecting" all the time then you got a block on amazon side. In fact you can only fix that by killing all infos including device ids and such and do a complete new cookie process as "new device".

GianZambo commented 1 year ago

@Apollon77 , @bbindreiter Thanks for the work, thank you very much .....

raceconditions commented 1 year ago

@Apollon77 @bbindreiter Also have been dealing with this for weeks, poking around, to no avail. Just found this thread 20 minutes ago.

Upgraded to 5.0.34, restarted node-red HA service, and I am up and running! Will report back if I find any additional strange behavior or issues.

Thank you so much for the support - many of us use this Alexa integration every single day so very appreciative of your effort. As a note, my smarthome is not built around the Alexa API, but it is a nice additional convenience layer on top of the HA stack. To your point, maybe time to think about the virtual lightbulb workaround if this integration continues to be shaky.

chx0003 commented 1 year ago

I'm sorry to report that (at least in my case) this is once again not working :(

josue1988 commented 1 year ago

How is it possible to use the alexa device user? In the amazon app I do have 2 users when you call alexa, but in the debug my name always appears and not my wife's, isn't this possible?

quadhammer commented 1 year ago

How is it possible to use the alexa device user? In the amazon app I do have 2 users when you call alexa, but in the debug my name always appears and not my wife's, isn't this possible?

I use 2 different accounts, which both fire with their respective names. If you can't use 2 users on the same account, this may be a workaround...

@Apollon77 , @bbindreiter Thank you so much! :) I use this every day, and it makes a big difference when it goes down.

Apollon77 commented 1 year ago

@josue1988 you mean for voice actions in summary or what exactly?

s1nbad commented 1 year ago

Sorry to jump in on this thread

Obviously pleased that Remote2 is up and running but I think it time to look at alternative approaches and would like to promote some discussion on the Node Red Forum - really appreciate anyones comments and sharing of ideas

https://discourse.nodered.org/t/alternative-approaches-to-remote2/80532

czacherl commented 1 year ago

Thanks so much @bbindreiter it works perfectly on my side again. Thanks for all your work.

Babelbernd commented 1 year ago

I dont know why but even with the newest version (node-red-contrib-alexa-remote2-applestrudel 5.0.34) my node red is not listening. Is it only here or is anybody else having problems?

Cjkeenan commented 1 year ago

Is it broken for anyone again? I have tried both v1 and v2 and neither seem to be receiving events.

quadhammer commented 1 year ago

Is it broken for anyone again? I have tried both v1 and v2 and neither seem to be receiving events.

No, it's working for me still with applestrudel 5.0.34

Babelbernd commented 1 year ago

Is it broken for anyone again? I have tried both v1 and v2 and neither seem to be receiving events.

Same here, Alexa is not listening at all... at least not in node red 😅

bdydrp commented 1 year ago

Has stopped working for me too! Australian account

quadhammer commented 1 year ago

Mine has stopped working as well. It must have just taken a while to catch up, or to propagate to all the different echoes around the world

bwims commented 1 year ago

Mine is also not working. I wonder how commercial device developers cope with the rapidly changing API ?

niwre2019 commented 1 year ago

Same here, German account.