Giter Club home page Giter Club logo

Comments (11)

codmpm avatar codmpm commented on August 17, 2024

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

from node-red-contrib-loxone.

djatwork avatar djatwork commented on August 17, 2024

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

from node-red-contrib-loxone.

djatwork avatar djatwork commented on August 17, 2024

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! [email protected] 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 [email protected] 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

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

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...

from node-red-contrib-loxone.

elpaso666 avatar elpaso666 commented on August 17, 2024

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

from node-red-contrib-loxone.

Arrow768 avatar Arrow768 commented on August 17, 2024

I had the same issue with my miniserver v2 and could resolve it using the fix mentioned here: alladdin/node-lox-ws-api#19

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

Thank you! I will incorporate that fix into my fork of node-lox-ws-api till @alladdin does a new release of the lib.

from node-red-contrib-loxone.

elpaso666 avatar elpaso666 commented on August 17, 2024

oh, perfect! lets buy v2 then! thx and have a great week ;)

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

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.

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

@elpaso666, could you please test it?

from node-red-contrib-loxone.

elpaso666 avatar elpaso666 commented on August 17, 2024

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.

from node-red-contrib-loxone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.