codmpm / node-red-contrib-loxone Goto Github PK
View Code? Open in Web Editor NEWConnect the Loxone Miniserver to node-red via the Websocket API
License: MIT License
Connect the Loxone Miniserver to node-red via the Websocket API
License: MIT License
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.
29 Dec 11:06:00 - [info] Installing module: node-red-contrib-loxone, version: 0.10.4
29 Dec 11:06:09 - [info] Installed module: node-red-contrib-loxone
29 Dec 11:06:09 - [info] Missing type registered: loxone-miniserver
29 Dec 11:06:09 - [info] Starting flows
29 Dec 11:06:09 - [info] Started flows
29 Dec 11:06:09 - [info] [loxone-miniserver:c00ab406.073b1] Miniserver connected (10.20.1.15:80) using Token-Enc
29 Dec 11:06:09 - [red] Uncaught Exception:
29 Dec 11:06:09 - Error: error:0908F070:PEM routines:get_header_and_data:short header
at Object.publicEncrypt (internal/crypto/cipher.js:61:12)
at TokenEnc._generate_session_key (/opt/loxberry/.node-red/node_modules/node-lox-ws-api/lib/Auth/Token-Enc.js:112:32)
at IncomingMessage.<anonymous> (/opt/loxberry/.node-red/node_modules/node-lox-ws-api/lib/Auth/Token-Enc.js:92:18)
at IncomingMessage.emit (events.js:210:5)
at IncomingMessage.Readable.read (_stream_readable.js:525:10)
at flow (_stream_readable.js:1000:34)
at resume_ (_stream_readable.js:981:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
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
Hello (i'm french...),
Great job !!!!!
I've a problem with CONTROL IN : when i rebooted my miniser, the CONTROLS IN are no reconnected, they are in yellow with CONNECTION CLOSED.
I've to update the miniserver in node-red to get again CONNECTED...
Could you please help me and excuse me for my horrible english :-)
Thanks.
Hi,
your package reference does not exist!
node-red-contrib-loxone/package.json
Line 17 in 2ad9c22
this blocks installation from your latest publication :-(
Since updating to v0.10.4
I am seeing this error quite frequently when deploying node:
9 Jan 17:39:03 - [info] Stopping flows
9 Jan 17:39:03 - [info] [mqtt-broker:605c7a1e.feaf14] Disconnected from broker: mqtt://localhost:1883
9 Jan 17:39:18 - [error] [loxone-miniserver:a6b98b51.f5ee5] Error stopping node: Close timed out
9 Jan 17:39:18 - [info] Stopped flows
Not a huge issue or majorly blocking, just reporting it. Any way I could debug it further?
Hi,
i just began integrating our blinds into node-red with alexa and i am observing this pattern:
Some blinds work correct via alexa. The function block just sets Up/Down as payload when On/Off is sent.
On the other side blinds that do not work, the gets no status update after a command is sent via alexa. At this time also other nodes get no status shown in node-red.
In the console output is no error reported :(
Is this issue related to #12 ?
Martin
Hi,
I'm trying to build some processing for messages using node-red - but I would like to programatically extract objects from the structure file - such as rooms. I know that the structure file is got - but are these objects exposed anywhere or am I going to have to pull the structure file myself and process it?
Thanks
David
Hello guys,
first thing - thank you so much for this great project...usability of Loxone gets much higher...
I'm having issues when uploading new configuration from Loxone Config to Loxone miniserver - connection of Loxone nodes in node-red gets lost. I just need to redeploy or restart node-red to get connection again...
I found similar issues described in other tickets that are already closed with solution in node-red-contrib-loxone 0.6.2 (with node-lox-ws-api 0.4.3). I'm running this version but described issue still appears. Btw. new checkbox "Activate connection?" is checked (but I don't know how does it exactly behave).
Could you please help? Is there something wrong on my side I might overlook?
Regards,
Adam
Hi,
i got following error today after upgrading to current alpha version of loxone:
4 Sep 13:45:05 - [info] [loxone-miniserver:b6668e.c75e197] Miniserver connected (172.16.0.33:80) using Token-Enc
4 Sep 13:45:05 - [red] Uncaught Exception:
4 Sep 13:45:05 - SyntaxError: Unexpected token $ in JSON at position 559
at JSON.parse (<anonymous>)
at new File (/usr/src/node-red/node_modules/node-lox-ws-api/lib/Message/File.js:8:30)
at Connection.handle_message (/usr/src/node-red/node_modules/node-lox-ws-api/lib/Connection.js:140:39)
at WebSocketConnection.<anonymous> (/usr/src/node-red/node_modules/node-lox-ws-api/lib/Connection.js:103:14)
at WebSocketConnection.emit (events.js:189:13)
at WebSocketConnection.processFrame (/usr/src/node-red/node_modules/websocket/lib/WebSocketConnection.js:554:26)
at /usr/src/node-red/node_modules/websocket/lib/WebSocketConnection.js:323:40
at process._tickCallback (internal/process/next_tick.js:61:11)
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.
its root cause seems to be within lox-ws-api but maybe you can give me a hint to create further debugging input for the component.
Node-Red crashes when Room and/or Category in LoxoneConfig is set to "Do Not Use"
the update of node-red-contrib-loxone from v0.10.4 to v0.10.5 fails with the following log:
37 verbose stack at processTicksAndRejections (internal/process/task_queues.js:83:21)
38 verbose cwd /opt/loxberry/.node-red
39 verbose Linux 4.19.69-v7+
40 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--no-audit" "--no-update-notifier" "--save" "--save-prefix=\"~\"" "--production" "[email protected]"
41 verbose node v12.16.2
42 verbose npm v6.14.4
43 error premature close
44 verbose exit [ 1, true ]
node-red v1.0.3
A great project, working all fine, but I have an small issue:
If I have an element in Loxone with any Category or Room (including "not assigned") everyting is working fine. But I also want to use "do not use" elements. This are elements that I use for communication between node-red and loxone miniserver but which I don't want to show in the App or on the Loxone Webinterface.
Only the "not assigned" (in german "Nicht zugeordnet") is visible. But "do not used" (in german "Nicht verwenden") ist not available.
I don't know if this is an extra feature or an bug...
Thank's a lot!
As of node-red 0.17.0 there is a style guide for node help texts.
As already discussed in #9 and #11, there is a problem on reconnect from the node. Reproduceable when updating the Miniserver software from loxconfig.
Currently testing why it faults...
cc @mabunixda, @alladdin
Hi
Thanks for creating this module. It will make the transition from LoxOne to Homeassistant a lot easier!
In LoxOne, I have a virtual input configured as Up/Down buttons. If I try to use this with a "control in" node, I can navigate to the control, but the combobox state is empty:
The node indicates not being configured properly because state is required. Did I do something wrong?
Kind regards,
Merijn
Currently the input node (control In, keepalive in, stream In and stream all) only give some output if the value changes or the flow restarts (e.g. Node-RED restart or redeploy).
I want to get the current value of all my temperature sensors as well as of my intelligent room controllers in a constant interval. So I thought I could simply use the "inject" node to trigger the nodes, but the input nodes don't have any input ports to trigger them.
Would it be possible to add an input port to those nodes so other nodes can trigger them? Or maybe implement something into the nodes to specify a constant interval at which the data should be retrieved?
Example:
[ inject ] -> [ stream in ] -> [ debug ]
I have 3 Loxone miniservers which is a situation I'm sure you hadn't expected to support (although it would be nice). I can get around this by running three NodeRED instances which I am not doing.. yet.
However when I add a Loxone component and configure the connection it often fails to connect for a long time but then eventually does only to disconnect a few minutes later, sometimes up to an hour or two. (see NodeRED log at end). My network is very dependable. This posts lots of error messages to the log of course. What's very strange is that if I then remove all Loxone nodes from the flows I still see these error messages and NodeRED still shows connection attempts ! Something remains, seems it's retained in NodeRED.
At one stage I created a second connection profile and then I saw that both connections were trying to be established from NodeRED (to two different IP addresses). So I deleted the second connection profile but still they both persist. The NodeRED Configuration showed 0 nodes using the profile and I deleted it there too but same issue. The connection does dissappear from the dropdown.
I tried removing the Loxone nodes from the palette and via npm and also deleting the folder in my home directory but if I then add them back then still this happens. I'm now at the stage where I have to keep rebuilding NodeRED from scratch to remove these error messages and connection attempts.
Any ideas ?
1 | node-red | 28 Jul 14:39:15 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:39:15 - [error] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connection error: undefined
1 | node-red | 28 Jul 14:39:15 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
1 | node-red | 28 Jul 14:39:15 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:39:15 - [error] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connection error: undefined
1 | node-red | 28 Jul 14:39:15 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
1 | node-red | 28 Jul 14:39:16 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:39:16 - [info] [loxone-miniserver: e42aefbc.0dfdc] got structure file 2018-07-22 21:10:33
1 | node-red | 28 Jul 14:39:17 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:39:17 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:39:17 - [info] [loxone-miniserver: e42aefbc.0dfdc] got structure file 2018-07-22 21:10:33
1 | node-red | 28 Jul 14:39:17 - [info] [loxone-miniserver: e42aefbc.0dfdc] got structure file 2018-07-22 21:10:33
1 | node-red | 28 Jul 14:43:28 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
1 | node-red | 28 Jul 14:43:28 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
1 | node-red | 28 Jul 14:43:28 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
1 | node-red | 28 Jul 14:43:30 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:43:30 - [error] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connection error: undefined
1 | node-red | 28 Jul 14:43:30 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
1 | node-red | 28 Jul 14:43:30 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:43:30 - [error] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connection error: undefined
1 | node-red | 28 Jul 14:43:30 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
1 | node-red | 28 Jul 14:43:32 - [info] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connected (192.168.1.95:80) using token-enc
1 | node-red | 28 Jul 14:43:32 - [error] [loxone-miniserver: e42aefbc.0dfdc] Miniserver connection error: undefined
1 | node-red | 28 Jul 14:43:32 - [info] [loxone-miniserver: e42aefbc.0dfdc] connection closed
Hello,
First of all, excuse my english i'm french...
I wanted to say that your node-red-contrib-loxone IS SIMPLY GENIAL !!!! Finally I waited for this for a long time, thank you, thank you !!!
I have nevertheless a problem with weather service, if I want to recover a loxone value, NODE-RED plant ...
Thank you for your help...
NODE-RED 16.2
NODEJS v6.10.1
As soon as i install Loxone module in Node-Red 0.20.5 node-red is exiting with error-code 1.
Forcing a log on start brings up the following:
19 May 11:50:48 - [info] [xxx] got structure file 2019-05-19 08:17:32
19 May 11:50:48 - [red] Uncaught Exception:
19 May 11:50:48 - TypeError: Cannot read property 'toString' of undefined
at Socket.<anonymous> (/opt/iobroker/node_modules/iobroker.node-red/nodes/ioBroker.js:282:89)
at Socket.onack (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:319:9)
at Socket.onpacket (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/socket.js:244:12)
at Manager.<anonymous> (/opt/iobroker/node_modules/component-bind/index.js:21:15)
at Manager.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20)
at Manager.ondecoded (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:345:8)
at Decoder.<anonymous> (/opt/iobroker/node_modules/component-bind/index.js:21:15)
at Decoder.Emitter.emit (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/component-emitter/index.js:133:20)
at Decoder.add (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-parser/index.js:251:12)
at Manager.ondata (/opt/iobroker/node_modules/iobroker.js-controller/node_modules/socket.io-client/lib/manager.js:335:16)
As soon as i do an uninstall with npm uninstall node-red-contrib-loxone everything works fine again (execpt Loxone of cause ;-) )
19 May 11:50:40 - [info] Node-RED version: v0.20.5
19 May 11:50:40 - [info] Node.js version: v8.15.1
19 May 11:50:40 - [info] Linux 4.9.0-8-amd64 x64 LE
node-red-contrib-loxone 0.10.2
4 Apr 12:20:38 - [red] Uncaught Exception:
4 Apr 12:20:38 - TypeError: Cannot read property 'name' of undefined
at LoxoneMiniserver.handleEvent (/usr/lib/node_modules/node-red-contrib-loxone/loxone/loxone.js:318:79)
at API._updateEvent (/usr/lib/node_modules/node-red-contrib-loxone/loxone/loxone.js:89:18)
at emitTwo (events.js:106:13)
at API.emit (events.js:191:7)
at /usr/lib/node_modules/node-red-contrib-loxone/node_modules/node-lox-ws-api/lib/API.js:124:18
at Array.forEach (native)
at Connection. (/usr/lib/node_modules/node-red-contrib-loxone/node_modules/node-lox-ws-api/lib/API.js:123:18)
at emitOne (events.js:96:13)
at Connection.emit (events.js:188:7)
at Connection.handle_message (/usr/lib/node_modules/node-red-contrib-loxone/node_modules/node-lox-ws-api/lib/Connection.js:155:18)
at WebSocketConnection. (/usr/lib/node_modules/node-red-contrib-loxone/node_modules/node-lox-ws-api/lib/Connection.js:103:14)
at emitOne (events.js:96:13)
at WebSocketConnection.emit (events.js:188:7)
at WebSocketConnection.processFrame (/usr/lib/node_modules/node-red-contrib-loxone/node_modules/websocket/lib/WebSocketConnection.js:524:26)
at /usr/lib/node_modules/node-red-contrib-loxone/node_modules/websocket/lib/WebSocketConnection.js:321:40
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
nodered.service: main process exited, code=exited, status=1/FAILURE
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool....
Hello,
I've setup up a webservice node to send information from an MQTT bus to my Loxone MiniServer
When I tried the same request in postman it works fine, but looking at the live view in Loxone Config nothing seems to comming in.
Is there a way to log what happens or to see why nothing is been send ?
Kind Regards
Frank
Hi,
There seems to be a race condition in loxone.js, mostly visible when using node-red as a docker container.
More precisely, it might happen that a control command is sent (send_control_command) although the structure file has not been received yet by the node.
I would suggest to move the following lines:
node.connected = true;
node.setConnectionStatusMsg("green", "connected", "dot");
sendOnlineNodeMsg(true, config.id);
from
client.on('authorized', function () {
to
client.on('get_structure_file', function (data) {
Hi,
I have a console with tail/pm2 log open to see what's going on with node-red. The loxone node spams the log every two minutes. Is there a chance to drill down the verbose level so the log stays clean.
thanx
horst
Hi,
in the last days i see very often a
Miniserver connection error: undefined
in the debug logs and node-red logs.
how can i debug this problem better? Or is this just in my installation?
Also got this right now ( i saw it now the first time )
Miniserver connect failed
But afterwards everything is connected again...
If you have more than a handful of categories and rooms, its cumbersome to find the correct room or category, as they are not sorted.
So please as a feature request, can rooms and categories be sorted? Thanks!
Hi,
when deploying the project with your plugin, I'm getting this error in the debug log.
Everything else is working as expected. This error occurs only when deploying changes.
The uuid belongs to loxone-miniserver node with following configuration:
I'm using old v 8.1.11.11 miniserver firmware and LoxConfig.
Hello
I have tried to update on a working install & install fresh on a new install and I come up with an error each time :
"Installation of module node-red-contrib-loxone failed: version not found"
any thoughts??
My new install is on a raspberry pi and my working install is on a VM
Problem:
Nodes attempt to connect to Loxone even if login credentials are missing. This (obviously) leads to errors in syslog:
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: 30 Jan 07:55:49 - [info] [loxone-miniserver:51a8d49f.d98894] connection closed: Socket Error: undefined ERR_STREAM$
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: 30 Jan 07:55:49 - [info] [loxone-miniserver:51a8d49f.d98894] connection closed: reconnecting
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: 30 Jan 07:55:49 - [info] [loxone-miniserver:f9ff3407.c04ec8] Miniserver connected (10.10.10.10:10010) using Token-$
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: WebSocket error: Socket Error: undefined ERR_STREAM_WRITE_AFTER_END 1006
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: 30 Jan 07:55:49 - [error] [loxone-miniserver:f9ff3407.c04ec8] Miniserver connection error: Socket Error: undefined$
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: Websocket Connection closed: 1006 Socket Error: undefined ERR_STREAM_WRITE_AFTER_END
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: 30 Jan 07:55:49 - [info] [loxone-miniserver:f9ff3407.c04ec8] connection closed: Socket Error: undefined ERR_STREAM$
Jan 30 07:55:49 L403-sn50 Node-RED[5769]: 30 Jan 07:55:49 - [info] [loxone-miniserver:f9ff3407.c04ec8] connection closed: reconnecting
Jan 30 07:55:50 L403-sn50 Node-RED[5769]: 30 Jan 07:55:50 - [info] [loxone-miniserver:715b1c25.99c1dc] Miniserver connected (10.10.10.10:10010) using Token-$
Jan 30 07:55:50 L403-sn50 Node-RED[5769]: WebSocket error: Socket Error: undefined ERR_STREAM_WRITE_AFTER_END 1006
Jan 30 07:55:50 L403-sn50 Node-RED[5769]: 30 Jan 07:55:50 - [error] [loxone-miniserver:715b1c25.99c1dc] Miniserver connection error: Socket Error: undefined$
Jan 30 07:55:50 L403-sn50 Node-RED[5769]: Websocket Connection closed: 1006 Socket Error: undefined ERR_STREAM_WRITE_AFTER_END
Jan 30 07:55:50 L403-sn50 Node-RED[5769]: 30 Jan 07:55:50 - [info] [loxone-miniserver:715b1c25.99c1dc] connection closed: Socket Error: undefined ERR_STREAM$
Jan 30 07:55:50 L403-sn50 Node-RED[5769]: 30 Jan 07:55:50 - [info] [loxone-miniserver:715b1c25.99c1dc] connection closed: reconnecting
etc etc. The attempts to reconnect are so frequent that Node Red (in my case running on Raspberry Pi 3) becomes unresponsive. And of course, loggs fill memory (SD card).
Why are login credentials missing? Credentials are never stored during export of flow. After (re)importing the flow, you always have to enter them manually. If you forgot to do so and deploy the flow without credentials, the flow starts, but Node Red becomes unresponsive, because of errors and attempts to reconnect.
Suggested solution:
Delays between attempts to reconnect (for example 10 seconds?) in order to prevent Node Red becoming unresponsive.
Disable connection if login credentials (in loxone-miniserver node) are missing.
Hey Patrik,
I got an issue here, where I need to change the msg.payload of an existing msg object with a new value from a loxone temperature sensor.
This is not possible at the moment, as every data that passes through the webservice node gets overwritten because the webservice node replaces the entire msg object.
One of the concepts of node-red is that every node should preserve the msg object but only change data in msg.payload.
Sidenote: Keep up the good work! Just wanted to say thank you to the project leader and all contributors!
Best Regards,
Michael
Sending a request with the Webservice node immediately after starting Node-RED consistently results in a crash. This happens because structureData.msInfo is not there yet. Probably related to #12
11 Dec 13:39:20 - [warn] [function:delay] lox not ready, queue messages
11 Dec 13:39:20 - [red] Uncaught Exception:
11 Dec 13:39:20 - TypeError: Cannot read property 'msInfo' of null
at API.<anonymous> (/data/node_modules/node-red-contrib-loxone/loxone/loxone.js:241:61)
at API.emit (events.js:198:13)
at API.EventEmitter.emit (domain.js:448:20)
at TokenEnc.<anonymous> (/data/node_modules/node-lox-ws-api/lib/API.js:256:14)
at TokenEnc.emit (events.js:198:13)
at TokenEnc.EventEmitter.emit (domain.js:448:20)
at Object.callback (/data/node_modules/node-lox-ws-api/lib/Auth/Token-Enc.js:204:22)
at API._message_text (/data/node_modules/node-lox-ws-api/lib/API.js:210:18)
at Connection.<anonymous> (/data/node_modules/node-lox-ws-api/lib/API.js:114:14)
at Connection.emit (events.js:198:13)
at Connection.EventEmitter.emit (domain.js:448:20)
at Connection.handle_message (/data/node_modules/node-lox-ws-api/lib/Connection.js:136:18)
at WebSocketConnection.<anonymous> (/data/node_modules/node-lox-ws-api/lib/Connection.js:103:14)
at WebSocketConnection.emit (events.js:198:13)
at WebSocketConnection.EventEmitter.emit (domain.js:448:20)
at WebSocketConnection.processFrame (/data/node_modules/websocket/lib/WebSocketConnection.js:554:26)
at /data/node_modules/websocket/lib/WebSocketConnection.js:323:40
at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
Same on non-Docker hosts.
Easy workaround is to put a delay node in front of the webservice node, use a status node to monitor the webservice node, and override the delay when the webservice node is not connected. Something like:
if (!msg.status.hasOwnProperty("text") || msg.status.text === "connected") {
msg.delay = 0;
msg.flush = true;
} else {
msg.delay = 60 * 1000;
}
Miniserver is running 10.3.11.25 but first noticed this shortly after msInfo was added. Apologies for not reporting at the time.
Hello,
I am a teacher in belgium
We have loxone material in school.
Your work could allow us to make our lessons more interactive by connecting loxone via nodered to a home simulator
I would like to help you ...
I saw that you had difficulty doing your testing on hardware.
I can put at your disposal, a PC with teamviewer and a loxone server connect on the same network. you can then turn on (PC and loxone server) whenever you want via a simple HTTP request. and do all your test as you like ... I can put this in place this Wednesday, 4 October ... if you are interested, just tell me how to send you in PM, the connection information.
Thank you again for your work
Currently the control-nodes and the webservice-nodes don't share the messages/status of the miniserver-config node. All in all the messaging architecture is a bit clumsy.
Maybe there should be a msg queue which delegates the messages to all existing nodes... not thought this to the end, yet.
There "control Out" function does not allow for setting specific items associated with the destination device.
i.e in my case I have the room heating/cooling controlled by "Intelligent Room Controller" which has a mode setting.
I would like node-red to be able to change the mode on this controller but it does not allow that.
Is there a possibility to extend the msg object from control-in node to have all propertys like category, room, control and state within the object?
I would also be interested if i can have a wildcards to select some property, e.g. select temperature and get all Events for any room.
For ease of programming with node-red this could/should be a new node "event stream in"
The keepalive node is always returning 0 in the new version 0.10.6.
Hi,
I am trying to get up and running node-red with my loxone miniserver, but the moment I set the miniserver details, nodered starts crashing..
I am getting this error:
TypeError: Cannot read property 'closeDescription' of undefined
at Connection. (/home/pi/.node-red/node_modules/node-lox-ws-api/lib/Connection.js:64:62)
at WebSocketClient.emit (events.js:314:20)
at ClientRequest.handleRequestError (/home/pi/.node-red/node_modules/websocket/lib/WebSocketClient.js:227:14)
at ClientRequest.emit (events.js:314:20)
at Socket.socketErrorListener (_http_client.js:427:9)
at Socket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
Thats when I try to setup "online" node to test the connection.. When I delete everything from the flow, i am getting:
WebSocket error: Socket Error: undefined ERR_STREAM_WRITE_AFTER_END 1006
and after some time crash again... seems like I am not able to connect to the miniserver.. anybody out there, who could help, how to make stable login into miniserver?
R4pi 8GB, on raspberry Pi OS, all updates done.
Thanks
Hi,
I am getting following error when trying to install on another RPI.
can you please help.
thank you!
sudo cat /root/.npm/_logs/2020-01-01T20_30_52_703Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'install',
1 verbose cli 'node-red-contrib-loxone'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session b5fec69c4c8b0b9e
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 https://registry.npmjs.org/node-red-contrib-loxone 712ms
8 silly pacote tag manifest for node-red-contrib-loxone@latest fetched in 807ms
9 timing stage:loadCurrentTree Completed in 4673ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 46ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 2263ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule [email protected] checking installable status
17 silly fetchPackageMetaData error for node-lox-ws-api@github:codm/node-lox-ws-api Error while executing:
17 silly fetchPackageMetaData undefined ls-remote -h -t ssh://[email protected]/codm/node-lox-ws-api.git
17 silly fetchPackageMetaData
17 silly fetchPackageMetaData
17 silly fetchPackageMetaData spawn git ENOENT
18 timing stage:rollbackFailedOptional Completed in 5ms
19 timing stage:runTopLevelLifecycles Completed in 7191ms
20 silly saveTree [email protected]
20 silly saveTree ├── [email protected]
20 silly saveTree ├─┬ [email protected]
20 silly saveTree │ ├── [email protected]
20 silly saveTree │ ├── [email protected]
20 silly saveTree │ ├─┬ [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ └── [email protected]
20 silly saveTree │ └── [email protected]
20 silly saveTree ├─┬ [email protected]
20 silly saveTree │ ├── [email protected]
20 silly saveTree │ ├─┬ [email protected]
20 silly saveTree │ │ └── [email protected]
20 silly saveTree │ ├── [email protected]
20 silly saveTree │ ├─┬ [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ └── [email protected]
20 silly saveTree │ ├── [email protected]
20 silly saveTree │ ├── [email protected]
20 silly saveTree │ └── [email protected]
20 silly saveTree ├── [email protected]
20 silly saveTree ├── [email protected]
20 silly saveTree ├── [email protected]
20 silly saveTree ├── [email protected]
20 silly saveTree ├── [email protected]
20 silly saveTree ├─┬ [email protected]
20 silly saveTree │ └─┬ [email protected]
20 silly saveTree │ ├─┬ @serialport/[email protected]
20 silly saveTree │ │ └── @serialport/[email protected]
20 silly saveTree │ ├─┬ @serialport/[email protected]
20 silly saveTree │ │ ├─┬ @serialport/[email protected]
20 silly saveTree │ │ │ └── @serialport/[email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ └─┬ [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ │ ├── [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ └─┬ [email protected]
20 silly saveTree │ │ │ ├─┬ [email protected]
20 silly saveTree │ │ │ │ └── [email protected]
20 silly saveTree │ │ │ ├── [email protected]
20 silly saveTree │ │ │ └── [email protected]
20 silly saveTree │ │ └── [email protected]
20 silly saveTree │ ├── @serialport/[email protected]
20 silly saveTree │ ├── @serialport/[email protected]
20 silly saveTree │ ├── @serialport/[email protected]
20 silly saveTree │ ├── @serialport/[email protected]
20 silly saveTree │ ├── @serialport/[email protected]
20 silly saveTree │ ├── @serialport/[email protected]
20 silly saveTree │ └── @serialport/[email protected]
20 silly saveTree └── [email protected]
21 verbose stack Error: spawn git ENOENT
21 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
21 verbose stack at onErrorNT (internal/child_process.js:456:16)
21 verbose stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
22 verbose cwd /home/pi/.node-red
23 verbose Linux 4.19.75-v7+
24 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-loxone"
25 verbose node v12.14.0
26 verbose npm v6.13.4
27 error code ENOENT
28 error syscall spawn git
29 error path git
30 error errno ENOENT
31 error enoent Error while executing:
31 error enoent undefined ls-remote -h -t ssh://[email protected]/codm/node-lox-ws-api.git
31 error enoent
31 error enoent
31 error enoent spawn git ENOENT
32 error enoent This is related to npm not being able to find a file.
33 verbose exit [ 1, true ]
I'm integrating my enocean sensors with Loxone using node red and this cool library but I'm unable to create a valid message that leads to setting my virtual input in the miniserver. Instead I'm using the webservice node which works just fine (url="jdev/sps/io/VI2/" with "append msg.payload" - a number from the previous node).
I would be very glad if an example for such a message would be available ... and I would volunteer for updating the documentation accordingly ;)
Hi Patrik,
I am experiencing an issue with the Control-In nodes. While at first everything is working fine, meaning I receive status changes from a Loxone Virtual In- or Output via the Control-In Node, they stop working after I deploy changes in Node-RED (even if it's just moving the position of a comment).
The Control-Out as well as the Online Node are still working, so there obviously still is a connection to the miniserver. If I restart Node-RED or the miniserver everything is working again. Until I do another deployment in Node-RED...
Interestingly enough, when I changed RedMatics log level from info to debug, to look for anything helpful, I could deploy several times without an issue. But after changing back to info log mode I have again this issue.
I can't say for certain if this started with v0.10.4, but I am experieninge this issue only recently. And it sounds pretty much that this could have to do with the latest changes made regarding #33 ?!
Best Regards,
Jens
P.S.: Thank you for all your work on the Loxone nodes! I am really happy with the Loxone<>Node-RED integration.
node-red-contrib-loxone v0.10.4
Node-RED v1.0.3 using RedMativ v5.3.10
After programming the Miniserver, the connection seems to be coming up but there are no events coming from the loxone-control-in
node. Seems like that the loxone nodered plugin is getting into a weird state.
What logs could I have a look at?
``As reported by someone (not me), on the Belgian Loxone users Facebook group, who has a crashing plugin:
25 May 13:34:26 - [red] Uncaught Exception:
25 May 13:34:26 - ReferenceError: data is not defined
at API.<anonymous> (/data/node_modules/node-red-contrib-loxone/loxone/loxone.js:262:21)
at API.emit (events.js:198:13)
at Connection.<anonymous> (/data/node_modules/node-lox-ws-api/lib/API.js:119:14)
at Connection.emit (events.js:198:13)
at Connection.handle_message (/data/node_modules/node-lox-ws-api/lib/Connection.js:174:18)
at WebSocketConnection.<anonymous> (/data/node_modules/node-lox-ws-api/lib/Connection.js:140:14)
at WebSocketConnection.emit (events.js:198:13)
at WebSocketConnection.processFrame (/data/node_modules/websocket/lib/WebSocketConnection.js:554:26)
at /data/node_modules/websocket/lib/WebSocketConnection.js:323:40
at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
And indeed, I see on receiving a message_text
event, which is of type json
or text(=default case)
, there is no data variable defined currently:
https://github.com/codmpm/node-red-contrib-loxone/blob/master/loxone/loxone.js#L213
and
https://github.com/codmpm/node-red-contrib-loxone/blob/master/loxone/loxone.js#L262
which was before:
node-red-contrib-loxone/loxone/loxone.js
Line 126 in 3acab1a
This data structure should be re-introduced in the handling of a message_text
(or at least handled differently):
var data = { type: message.type };
Thanks!
I have updated node red to version 1.0.3 and loxone node to 0.10.5. by that I have lost connection in all loxone nodes. Tried to recreate the connection but it could not get the structure file. Only if I pull in a new node the structure file is received. When I deploy all nodes loose connection again.
when running node-red-log i receive following error when picking a miniserver node
TypeError: Cannot read property 'active' of null
at /root/.node-red/node_modules/node-red-contrib-loxone/loxone/loxone.js:24:24
at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/usr/lib/node_modules/node-red/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
at /usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:335:12)
at next (/usr/lib/node_modules/node-red/node_modules/express/lib/router/index.js:275:10)
at expressInit (/usr/lib/node_modules/node-red/node_modules/express/lib/middleware/init.js:40:5)
at Layer.handle [as handle_request] (/usr/lib/node_modules/node-red/node_modules/express/lib/router/layer.js:95:5)
Hi,
I am sorry for submitting an "issue". I would like to kindly ask for flow of bi-directional analog in.
I have bought German product call ConBee from Dresden electronic, which has wonderfull ZigBee capabilities and also Deconz NodeRed contrib.
However I am wondering how to link loxone and HUE bulbs with Deconz in nodered (https://github.com/andreypopov/node-red-contrib-deconz)
thx
Jakub
I guess, the topic is clear enoughh :-)
Nach dem Update des Miniservers auf Version 11 wird keine Verbindung mehr aufgebaut.
CONTROL IN und CONTROL OUT haben beide den Status CONNECTION CLOSED, nach ca. 3 Sekunden geht der Status kurz auf CONNECTED und danach wieder auf CONNECTION CLOSED.
Dieser Vorgang wiederholt sich permanent.
sudo service nodered status ergibt folgendes:
Websocket Connection closed: 1007 Invalid UTF-8 Data Received
nodeJS v10.20.1
node-red v1.0.6
node-red-contrib-loxone 0.10.6
Danke
tis error is thrown during installation:
ERR! git clone [email protected]:github:codm/node-lox-ws-api
Loxone firmware 11.1.9.14
Nodered 1.2.2
Loxone contrib 11.1.9.14
Do have two loxone "control in" (buttons in lox config) which controlling two zigbee2mqtt components "out" for danalock (lock / unlock)
When restarting loxone miniserver, or restart Nodered (restart flows), both loxone "control in's* generate payloads (firstly for "unlock", one sec after "lock". It means each lost/renew comunication between loxone and nodered automatically activate all loxone "control in" - in my case, restart open door :)
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.