node-red-contrib-alexa-remote-cakebaked icon indicating copy to clipboard operation
node-red-contrib-alexa-remote-cakebaked copied to clipboard

Alexa wont speak

Open bdydrp opened this issue 4 years ago • 18 comments

Just updated to this version, and now have a working cookie/init flow!

Tho now she wont speak!! I get a success message under the device node, but in the debug panel i get msg.payload Null image image

Any ideas??

bdydrp avatar Feb 16 '21 04:02 bdydrp

this works for me (and there you have some examples of effects) https://pastebin.com/LZR5XFJB

this works for me (and there you have some examples of effects) [{"id":"a11664e8.930408","type":"template","z":"454fd799.035f58","name":"voces","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" \nBuenos días!\nBuenos días!\n¡Buenos días!\n","output":"str","x":240,"y":520,"wires":[["f243ec1f.259d8"]]},{"id":"f243ec1f.259d8","type":"alexa-remote-routine","z":"454fd799.035f58","name":"","account":"8759773a.02551","routineNode":{"type":"speak","payload":{"type":"ssml","text":{"type":"msg","value":"payload"},"devices":["G2A14Q04021404B5"]}},"x":480,"y":580,"wires":[[]]},{"id":"fbbb53b2.a4896","type":"inject","z":"454fd799.035f58","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":120,"y":520,"wires":[["a11664e8.930408"]]},{"id":"3f8db0cb.01c82","type":"template","z":"454fd799.035f58","name":"Effects","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\nThis is louder.\nThis is quieter.\nThis is slow.\nThis is fast.\nThis is deep.\nThis is high.\n<amazon:effect name="whispered">This is whispering.</amazon:effect>\n","output":"str","x":240,"y":560,"wires":[["f243ec1f.259d8"]]},{"id":"28b28432.4092cc","type":"template","z":"454fd799.035f58","name":"Time and Date","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n Time 08:30.\n Duration 12'3".\n Date 28/02/2020.\n","output":"str","x":270,"y":600,"wires":[["f243ec1f.259d8"]]},{"id":"8759773a.02551","type":"alexa-remote-account","name":"alexa","authMethod":"proxy","proxyOwnIp":"192.168.0.50","proxyPort":"3455","cookieFile":"cookie","refreshInterval":"14","alexaServiceHost":"alexa.amazon.es","amazonPage":"amazon.es","acceptLanguage":"es-ES","userAgent":"","useWsMqtt":"on","autoInit":"on"}]

Cant import your flow! I have tried re initialising, rebooting Nothing makes her talk. Either standard speak or SSML. None works

pastebin'ed :)

elchanly avatar Feb 16 '21 21:02 elchanly

I have the same issue. Once NodeRed is rebooted Alexa starts talking to me, but after one or two days she refuses to so again. Any ideas?

MarkusBe avatar Feb 17 '21 22:02 MarkusBe

this works for me (and there you have some examples of effects)

[{"id":"a11664e8.930408","type":"template","z":"454fd799.035f58","name":"voces","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":" \nBuenos días!\nBuenos días!\n¡Buenos días!\n","output":"str","x":240,"y":520,"wires":[["f243ec1f.259d8"]]},{"id":"f243ec1f.259d8","type":"alexa-remote-routine","z":"454fd799.035f58","name":"","account":"8759773a.02551","routineNode":{"type":"speak","payload":{"type":"ssml","text":{"type":"msg","value":"payload"},"devices":["G2A14Q04021404B5"]}},"x":480,"y":580,"wires":[[]]},{"id":"fbbb53b2.a4896","type":"inject","z":"454fd799.035f58","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":120,"y":520,"wires":[["a11664e8.930408"]]},{"id":"3f8db0cb.01c82","type":"template","z":"454fd799.035f58","name":"Effects","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\nThis is louder.\nThis is quieter.\nThis is slow.\nThis is fast.\nThis is deep.\nThis is high.\n<amazon:effect name="whispered">This is whispering.</amazon:effect>\n","output":"str","x":240,"y":560,"wires":[["f243ec1f.259d8"]]},{"id":"28b28432.4092cc","type":"template","z":"454fd799.035f58","name":"Time and Date","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"\n Time 08:30.\n Duration 12'3".\n Date 28/02/2020.\n","output":"str","x":270,"y":600,"wires":[["f243ec1f.259d8"]]},{"id":"8759773a.02551","type":"alexa-remote-account","name":"alexa","authMethod":"proxy","proxyOwnIp":"192.168.0.50","proxyPort":"3455","cookieFile":"cookie","refreshInterval":"14","alexaServiceHost":"alexa.amazon.es","amazonPage":"amazon.es","acceptLanguage":"es-ES","userAgent":"","useWsMqtt":"on","autoInit":"on"}]

Cant import your flow! I have tried re initialising, rebooting Nothing makes her talk. Either standard speak or SSML. None works

bdydrp avatar Feb 18 '21 03:02 bdydrp

I'm experiencing the same issue

I have the same issue. Once NodeRed is rebooted Alexa starts talking to me, but after one or two days she refuses to so again. Any ideas?

Are you from Spain?

Everything works fine except from the routine node, It goes down for some reason. When I reboot or reinitialise with the initialise node, the routine node comes back to normal.

Hopefully @cakebaked with be able to help us

obaldius avatar Feb 18 '21 18:02 obaldius

if it works again after rebooting it seems that this can work: this flow comes from someone in the original remote2. It tests if alexa account is logged in and if not, logs it back. i've imported it in my system and no problems since. https://pastebin.com/qKs9kaTq BTW, i'm from spain :D

All credits to @driagi 👌 https://github.com/driagi/node-red-contrib-alexa-remote2

elchanly avatar Feb 18 '21 21:02 elchanly

BTW, i'm from spain :D

:D. I only need to replace your account with mine in the two Alexa nodes I understand, right? Thanks a lot, I'll give it a go.

I asked whether you're from Spain because I've been talking with an american friend and he's not come across any issue whatsoever. Perhaps Amazon are changing things in the Spanish API.

obaldius avatar Feb 18 '21 22:02 obaldius

They are touching things, it's clear. I dont know if Spain only... ;D Yep, you only have to copy paste those nodes in a flow and link them to your account. Hope it helps, I think they will!!!

elchanly avatar Feb 18 '21 22:02 elchanly

Not just spanish accounts.... Australian accounts also!! If i log in using my American amazon account i have no issues, but if i use my Australian amazon account i get "unexpected end to JSON" error!!

bdydrp avatar Feb 19 '21 06:02 bdydrp

Hope it helps, I think they will!!!

I believe it's working so far. Many thanks, it'll do it for now.

obaldius avatar Feb 20 '21 07:02 obaldius

I've been having the same issue...after a day or so no TTS via Alexa - but authorization does not seem to be the issue. I tried out elchanly solution - I'll try to remember to comment in a few days (if I'm still having issues hi probability of that). Thanks to our Spain friend - now I need to try to convert some of of his entities names in his flow to english - lol...

4romany avatar Feb 23 '21 02:02 4romany

Now i have the issue of a cookie not saving. Once I enter my ip:port in the browser at the Amazon site. Everything works. That is until I redeploy my flows for other work and then the nodes stop working again until I enter ip:port in the browser

On Tue, 23 Feb. 2021, 1:54 pm 4romany, [email protected] wrote:

I've been having the same issue...after a day or so no TTS via Alexa - but authorization does not seem to be the issue. I tried out elchanly solution

  • I'll try to remember to comment in a few days (if I'm still having issues hi probability of that). Thanks to our Spain friend - now I need to try to convert some of of his entities names in his flow to english - lol...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cakebake/node-red-contrib-alexa-remote-cakebaked/issues/3#issuecomment-783841123, or unsubscribe https://github.com/notifications/unsubscribe-auth/APFF2ZGT6EZAHJ3NLDCRNH3TAMKGNANCNFSM4XVXJZTQ .

bdydrp avatar Feb 23 '21 05:02 bdydrp

Seems I am having the same issue as others with the cookie not saving. When trying to authenticate I get a cookie success message but the node just shows "no crsf found". When I check the cookie location it seems no cookie has been stored. I have followed the instructions to delete the old node-red-contrib-alexa-remote2 and replace it with node-red-contrib-alexa-cakebaked 4.0.2 including deleting all my old flows. I am now at a loss. Seems we might have to wait for someone with the necessary programing skills to rewrite.

Many thanks and kudos to those who have tried hard to keep this project alive (@cakebaked) and to @bwims for drawing my attention to the cakebaked version.

Purclewan avatar Feb 23 '21 14:02 Purclewan

Purclewan, you might want to look at the flow that elchanly posted in this thread as a way to perhaps get around this issue. I'm at 24 hours so far without any issues...see what tomorrow looks like...

4romany avatar Feb 24 '21 02:02 4romany

Purclewan, you might want to look at the flow that elchanly posted in this thread as a way to perhaps get around this issue. I'm at 24 hours so far without any issues...see what tomorrow looks like...

@4romany Thanks for that, sadly I have allready tried that flow with exactly the same result. Does seem to be a problem with saving the auth cookie. Strangly, I have tried various solutions on various Node-Red installations I have on several windows PC's and get the same results everywere. However, on one of my Raspberry Pi's it works fine BUT this Pi still had an old auth cookie so I suspect that is why it still works. On all the windows machines I cleared everything down and refreshed so don't have any auth cookies.

Purclewan avatar Feb 24 '21 10:02 Purclewan

Given that some people are working fine and others are not, and that at least one person can work with their US but not AU accounts, it seems to me that this is a question of Amazon recklessly fiddling about with their code and making us all beta testers.

My experience is that I can login to any Amazon region with one set of credentials.

Therefore, if it looks like the UK (where I am) and the US also work, I would suggest those having problems try to use their credentials in the nearest of one of those regions and see if that clears it up for them.

Amazon are notorious for introducing new facilities on a staggered basis. It took an entire year after the US got custom Alexa routines before the UK got them, for example.

bwims avatar Feb 25 '21 15:02 bwims

I'm in the US - on the 3rd day of using the "keep alive" flow that elchanly suggested. So far my TTS appear to be working w/o issues - knock on wood. If I see the problem come back I'll update this thread...

4romany avatar Feb 25 '21 19:02 4romany

Unfortunately I'm in the strange position of having one working system on a Raspberry Pi that uses an old auth cookie file and three windows systems that won't work at all.

The major difference (apart from the operating system) is the cookie file.  On the Pi, I upgraded to the cakebaked version but kept all the external cookies intact.  It works, at least for now and does seem to revalidate the auth cookie.  However, on the Windows machines I cleared everything from two of them including cookies and on the third I did a completely fresh Node-Red/cakebake install.  Interestingly, on the Windows machine when I try to initialise the nodes everything seems to work until final initialisation when I get various errors and the auth cookie can't be found or I get "No CSRF found".  I believe the issue has something to do with lack of a cookie auth file and a missing Amazon CSRF token.  I am presently trying to understand how the auth cookie is built and what data is extracted from Amazon and why it now seems to fail.  Any help or suggestions would be welcome.  Hope this all makes some sense.  

On 25/02/2021 19:11, 4romany wrote:

I'm in the US - on the 3rd day of using the "keep alive" flow that elchanly suggested. So far my TTS appear to be working w/o issues - knock on wood. If I see the problem come back I'll update this thread...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cakebake/node-red-contrib-alexa-remote-cakebaked/issues/3#issuecomment-786136071, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBB2KLC7QIVSZDP5RF24GDTA2OG5ANCNFSM4XVXJZTQ.

Purclewan avatar Feb 26 '21 22:02 Purclewan

if it works again after rebooting it seems that this can work: this flow comes from someone in the original remote2. It tests if alexa account is logged in and if not, logs it back. i've imported it in my system and no problems since. https://pastebin.com/qKs9kaTq BTW, i'm from spain :D

All credits to @driagi 👌 https://github.com/driagi/node-red-contrib-alexa-remote2

Thanks for the flow!

I've get an error message from the initialise function node:

"SyntaxError: await is only valid in async function"

In the function node itself the following line is marked with a yellow triangle:

await new Promise(resolve => setTimeout(resolve, timeMs));

Does anyone has a clue what the problem is?

Neelex99 avatar Mar 04 '21 21:03 Neelex99