ioBroker.netatmo icon indicating copy to clipboard operation
ioBroker.netatmo copied to clipboard

Cant connect to API

Open nob0dy80 opened this issue 11 months ago • 2 comments

Describe the bug
After my SSD crashed i had to reinstall iobroker completely (shame on me for not having a backup), everything is working again, beside the netatmo adapter.

After entering ID and secret i get the following message:

netatmo.0 | 2024-03-17 12:37:34.374 | warn | API Error: Please Authenticate manually once using the Admin UI of this instance. netatmo.0 | 2024-03-17 12:37:34.374 | info | Authenticating with Netatmo using individual client-ID 622ccabd3d1f5417xxxxxxx

So i tried to authenticate manually and got this warning:

admin.0 | 2024-03-17 12:42:29.138 | warn | netatmo has an invalid jsonConfig: [{"instancePath":"/items/_authenticate","schemaPath":"#/definitions/sendToProps/additionalProperties","keyword":"additionalProperties","params":{"additionalProperty":"window"},"message":"must NOT have additional properties"}]

I can repeat this as often as i want. Of cause the secret and id are double checked and correct.

Expected behavior
Adapter should receive data after entering id and secret

Versions:

  • Adapter version: 3.1.0
  • JS-Controller version: 5.19
  • Node version: 18.19.1
  • Operating system: Debian Linux

nob0dy80 avatar Mar 17 '24 11:03 nob0dy80

Vielleicht lieber in die Community-Adapters überführen :-/

nob0dy80 avatar Mar 28 '24 17:03 nob0dy80

Habe seit heute nacht das gleiche Problem:

Nach dem Start des Adapters kommt:

2024-07-17 08:43:33.232 - debug: netatmo.0 (1879613) Redis Objects: Use Redis connection: 127.0.0.1:9001 2024-07-17 08:43:33.391 - debug: netatmo.0 (1879613) Objects client ready ... initialize now 2024-07-17 08:43:33.394 - debug: netatmo.0 (1879613) Objects create System PubSub Client 2024-07-17 08:43:33.396 - debug: netatmo.0 (1879613) Objects create User PubSub Client 2024-07-17 08:43:33.747 - debug: netatmo.0 (1879613) Objects client initialize lua scripts 2024-07-17 08:43:33.752 - debug: netatmo.0 (1879613) Objects connected to redis: 127.0.0.1:9001 2024-07-17 08:43:33.873 - debug: netatmo.0 (1879613) Redis States: Use Redis connection: 127.0.0.1:6379 2024-07-17 08:43:33.877 - debug: netatmo.0 (1879613) States create System PubSub Client 2024-07-17 08:43:33.878 - debug: netatmo.0 (1879613) States create User PubSub Client 2024-07-17 08:43:33.882 - debug: netatmo.0 (1879613) States connected to redis: 127.0.0.1:6379 2024-07-17 08:43:33.904 - debug: netatmo.0 (1879613) Plugin sentry Initialize Plugin (enabled=true) 2024-07-17 08:43:34.062 - info: netatmo.0 (1879613) starting. Version 3.0.0 in /opt/iobroker/node_modules/iobroker.netatmo, node: v20.15.0, js-controller: 5.0.19 2024-07-17 08:43:34.070 - debug: netatmo.0 (1879613) Use individual ID/Secret 2024-07-17 08:43:34.071 - info: netatmo.0 (1879613) Authenticating with Netatmo using individual client-ID 66975471e1dxxxxxxxxxxx 2024-07-17 08:43:34.071 - warn: netatmo.0 (1879613) API Error: Please Authenticate manually once using the Admin UI of this instance.

Wenn ich dann in die Einstellungen gehe kommt:

2024-07-17 08:45:58.944 - warn: admin.0 (78490) netatmo has an invalid jsonConfig: [{"instancePath":"/items/_authenticate","schemaPath":"#/definitions/sendToProps/additionalProperties","keyword":"additionalProperties","params":{"additionalProperty":"window"},"message":"must NOT have additional properties"},{"instancePath":"","schemaPath":"#/if","keyword":"if","params":{"failingKeyword":"else"},"message":"must match "else" schema"}]

Klicke ich in den Einstellungen dann auf die Schaltfläche "Authenticate Netatmo" kommt:

2024-07-17 08:47:13.904 - debug: netatmo.0 (1879613) Received OAuth start message: {"_origin":"http://192.168.0.30:8081/","_originIp":"http://192.168.0.30:8081/"} 2024-07-17 08:47:13.904 - error: netatmo.0 (1879613) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). 2024-07-17 08:47:13.905 - error: netatmo.0 (1879613) unhandled promise rejection: Cannot read properties of undefined (reading 'netatmoCoach') 2024-07-17 08:47:14.046 - error: netatmo.0 (1879613) TypeError: Cannot read properties of undefined (reading 'netatmoCoach') at getScopeList (/opt/iobroker/node_modules/iobroker.netatmo/main.js:210:16) at AdapterClass. (/opt/iobroker/node_modules/iobroker.netatmo/main.js:80:34) at AdapterClass.emit (node:events:519:28) at AdapterClass.emit (node:domain:488:12) at change (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.ts:11114:34) at Immediate. (/opt/iobroker/node_modules/@iobroker/db-states-redis/src/lib/states/statesInRedisClient.ts:381:37) at processImmediate (node:internal/timers:478:21) 2024-07-17 08:47:14.047 - error: netatmo.0 (1879613) Cannot read properties of undefined (reading 'netatmoCoach') 2024-07-17 08:47:14.060 - info: netatmo.0 (1879613) cleaned everything up... 2024-07-17 08:47:14.060 - info: netatmo.0 (1879613) terminating 2024-07-17 08:47:14.060 - debug: netatmo.0 (1879613) Plugin sentry destroyed 2024-07-17 08:47:14.060 - warn: netatmo.0 (1879613) Terminated (UNCAUGHT_EXCEPTION): Without reason 2024-07-17 08:47:14.562 - info: netatmo.0 (1879613) terminating 2024-07-17 08:47:14.705 - error: host.iobroker Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: TypeError: Cannot read properties of undefined (reading 'netatmoCoach') 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: at getScopeList (/opt/iobroker/node_modules/iobroker.netatmo/main.js:210:16) 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: at AdapterClass. (/opt/iobroker/node_modules/iobroker.netatmo/main.js:80:34) 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: at AdapterClass.emit (node:events:519:28) 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: at AdapterClass.emit (node:domain:488:12) 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: at change (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.ts:11114:34) 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: at Immediate. (/opt/iobroker/node_modules/@iobroker/db-states-redis/src/lib/states/statesInRedisClient.ts:381:37) 2024-07-17 08:47:14.707 - error: host.iobroker Caught by controller[1]: at processImmediate (node:internal/timers:478:21) 2024-07-17 08:47:14.707 - error: host.iobroker instance system.adapter.netatmo.0 terminated with code 6 (UNCAUGHT_EXCEPTION)

Client-ID und Secrect-ID sind richtig eingetragen.

ManfredHi avatar Jul 17 '24 06:07 ManfredHi