Giter Club home page Giter Club logo

Comments (15)

codmpm avatar codmpm commented on August 17, 2024 1

Ahh, now I got you. Thanks.

As I have work to do on fixing #28, I will also have a look into this.
But it's end of the year and work is demanding it's time.

I will get back here....

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024 1

Sure, my issue is nothing urgent, it's something pretty easy to live with (simply restart nodered or redeploy flow, causing a restart of the plugin).
Let me know if you need anything else

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024

Had a look at node-red-log. Looks like the structure file download is not happening...

3 Dec 17:22:34 - [info] [loxone-miniserver:a6b98b51.f5ee5] Miniserver connected (192.168.20.244:80) using Token-Enc
3 Dec 17:22:36 - [info] [loxone-miniserver:a6b98b51.f5ee5] got structure file 2019-12-03 17:21:49
5 Dec 13:17:36 - [info] [loxone-miniserver:a6b98b51.f5ee5] connection closed

... lot of connection closed messages

5 Dec 13:18:14 - [info] [loxone-miniserver:a6b98b51.f5ee5] connection closed
5 Dec 13:18:16 - [info] [loxone-miniserver:a6b98b51.f5ee5] Miniserver connected (192.168.20.244:80) using Token-Enc

But there's no structure file download at the end. If I manually restart nodered, it returns back to normal:

5 Dec 13:20:02 - [info] Stopping flows
5 Dec 13:20:02 - [info] [mqtt-broker:605c7a1e.feaf14] Disconnected from broker: mqtt://localhost:1883
5 Dec 13:20:03 - [info] [loxone-miniserver:a6b98b51.f5ee5] connection closed
5 Dec 13:20:03 - [info] Stopped flows
5 Dec 13:20:03 - [info] Starting flows
5 Dec 13:20:03 - [info] Started flows
5 Dec 13:20:03 - [info] [mqtt-broker:605c7a1e.feaf14] Connected to broker: mqtt://localhost:1883
5 Dec 13:20:03 - [info] [loxone-miniserver:a6b98b51.f5ee5] Miniserver connected (192.168.20.244:80) using Token-Enc
5 Dec 13:20:03 - [info] [loxone-miniserver:a6b98b51.f5ee5] got structure file 2019-12-05 13:17:29

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

Hey @andrasg,

first time seeing this. We currently only have a problem with #28.
What node-red, nodeJS and Miniserver version are you on?

Cheers

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024

Hey, I am on 10.3.11.25 but have been seeing this on the previous major version as well.

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

Ok. Can someone countercheck on his installation? I can not reproduce this here..

node-red 1.0.3
nodeJS v10.17.0
miniserver 10.3 (2019.11.24)

0|node-red | 5 Dec 13:48:09 - [info] Flows starten
0|node-red | 5 Dec 13:48:09 - [info] Flows gestartet
0|node-red | 5 Dec 13:48:09 - [info] Server wird jetzt auf http://127.0.0.1:1880/ ausgeführt.
0|node-red | 5 Dec 13:48:09 - [info] [loxone-miniserver:3caea919.f2d03e] Miniserver connected (nodelox.codm.de:80) using Token-Enc
0|node-red | 5 Dec 13:48:10 - [info] [loxone-miniserver:3caea919.f2d03e] got structure file 2019-11-27 17:34:40

control-in working:

Bildschirmfoto 2019-12-05 um 13 50 12

@andrasg: Did you try a full deploy? Could give some more info about your environment?

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

@andrasg: the connection got closed two days after the structure file was downloaded

3 Dec 17:22:36 - [info] [loxone-miniserver:a6b98b51.f5ee5] got structure file 2019-12-03 17:21:49
5 Dec 13:17:36 - [info] [loxone-miniserver:a6b98b51.f5ee5] connection closed

Currently I suspect something in your network and node-red-contrib-loxone not handling the disconnect correctly. Could you use an online-node to check over some time?

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024

Yes, I rebooted the miniserver on the 3rd, that's totally fine. Then I have made a program change on the miniserver on the 5th, hence the Miniserver closed the connection. This is fine as well.
node-red-contrib-loxone tried reconnecting (while the Miniserver was rebooting), and seemingly succeeded the connection but there were no events emitted by nodes.
The only thing unusual I have noticed was that there was no structure file after the download.

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024

@codmpm, so to sum up, my problem is not with the connection close (which is okay, as there is Miniserver programming happening) but what happens after the reconnection once the Miniserver becomes available again.

Once I "fix" the situation by restarting nodered or simply redeploying the flow, the flow works without issues for longer periods (has been running for 6 months without issue).

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024

Did you try a full deploy? Could give some more info about your environment?

Yes, redeploying the nodered flow solves the issue, that's usually how I fix this:

  1. program miniserver
  2. redeploy nodered flow

Nodered: v0.20.5
NodeJS: v12.13.1
Miniserver: 10.3.11.25

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

Please test this with 0.10.3

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024

Please test this with 0.10.3

It doesn't seem to find the forked node-lox-ws-api package:

14 Dec 13:43:53 - [warn] [node-red-contrib-loxone/loxone] Error: Cannot find module 'node-lox-ws-api'
Require stack:
- /home/pi/.node-red/node_modules/node-red-contrib-loxone/loxone/loxone.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/loader.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/registry/lib/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/index.js
- /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/index.js
- /usr/lib/node_modules/node-red/lib/red.js
- /usr/lib/node_modules/node-red/red.js

and then sitting and waiting here:

14 Dec 13:43:53 - [info] Waiting for missing types to be registered:
14 Dec 13:43:53 - [info]  - loxone-miniserver
14 Dec 13:43:53 - [info]  - loxone-control-out
14 Dec 13:43:53 - [info]  - loxone-control-in
14 Dec 13:43:53 - [info]  - loxone-online

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

Sorry, had a mistake in package.json referencing my local development directory. Fixed in 2ad9c22 / 0.10.4

Please test again.
If you get permission denied while installing 0.10.4 please delete node-lox-ws-api from node_modules and install again. It's a leftover symlink from the reference to my local development node-lox-ws-api.
rm ~/.node-red/node_modules/node-lox-ws-api

from node-red-contrib-loxone.

andrasg avatar andrasg commented on August 17, 2024

Looks better. I wasn't able to repro the issue after numerous Loxone programming cycles.

Looking at the forked node-lox-ws-api, I don't see any nodered specifics. Would make sense to PR it back to upstream...

from node-red-contrib-loxone.

codmpm avatar codmpm commented on August 17, 2024

Thought about filing a pull request... but @alladdin, the maintainer of node-lox-ws-api, did not react to any of my efforts to contact him.

I did not change anything inside node-lox-ws-api except more information on connection closing.

On the other hand in node-red-contrib-loxone there was no direct change, that could affect your problem.
The connection status "connected" is now set after the succesfull authentification and not directly after the connect when the authentification to the miniserver is not done, yet. So, this could maybe have solved your problem.

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.