Closed djatwork closed 4 years ago
Hey Werner,
thanks for that much info. Which version of node-red-contrib-loxone are you running? 0.10.4
?
As I do not have a miniserver Gen2 nor running LoxBerry, could you check this on a clean node-red install? Maybe use a second SD card for the Pi and install node-red like statet in the tutorial?
To my knowledge the Loxone software for Gen1 and Gen2 are the same. I did not have any issues with 10.3.11.25 on a Gen1 miniserver, yet. Regarding the error messages this seems to be some problem in a nodejs crypto library on which node-lox-ws-api's token_enc relies. Does the Gen2 miniserver serve the websocket over https?
Cheers, Patri
Hi Patri
yes i´m using the 0.10.4! It´s a clean node-red install on an loxberry VM. I will try to install a new container in the next days.
So the Loxone Config Software is still the same but the gen2 supports https encryption. i think the connection is starting on port 80 and then it will be transfered to the https port 443.
Maybe the problem depends not only to the gen 2 because i saw shortly that the module read out the loxone rooms and configs before it started to crash all the time. so the main communication has to be working for a short period.
is there anything i could debug or test except the clean node red install?
many thx Werner
Hi,
i duplicated the problem, with a new node-red docker container. On this install it start crashing right after saving the credentials.
Plain node-red install installed 0.10.4 thru the palette draw an loxone online object, add miniserver data (with port 80) draw an control in or control out object to check the if there was data parsed from the miniserver. the node red crashed.
29 Dec 20:21:45 - [info] [loxone-miniserver:5844b2c4.213cec] Miniserver connected (10.20.1.15:80) using Token-Enc
29 Dec 20:21:45 - [red] Uncaught Exception:
29 Dec 20:21:45 - Error: error:0906D066:PEM routines:PEM_read_bio:bad end line
at Object.publicEncrypt (crypto.js:390:12)
at TokenEnc._generate_session_key (/data/node_modules/node-lox-ws-api/lib/Auth/Token-Enc.js:112:32)
at IncomingMessage.res.on (/data/node_modules/node-lox-ws-api/lib/Auth/Token-Enc.js:92:18)
at emitOne (events.js:116:13)
at IncomingMessage.emit (events.js:211:7)
at IncomingMessage.Readable.read (_stream_readable.js:475:10)
at flow (_stream_readable.js:846:34)
at resume_ (_stream_readable.js:828:3)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-red-docker@1.0.0 start: `node $NODE_OPTIONS node_modules/node-red/red.js -v $FLOWS --userDir /data
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-red-docker@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /usr/src/node-red/.npm/_logs/2019-12-29T20_21_45_180Z-debug.log
node-lox-ws-api does currently not support connections over https, as this was never an option prior to the Gen2 miniserver.
Could you give me the output of curl -I http://<ip-of-miniserver>/data/LoxAPP3.json
?
I think I need a Gen2 miniserver to get hold of this...
I also do not yet have ms gen2, but I am wondering if HTTPS is mandatory settings which eliminates HTTP by design of gen2.
For internal LAN communication with loxone gen2 it should make sense to keep http alive
Jakub
I had the same issue with my miniserver v2 and could resolve it using the fix mentioned here: https://github.com/alladdin/node-lox-ws-api/issues/19
Thank you! I will incorporate that fix into my fork of node-lox-ws-api till @alladdin does a new release of the lib.
oh, perfect! lets buy v2 then! thx and have a great week ;)
Should already be fixed on a (re)install of node-red-contrib-loxone as the depending api-repository (codm/node-lox-ws-api) has the fix from @alladdin already pulled.
@elpaso666, could you please test it?
ah sorry, I cant... my v2 MS went to my brother in law. I will lets right when he replaces the old one with it.
Hi, i tried to connect the loxone to nodered, since i input the credetials the nodered crashes everytime shortly after the start. i´m using a miniserver gen2 with enabled authentication.
Node-RED version: v1.0.3 Node.js version: v12.14.0 Loxone: 10.3.11.25
when i uninstall the node-red-contrib-loxone, nodered starts again until i install the module again
any hints?
thx Werner