586837r / node-red-contrib-alexa-remote2

MIT License
87 stars 72 forks source link

Speak and other commands stop working after a few hours #40

Open BassTeQ opened 4 years ago

BassTeQ commented 4 years ago

I've noticed when I do a deploy it's working as expected, then after a few hours I start seeing this message, and the echo devices no longer speak the messages?

Alexa-Remote: Response: No body

BassTeQ commented 4 years ago

anyone?

startrk1995 commented 4 years ago

Same here. It works for a bit. Check auth shows true. I cannot pull any properties from the echo device. All are null. If I reauth, nothing still. It is only when I reboot the echo and reauth does the properties come back... For a while.

startrk1995 commented 4 years ago

Get Echo player info show null. {"payload":{"hint":null,"infoText":null,"isPlayingInLemur":false,"lemurVolume":null,"lyrics":null,"mainArt":null,"mediaId":null,"miniArt":null,"miniInfoText":null,"playbackSource":null,"playingInLemurId":null,"progress":null,"provider":null,"quality":null,"queueId":null,"state":null,"template":null,"transport":null,"upNextItems":null,"volume":null},"_msgid":"950ecbae.ac30c8"} Authorization shows it is fine. {"payload":true,"_msgid":"7bc29401.e8863c"} Get Device shows the correct serial. {"payload":{"accountName":"Derry Basement Dot","appDeviceList":[],"capabilities":["SUPPORTS_CONNECTED_HOME","PAIR_BT_SINK","FLASH_BRIEFING","PAIR_BT_SOURCE","SOUND_SETTINGS","SLEEP","CHANGE_NAME","KINDLE_BOOKS","DS_VOLUME_SETTING","SALMON","MUSIC_SKILL","DREAM_TRAINING","MICROPHONE","AUDIBLE","LEMUR_ALPHA","AMAZON_MUSIC","SET_LOCALE","VOLUME_SETTING","I_HEART_RADIO","PAIR_REMOTE","PANDORA","FAR_FIELD_WAKE_WORD","ASCENDING_ALARM_VOLUME","TAHOE_BYOD","AUDIO_PLAYER","GADGETS","CUSTOM_ALARM_TONE","DEREGISTER_FACTORY_RESET","GOLDFISH","SUPPORT_CALENDAR_ALERT","PERSISTENT_CONNECTION","VOICE_TRAINING","REMINDERS","TUNE_IN","EARCONS","ALLOW_LOG_UPLOAD","TIMERS_AND_ALARMS","UPDATE_WIFI","REQUIRES_OOBE_FOR_SETUP","POPTART","SUPPORTS_CONNECTED_HOME_ALL","SUPPORTS_SOFTWARE_VERSION","ACTIVE_AFTER_FRO","DEREGISTER_DEVICE","TIMERS_ALARMS_NOTIFICATIONS_VOLUME"],"charging":null,"clusterMembers":[],"deviceAccountId":"A3Hxxxxxxxxxxxxxx","deviceFamily":"ECHO","deviceOwnerCustomerId":"A1VGxxxxxxxxxxxxxx","deviceType":"A3S5BH2HU6VAYF","deviceTypeFriendlyName":null,"essid":null,"language":null,"macAddress":null,"online":true,"parentClusters":[],"postalCode":null,"registrationId":null,"remainingBatteryLevel":null,"serialNumber":"G090xxxxxxxxxC8Q","softwareVersion":"641575220"},"_msgid":"19b49a43.15fd26"}

Any ideas?

startrk1995 commented 4 years ago

When I update the auth I also get this.

TypeError: failed to initialise smarthome colors: "Cannot read property 'parameters' of undefined" at AlexaRemoteExt.initSmarthomeColorsExt (/config/node-red/node_modules/node-red-contrib-alexa-remote2/lib/alexa-remote-ext.js:307:35) at process._tickCallback (internal/process/next_tick.js:68:7)

BassTeQ commented 4 years ago

@586837r , are you able to investigate, appears to be a bug?

Thanks

586837r commented 4 years ago

Sorry for my absence!

@BassTeQ I also sometimes get "successful" initialisation but it doesn't speak. I don't know what causes it. Triggering a new initialisation fixes that though. Can you set the refresh interval to every few hours to fix this? E.g. you can set it to 0.125 days for it to refresh every 3 hours.

@startrk1995 Amazon clears the echo player and media info a few hours after activity. You can only rely on that data if you are currently playing music. The "failed to initialise smarthome colors" is a warning. You won't be able to set the color of smarthome lamps. If you don't have any that support colors then everything is a-ok.

BassTeQ commented 4 years ago

@586837r No problem, thanks for the suggestion, will try it and see how it goes.

ThomasPoett commented 4 years ago

Same/ similar issue: Speaking incl. Volume error: "unexpected response while getting volume: "{"message":"Music metadata was not found for reference id:

Starting TuneIn: Radio start msg : string[7] "no body"

Until approx 10+ days ago, re-initializing help. but now the behavior stays with this issue. Testing without Volume make Alexa speak. Version: 3.2.2

BassTeQ commented 4 years ago

Still having the problem, changed the refresh to 0.125, worked ok for a few hours then stops :(

586837r commented 4 years ago

@ThomasPoett Speak+Volume only works reliably if the echo was recently active playing music. I have to make that clear in the node, sorry about that.

If you manually initialise with an Alexa Init node with the Initialise option (without entering your pass/user again) can you get a successful initialisation so that speak works again? Maybe refresh is broken, and it should just call initialise...

586837r commented 4 years ago

Version 3.2.3 does refresh just like initialisation. Let me know if that changes anything.

BassTeQ commented 4 years ago

@586837r, could you build a mechanism so if the speak + volume method fails, it falls back to the speak only?

586837r commented 4 years ago

Oh yeah sure, that's a good idea.

BassTeQ commented 4 years ago

Thanks!

586837r commented 4 years ago

In 3.2.5 speak + volume now falls back to speak (per device)

BassTeQ commented 4 years ago

In 3.2.5 speak + volume now falls back to speak (per device)

Excellent, thanks for the quick turnaround, will test it.

BassTeQ commented 4 years ago

Seems to be working again, however it does just stop after a period of time

BassTeQ commented 4 years ago

Update, its been running ok for 3 days now, finigers crossed

shodge12 commented 4 years ago

OK,

I've been using this for awhile. If 'Auto init' is set in the account, it stops working (even when setting refresh at 0.125 days) after about a day. It does this with no real indication of a problem but no communication. Changing the init to turn off 'Auto Init' and instead using a 'Initialize' node and using a input node to send packets every 6 hrs. This corrects the problem for about a week, when the same failure mode occurs - no errors...

In all cases - a full 'Deploy with restart nodes' fixes the problem. I have not had time to start a log trace and with the Holidays coming up - may not have time until the first of the year. However, after that I am committed to helping solve this in any way I can.

Thanks, -Stan

kkellner commented 4 years ago

I'm having the same issue that Alex is able to speak something for a day or two but then stops, but no error is shown on node when the the account settings have "auto init" on. A redeploy of node red always fixes it. I'm going to try @shodge12 workaround described above.

@shodge12 on your above workaround of calling "alexa-remote-init" every 6 hours, was the option in the "alexa-remote-init" node set to "initialise"? Is this workaround still working for you?

This is what I have:

image

image

shodge12 commented 4 years ago

kkellenr,

Yes, this is exactly what I am using and it seems to work.

-Stan

scott-coates commented 4 years ago

@shodge12 Thanks for the suggestion:

Changing the init to turn off 'Auto Init' and instead using a 'Initialize' node and using a input node to send packets every 6 hrs. This corrects the problem for about a week, when the same failure mode occurs - no errors...

Same thing happened to me, however, and the problem resurfaced after a few days.

I have not had time to start a log trace

Have you found anything in the logs? Or what would you look for?

I am seeing success logs, but I'm also seeing errors too:

20 May 00:57:30 - [info] [alexa-remote-account:161d842a.5122bc] intialising with the PROXY method and saved data...
20 May 03:01:55 - [error] [alexa-remote-echo:f19eb920.2264c8] invalid input: "{"option":"get","value":{"what":"playerInfo"}}"
shodge12 commented 4 years ago

All I can say is that it is now working for me without fail. The only change I made (not sure it really helped) is after the six hours I init 2x (5 minutes apart). I use a input event set to 6hrs to feed the init AND a 5 minute delay which also feeds the init. I have no idea if it really helps or not.

-Stan

scott-coates commented 4 years ago

Thanks, Stan, I'll give that a shot!