andrei-tatar / nora-service

NORA backend service
https://node-red-google-home.herokuapp.com
34 stars 30 forks source link

Nora Home not getting added to Google Home #35

Open rockstar2020 opened 3 years ago

rockstar2020 commented 3 years ago

Hi @andrei-tatar, Thanks for your great work. I've completed all the setup and were able to go to google home and search for my test app. The issue is that I can successfully login to my app's within Google Home but after confirming that I allow Google to access my account nothing happens. Can you direct me towards a direction that I could troubleshoot the issue? Below is the final log I see on Heroku's app: 2020-09-29T22:12:21.243191+00:00 heroku[router]: at=info method=POST path="/token" host=test-nora.herokuapp.com request_id=87giudb2397d3-3177-47d0-2ed7gd7gd fwd="108.177.70.127" dyno=web.1 connect=1ms service=3ms status=404 bytes=421 protocol=https

I don't know why the status is 404! Also no idea where that forward IP address is coming from.

Many thanks in advance Cheers

Raul-7-7 commented 3 years ago

@rockstar2020 I am trying to set this up and running into problem. Question, did Node-Red add your device? what did you change? appreciate the help.

jerom87 commented 3 years ago

Hi, i have the same problem with my test app. After a successfully login with Google Home the account does not appear.

2021-01-18T11:41:44.415946+00:00 heroku[router]: at=info method=POST path="/token" host=xxx.herokuapp.com request_id=a1d1006a-8a99-4153-b87a-2e625c2150ca fwd="108.177.76.39" dyno=web.1 connect=1ms service=2ms status=404 bytes=421 protocol=https

@andrei-tatar thx for your great work

jerom87 commented 3 years ago

I found my mistakes... now it´s running. I checked almost everything again and then I found a copy paste error but step by step...

  1. on Firebase I had to add my URI https://XXXXXXXXX.herokuapp.com under authorized domains (Navigate to Develop - Authentication - Users - Set up sign-in method - just scroll down a bit)

  2. on Google Api Console under OAuth 2.0-Client-IDs i had to add this URI https://XXXXXXXXX.firebaseapp.com/__/auth/handler to my webclient under authorized redirect URIs

  3. on Google Actions under develop - account linking i used https://XXXXXXXXX.herokuapp.com/token instead of https://XXXXXXXXX.herokuapp.com/OAUTH/token

  4. changed nora-service/src/config.ts line 95 to connectionString: getCfg('DATABASE_URL')

    changed nora-service/src/services/user.repository.ts line 62-68 to await service.query('ALTER TABLE appuser ADD COLUMN noderedversion integer DEFAULT 1'); await service.query('ALTER TABLE appuser ADD COLUMN refreshToken integer DEFAULT 1');

now i could log in without any errors in heroku´s log nor https://console.cloud.google.com/logs/ and in when i log in with my browser i got a token but i could not see the account in my Google Home

  1. the last step concerns node red palette node-red-contrib-nora that runs on my raspi i had to adjust nora.ts on my system the original file is node-red-contrib-nora/node-red-contrib-nora/src/nora.ts line 96 https://node-red-google-home-develop.herokuapp.com to https://XXXXXXXXX.herokuapp.com
Raul-7-7 commented 3 years ago

Thanks @jerom87 , so you have it working now with the above changed? I am going to try this later, and if all good will create a document with detail. (will make sure to credit you). Thanks