node-red-contrib-google-home-notify icon indicating copy to clipboard operation
node-red-contrib-google-home-notify copied to clipboard

Get Key Failed From Google

Open juulg opened this issue 6 years ago • 65 comments

Running Node-red on two PC's. "home notify" Node worked well for a few hours then stopped and showed the "get key failed from google" message under the "google home notify" icon. All other functions of Google Home appear to be working - cast - broadcast etc.

juulg avatar Sep 19 '18 14:09 juulg

I'm also experiencing the "get key failed from google" error. It's been working well for weeks.

lostage avatar Sep 19 '18 16:09 lostage

What did you do if anything to get it going again ?

juulg avatar Sep 19 '18 20:09 juulg

Unfortunately last I checked it was still not working. My initial guess is there's an API key that needs to be renewed or something.

lostage avatar Sep 19 '18 23:09 lostage

Getting this as well.

heytcass avatar Sep 20 '18 01:09 heytcass

I am going to try and fix this today. Might be the API key being too old.

On Thu, Sep 20, 2018, 03:58 heytcass [email protected] wrote:

Getting this as well.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nabbl/node-red-contrib-google-home-notify/issues/25#issuecomment-423014550, or mute the thread https://github.com/notifications/unsubscribe-auth/AEdmg4EbKw3DlFCygAAYWtOWRT1pMGP5ks5ucvZbgaJpZM4WwQKr .

nabbl avatar Sep 20 '18 05:09 nabbl

After analyzing the problem a bit... this is definitely a problem from one of the underlying libs I use:

https://github.com/zlargon/google-tts/blob/master/lib/key.js

This can also happen when you are using the API too much...

nabbl avatar Sep 20 '18 11:09 nabbl

I'm also getting this error message. I found if I restart node-red that the error goes away, if I can connect to Google and the home device (I have 2 home devices).

linuxha avatar Sep 20 '18 19:09 linuxha

If I restart Node Red the error does go away, but as soon as a flow calls it the error comes back.

lostage avatar Sep 20 '18 20:09 lostage

I'm also getting this error message :-( error

kodarn avatar Sep 21 '18 05:09 kodarn

I have to amend my observation, seems mine worked for a few hours but the message has returned.

linuxha avatar Sep 21 '18 11:09 linuxha

This issue is triggered when you want to send a message though the Google Home Notify. In case you restart or redeploy your project, the error will reset and wait until it's being triggered again. Due to this error, the Google Home won't trigger. (This Error also occurs on the Home-Assistant tts)

@nabbl Do you have (status) updates for us or a workaround for this problem?

(Love this function to have my google home wake me up in the morning 😅 thanks)

(And what is much? much of the community or personally?)

This can also happen when you are using the API too much...

imichaelv avatar Sep 21 '18 12:09 imichaelv

Any solution in sight to this problem? Really good function, miss it a lot! ;o) using it from Node-Red for reminders for my wife to take her medicine!

PeAnSwe avatar Sep 21 '18 13:09 PeAnSwe

Yeh, I was here to report this, now I see that is a common problem, any news on this?

Thank You

soloam avatar Sep 21 '18 17:09 soloam

Guess you're right, having the same problem from Hassio and media_player.googlehome

PeAnSwe avatar Sep 21 '18 17:09 PeAnSwe

Same problem here

gijsje avatar Sep 21 '18 22:09 gijsje

Must be hassio related because together with node-red issue my media_player tts stopped working too. I see tts/google_say service launched but no sound comes from the speaker.

xraysight avatar Sep 22 '18 10:09 xraysight

I guess it's Google TTS related since nor Hassio or Node-red is working, but I can be wrong.

peter@mobilen


From: eventhorizonbreaker [email protected] Sent: Saturday, September 22, 2018 12:29:06 PM To: nabbl/node-red-contrib-google-home-notify Cc: PeAnSwe; Comment Subject: Re: [nabbl/node-red-contrib-google-home-notify] Get Key Failed From Google (#25)

Must be hassio related because together with node-red issue my media_player tts stopped working too. I see tts/google_say service launched but no sound comes from the speaker.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnabbl%2Fnode-red-contrib-google-home-notify%2Fissues%2F25%23issuecomment-423733655&data=02%7C01%7C%7Cf29cf69348514c72d28208d620763a25%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636732089480336816&sdata=aLn3oHnl0A4zfAMp2iEuipuMHPTkOmnRpk7z0AWbihk%3D&reserved=0, or mute the threadhttps://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAV27b6gPbvDXbu_8_g4AZjQ9CRpSxVo0ks5udhDygaJpZM4WwQKr&data=02%7C01%7C%7Cf29cf69348514c72d28208d620763a25%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636732089480336816&sdata=MmcnjbgyTWAB7F2elj3sjT3XTcGXWsM5tHnCPIBPHIQ%3D&reserved=0.

PeAnSwe avatar Sep 22 '18 11:09 PeAnSwe

Same problem here

robisette avatar Sep 22 '18 13:09 robisette

Confirms the same problem for me as well.

urbaxe avatar Sep 23 '18 13:09 urbaxe

The issue is called by google changing their tts libraries. I'm not a github expert, but you can fix this by the following commands for a node-red install: cd ~/.node-red/node_modules/google-home-notify

edit package.json and change the dependency on 'google-tts-api' from '0.0.2-alpha1' to '0.0.3', so it reads:

"dependencies": { "bluebird": "3.5.1", "castv2-client": "^1.2.0", "google-tts-api": "0.0.3" }

Update the dependency npm update

Restart node-red node-red-stop node-red-start

Achronite avatar Sep 23 '18 14:09 Achronite

Thanks Achronite. It works for me again :-)

urbaxe avatar Sep 23 '18 14:09 urbaxe

Works perfect again! Thank you!

PeAnSwe avatar Sep 23 '18 15:09 PeAnSwe

I can also confirm that this fix works!


Process:

0 progress

Before Edit:

1 beforeedit

After Edit:

2 afteredit

After restart:

3 success

Good work @Achronite !

kodarn avatar Sep 23 '18 15:09 kodarn

That works perfect for me also. Thanks

linuxha avatar Sep 23 '18 15:09 linuxha

Let's hope someone from the Hassio-developers find your solution! Great work @Achronite

PeAnSwe avatar Sep 23 '18 16:09 PeAnSwe

Hassio 0.78.3 resolved tts problem in itself and tts works. This did not help node-red though. Too bad I can't adjust the files as Achronite on hassio (the files are not visible).

xraysight avatar Sep 23 '18 16:09 xraysight

Struggled a bit with making the changes on Windows but followed Achronite’s description using Powershell and all is now well again ! Great job ! Thank you.

juulg avatar Sep 23 '18 21:09 juulg

Hmm, it's not quite working correctly. I have 2 Google home devices. The first one works fine. the second gets:

Sep 23 17:21:39 mozart node-red: 23 Sep 17:21:39 - [info] [debug:GoogleHomeStatus]
Sep 23 17:21:39 mozart node-red: { status:
Sep 23 17:21:39 mozart node-red:    { text: 'connect ECONNREFUSED 192.168.0.4:8009',
Sep 23 17:21:39 mozart node-red:      source:
Sep 23 17:21:39 mozart node-red:       { id: 'f1481ad6.c00988',
Sep 23 17:21:39 mozart node-red:         type: 'googlehome-notify',
Sep 23 17:21:39 mozart node-red:         name: 'B Google Home Mini' } },
Sep 23 17:21:39 mozart node-red:   _msgid: '5ea87c69.902ad4' }

I've tried all sorts of things but it's always the second device.

linuxha avatar Sep 23 '18 21:09 linuxha

Oops, the mini changed it's dhcp address (I messed up the mac in the dhcp file). My bad. Both work now.

linuxha avatar Sep 23 '18 22:09 linuxha

Great node, but the homeassistant add-on relies on this package being updated for a fix to roll through and it looks like the maintainer may not be available to jump on the issues.

I 've switched to using the Call Service node in the Hassio Node Red addon and using Domain: tts and Service: google_say to make announcements on my Google Home. The key thing I learned was that in order to have the message passed on to the speaker I need to use an Edit Function node to have the msg.payload contain the necessary attributes. That way you can leave the Data field blank in the Call Service node. For example the code in the Edit Function node for my SpeedTest flow is: msg.payload = { "data":{"entity_id":"media_player.living_room_speaker","message":"The internet speed is "+ msg.payload.speeds.download +"megabits per second"} } return msg;

blackshoals avatar Sep 26 '18 01:09 blackshoals