rlindner / node-red-contrib-sma-webconnect

Node-RED node to query the web interface of SMA inverters
MIT License
13 stars 9 forks source link

[error] TypeError: value[config.id] is not iterable when connecting to SUNNY TRIPOWER 8.0 SE #44

Open ReinhardWalden opened 2 weeks ago

ReinhardWalden commented 2 weeks ago

When connecting to a SUNNY TRIPOWER 8.0 SE, I get no response on the nodered GUI. In the nodered log I see

28 Sep 13:43:05 - [debug] [sma-webconnect:df97662054b6dffd] requesting https://192.168.2.157/dyn/login.json 28 Sep 13:43:05 - [debug] [sma-webconnect:df97662054b6dffd] response to https://192.168.2.157/dyn/login.json: {"statusCode":200,"body":{"result":{"sid":"dARI3t3LXDoLEvng"}},"headers":{"content-type":"application/json;","cache-control":"no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0","content-length":"37","connection":"close","date":"Sat, 28 Sep 2024 11:43:03 GMT","server":"lighttpd/1.4.54"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"192.168.2.157","port":443,"hostname":"192.168.2.157","hash":null,"search":null,"query":null,"pathname":"/dyn/login.json","path":"/dyn/login.json","href":"https://192.168.2.157/dyn/login.json"},"method":"POST","headers":{"accept":"application/json","content-type":"application/json","content-length":35}}} 28 Sep 13:43:05 - [info] [sma-webconnect:df97662054b6dffd] session created: 192.168.2.157 : dARI3t3LXDoLEvng 28 Sep 13:43:05 - [debug] [sma-webconnect:df97662054b6dffd] requesting https://192.168.2.157/dyn/getValues.json?sid=dARI3t3LXDoLEvng 28 Sep 13:43:06 - [debug] [sma-webconnect:df97662054b6dffd] response to https://192.168.2.157/dyn/getValues.json?sid=dARI3t3LXDoLEvng: {"statusCode":200,"body":{"result":{"01B8-xxxxx6D4":{"6100_0046E500":{"9":[{"val":22950}]},"6100_0046E600":{"9":[{"val":23086}]},"6100_0046E700":{"9":[{"val":23111}]},"6100_40463600":{"9":[{"val":772}]},"6100_40463700":{"9":[{"val":0}]},"6100_40263F00":{"9":[{"val":775}]}}}},"headers":{"content-type":"application/json;","cache-control":"no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0","content-length":"250","connection":"close","date":"Sat, 28 Sep 2024 11:43:03 GMT","server":"lighttpd/1.4.54"},"request":{"uri":{"protocol":"https:","slashes":true,"auth":null,"host":"192.168.2.157","port":443,"hostname":"192.168.2.157","hash":null,"search":"?sid=dARI3t3LXDoLEvng","query":"sid=dARI3t3LXDoLEvng","pathname":"/dyn/getValues.json","path":"/dyn/getValues.json?sid=dARI3t3LXDoLEvng","href":"https://192.168.2.157/dyn/getValues.json?sid=dARI3t3LXDoLEvng"},"method":"POST","headers":{"accept":"application/json","content-type":"application/json","content-length":119}}} 28 Sep 13:43:06 - [red] Uncaught Exception: 28 Sep 13:43:06 - [error] TypeError: value[config.id] is not iterable at parseResult (/data/node_modules/node-red-contrib-sma-webconnect/functions.js:22:36) at Request. (/data/node_modules/node-red-contrib-sma-webconnect/sma-webconnect.js:105:30) at Request._callback (/data/node_modules/lodash/lodash.js:10118:25) at Request.requestRetryReply [as reply] (/data/node_modules/requestretry/index.js:151:19) at Request. (/data/node_modules/requestretry/index.js:192:10) at processTicksAndRejections (node:internal/process/task_queues:96:5)

My inverter uses the firmware 3.4.16.R . Any suggestions ?

rlindner commented 2 weeks ago

Did you select the correct device named "Sunny Tripower Smart Energy 5.0/6.0/8.0/10.0 (3SE-40)"?

ReinhardWalden commented 2 weeks ago

I did my best. I have tried the first and the last of the three entries between I can choose. Both had the same issue.

image

rlindner commented 2 weeks ago

My bad and thanks for the screenshot! The support for the "Smart Energy" is already there, but seems I haven't released it yet. I'll try to do a release with it this weekend and will comment here when it's available.

rlindner commented 2 weeks ago

The new version v0.4.0 with support for the "Smart Energy" devices should be available now: https://www.npmjs.com/package/node-red-contrib-sma-webconnect/v/0.4.0