coolchip / node-red-contrib-luxtronik2

Node-RED node, that reads heat pumps based on the Luxtronik 2.0 contol unit. Supports for example Alpha Innotec and Siemens Novelan (WRP NET).
MIT License
7 stars 2 forks source link

TypeError: Cannot read property 'payload' of undefined #8

Closed tkirchm closed 1 year ago

tkirchm commented 2 years ago

Hello,

I get this error nearly every night and sometimes even up to five times.

2 Jan 02:00:23 - [red] Uncaught Exception: 2 Jan 02:00:23 - TypeError: Cannot read property 'payload' of undefined at Luxtronik._processData (/home/pi/.node-red/node_modules/luxtronik2/luxtronik.js:332:74) at processTicksAndRejections (internal/process/task_queues.js:77:11) nodered.service: Main process exited, code=exited, status=1/FAILURE pam_unix(sudo:session): session closed for user root nodered.service: Failed with result 'exit-code'.

NodeRed v2.0.6 node -v v14.18.1 node-red-contrib-luxtronik2 v0.5.1

coolchip commented 2 years ago

Should be fixed with https://github.com/coolchip/luxtronik2/issues/28. Try new version. v0.5.2

tkirchm commented 2 years ago

Thank a lot. I just updated and will test it.

tkirchm commented 2 years ago

Sorry for bothering you again but the error just changed.

6 Jan 03:50:30 - [red] Uncaught Exception: 6 Jan 03:50:30 - [error] TypeError: Cannot convert undefined or null to object at hasOwnProperty () at Luxtronik._processData (/home/pi/.node-red/node_modules/luxtronik2/luxtronik.js:333:42) at processTicksAndRejections (internal/process/task_queues.js:77:11) nodered.service: Main process exited, code=exited, status=1/FAILURE

coolchip commented 2 years ago

Oh... you're right. I've done it the wrong way. Try node-red-contrib-luxtronik2 v0.5.3

But keep in mind: The problem is not the node. Your luxtronik stops sending requested data back to node-red. Perhaps there is something with your network or your electricity provider shuts down your heatpump. With my bugfix now you should get an Error output from your node instead of an uncaught exception.

tkirchm commented 2 years ago

Thank's. I'll test it next few day's.

It's strange I also used an ping node and only ask the heat pump when it is available and still I got uncaught exceptions. My electricity provider has no connection to my heat pump.