FossyTom / ioBroker.goodwe

Communication with GoodWe Inverter ET/EH/BH/BT Series
MIT License
12 stars 5 forks source link

Connection to GW20K-ET fails #17

Open dassams opened 6 months ago

dassams commented 6 months ago

Describe the bug
Connection fails: "unhandled promise rejection: undefined is not a valid state value"

To Reproduce
Steps to reproduce the behavior:

  1. Install Version 1.0.2 of adapter
  2. Add IP of GoodWe WLAN Communication Module
  3. Connection fails due to the following errors
  4. See error

Expected behavior
Connect and fill values

Logfiles

2024-04-19 12:01:52.205 - info: goodwe.0 (4637) starting. Version 1.0.2 in /opt/iobroker/node_modules/iobroker.goodwe, node: v18.17.1, js-controller: 5.0.17
2024-04-19 12:01:52.623 - info: goodwe.0 (4637) check user admin pw iobroker: true,system.user.admin
2024-04-19 12:01:52.629 - info: goodwe.0 (4637) check group user admin group admin: false
2024-04-19 12:01:57.348 - error: goodwe.0 (4637) 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-04-19 12:01:57.349 - error: goodwe.0 (4637) unhandled promise rejection: undefined is not a valid state value
2024-04-19 12:01:57.353 - error: goodwe.0 (4637) Error: undefined is not a valid state value
at Object.maybeCallbackWithError (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/maybeCallback.js:35:17)
at Goodwe._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5448:49)
at Goodwe.setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5409:21)
at /opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/tools.js:2022:16
at new Promise ()
at Goodwe.setStateAsync (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/tools.js:2021:16)
at Goodwe.UpdateRunningData (/opt/iobroker/node_modules/iobroker.goodwe/main.js:563:8)
at Goodwe.myTimer (/opt/iobroker/node_modules/iobroker.goodwe/main.js:617:11)
at /opt/iobroker/node_modules/iobroker.goodwe/main.js:637:44
at Timeout._onTimeout (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:1675:13)
2024-04-19 12:01:57.354 - error: goodwe.0 (4637) undefined is not a valid state value

Versions:

Additional context
n/a