google-home / smart-home-nodejs

A sample of the Smart Home device control APIs in Actions on Google
Apache License 2.0
892 stars 291 forks source link

Error 404 with status report # 519 #519

Closed luan-nvg closed 4 years ago

luan-nvg commented 4 years ago

agentUserId: '5f5117a65ce867241bca0fcf' onSync and reportState

(node:26448) UnhandledPromiseRejectionWarning: { "error": { "code": 404, "message": "Requested entity was not found.", "status": "NOT_FOUND" } }

Fleker commented 4 years ago

Have you confirmed that the device IDs are correctly stored in HomeGraph before running reportState?

luan-nvg commented 4 years ago

Would HomeGraph be the "smart-home-dashboard-0.1.1" repository that I should install on my server? if so, i installed the command that existed in the README, it gives a fatal error, so I try with npm start and the successful service, however, when executing any fatal browser error.

10% building modules 0/1 modules 1 active ...-dashboard/src/main/ngapp/src/main 10% building modules 1/2 modules 1 active ...board/src/main/ngapp/src/polyfills 10% building modules 2/3 modules 1 active ...shboard/src/main/ngapp/src/styles.Date: 2020-10-22T20:56:18.333Z

Hash: 20d2a764ec738bc8abf6 Time: 45359ms chunk {0} polyfills.b8bb642eba73d16a2fc5.bundle.js (polyfills) 63.5 kB [initial] [rendered] chunk {1} main.fc6b0ed3210fa61fbbfa.bundle.js (main) 442 kB [initial] [rendered] chunk {2} styles.b7ae761de9f444e08063.bundle.css (styles) 46.8 kB [initial] [rendered] chunk {3} inline.318b50c57b4eba3d437b.bundle.js (inline) 796 bytes [entry] [rendered]

https://github.com/actions-on-google/smart-home-dashboard/releases https://developers.google.com/assistant/smarthome/develop/report-state#deploy-report-state-dashboard

Em qui., 22 de out. de 2020 às 13:54, Nick notifications@github.com escreveu:

Have you confirmed that the device IDs are correctly stored in HomeGraph before running reportState?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/actions-on-google/smart-home-nodejs/issues/519#issuecomment-714626335, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFVFJC2J4KLBPXZEHBUKELSMBPVLANCNFSM4S2NMLAQ .

Fleker commented 4 years ago

That is a software package that can use the Home Graph APIs, but you should verify that the report state uses the same device IDs that are in your SYNC response.

andreask1 commented 4 years ago

I also get this error. When I change the status of a device in the Google Home app, QUERY and EXECUTE work fine, but reporting the state back fails (even if the device IDs match). I set up a device using the smart-home-frontend package.

luan-nvg commented 4 years ago

That is a software package that can use the Home Graph APIs, but you should verify that the report state uses the same device IDs that are in your SYNC response.

I solved the problem, I had to raise an application on the smart-home-dashboard part, only then I got access to https://smarthome-test-suite.appspot.com/

luan-nvg commented 4 years ago

Eu também recebo esse erro. Quando eu altero o status de um dispositivo no app Google Home, QUERY e EXECUTE funcionam bem, mas o relato do estado falha (mesmo se os IDs do dispositivo corresponderem). Eu configurei um dispositivo usando o pacote smart-home-frontend.

  • "intent": "action.devices. QUERY " -> "devices": {" 1mqv ": {"on": true, "online": true, "status": " SUCCESS "}}
  • "intent": "action.devices. EXECUTE " -> "devices": [{"id": " 1mqv "}] -> OK
  • Relatório de carga útil de estado para 1mqv {online: true, on: false} -> " error ": {"code": 404, "message": "Requested entity was not found.", "Status": "NOT_FOUND"}

here you have to use a timout if your application is in node js

var timer = 20000
    setTimeout(() => {
        console.log('reportState' + timer);
        app.reportState(response_state);
    }, timer);