estbeetoo / node-red-contrib-knx

Other
12 stars 10 forks source link

Can't setup connection properly #6

Closed pakerfeldt closed 8 years ago

pakerfeldt commented 8 years ago

I have installed the node-red plugin from the master branch but I have multiple issues.

At one point I was able to get it to connect and receive incoming telegrams just fine. However, after a few seconds it claimed to lose connection and tries to reconnect.

KnxReceiverTunneling: Received connection state response - No active connection with channel ID 0 udp sent, err[no_err] connection stale, so disconnect and then try to reconnect again

But after that I seem to have two listeners since I now get to messages in the node-red flow for each telegram. From here on, I still see the same reconnection attempts in the log, however, the listeners never seem to increase above 2.

Now, after removing all Controllers in node-red and trying to start over it's even more confusing. It connects but I can only receive one certain datagram: { "topic": "knx:event", "payload": { "srcphy": "1.1.80", "dstgad": "4/1/15", "dpt": "no_dpt", "value": "0", "type": "event" }, "_msgid": "f9c1020f.063f" }. However, after adding debug logs to knx.js I see ProcessDatagram logs for all messages. But they don't seem to come through. And then, also, I get a whole bunch of cannot connect to knxjs server messages.

I'm so confused as how to get this plugin to properly connect to my KNX interface. I have two interfaces, one KNX Gateway/Router and one Eibport. I have tried both.

pakerfeldt commented 8 years ago

I just removed all the KNX Controllers and nodes from my node-red flow and deployed. But it still tries to talk with my KNX interface...

aborovsky commented 8 years ago

Second comment is separate bug, i've created it: https://github.com/estbeetoo/node-red-contrib-knx/issues/7

aborovsky commented 8 years ago

About first issue (the main) it loosing connection to KNX gateway which one is working well? Each time, after few seconds?

pakerfeldt commented 8 years ago

I know, it's the kind of issue that's horrible to try to re-produce. Actually I think I have three issues. Let me try to phrase them all:

  1. 7 - You seem to be on it.

  2. I only see one certain datagrams coming through to node-red.
  3. It claims to lose connection, even though it still receives (some) datagrams. This happens pretty quick, usually 5-10 seconds after connection was established. After that, it reconnects and now I start getting two messages for each incoming datagram. Seems to be two KNX connections.

I have tried with a EIBMarkt KNX/IP Router interface and the BAB Technologie Eibport.

When I have some more time I can try to write a real simple node app which uses the KNX.js to just listen to incoming messages to try to pin point where the issue is. It feels some of the issues is more related to that library than the node-red plugin itself.

aborovsky commented 8 years ago

About third trouble: when you able to reproduce, please check: how many KNX controller nodes do you have if one take a look at configuration tab in Node-RED UI? Ср, 11 мая 2016 г. в 12:30, Patrik Åkerfeldt notifications@github.com:

I know, it's the kind of issue that's horrible to try to re-produce. Actually I think I have three issues. Let me try to phrase them all:

  1. 7 https://github.com/estbeetoo/node-red-contrib-knx/issues/7 -

    You seem to be on it.

  2. I only see one certain datagrams coming through to node-red.
  3. It claims to lose connection, even though it still receives (some) datagrams. This happens pretty quick, usually 5-10 seconds after connection was established. After that, it reconnects and now I start getting two messages for each incoming datagram. Seems to be two KNX connections.

I have tried with a EIBMarkt KNX/IP Router interface and the BAB Technologie Eibport.

When I have some more time I can try to write a real simple node app which uses the KNX.js to just listen to incoming messages to try to pin point where the issue is. It feels some of the issues is more related to that library than the node-red plugin itself.

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/estbeetoo/node-red-contrib-knx/issues/6#issuecomment-218408547

[image: BeeToo] http://beetoo.me/ Когда умный дом по-настоящему умный Александр Боровский, Технический директор Alexander Borovsky, CTO, Co-Founder +7-926-0-945-00 <+7926094500> +7-499-391-33-62 <+74993913362>aborovsky@beetoo.me http://beetoo.me

Oggerschummer commented 8 years ago

Just want to add that I face a similar problem. My knx node (input) stops working after some (yet undefined) time, it claims that it is no longer connected. Somehow it looks as if it is not properly reconnecting in case the connection goes down. I´ve set up a doorbell with it (knx binary input to mqtt and local audio player), but currently it is not working as the connection is not reliable.

Everything is running on a Raspberry PI3 (like a charm, except the knx node). I see a single (global) configuration node in node RED.

My Interface is a Weinzierl 730

If I change the knx-controller node, redeploy, change it back and redeploy again it immediately reconnects and works like a charm.

Hope this helps to narrow it down somehow.

ykornilov commented 8 years ago

Hi, Tom! Thank you for your description of the problem. We will carry out testing in the office at the gateway BAOS 771

2016-05-25 17:35 GMT+03:00 Tom notifications@github.com:

Just want to add that I face a similar problem. My knx node (input) stops working after some (yet undefined) time, it claims that it is no longer connected. Somehow it looks as if it is not properly reconnecting in case the connection goes down. I´ve set up a doorbell with it (knx binary input to mqtt and local audio player), but currently it is not working as the connection is not reliable.

Everything is running on a Raspberry PI3 (like a charm, except the knx node). I see a single (global) configuration node in node RED.

My Interface is a Weinzierl 730 http://www.weinzierl.de/index.php/de/alles-knx1/knx-devices/knx-ip-interface-730

If I change the knx-controller node, redeploy, change it back and redeploy again it immediately reconnects and works like a charm.

Hope this helps to narrow it down somehow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/estbeetoo/node-red-contrib-knx/issues/6#issuecomment-221595742

fprisse commented 8 years ago

I am encountering exact same problems, running the iothing image on raspberry and using an ABB IP interface IPS/S 2.1

looking forward to further developments

KR Florent Prisse

aborovsky commented 8 years ago

Guys, may I ask you to help us to reveal the problem?

We need debug output when the problem occurs.

How to turn on the debug?

Go to your node_modules dir (local or global, depend on how did you install node-red-contrib-knx). And try to find knx.js package.

If you've installed it locally, node_modules placed in the node-red's directory:

/bla/bla/node-red/node_modules/knx.js

If you've installed it globally: node_modules placed under the user home directory: ~/.npm/node_modules/knx.js

or in linux libs directory: /usr/local/lib/node_modules/knx.js or: /usr/lib/node_modules/knx.js

Inside of knx.js, edit file 'knx.js/src/KnxConnection.js'. Find function KnxConnection, add to line 42:

this.debug = true;

Run node-red to collect the log

Then restart your node-red writing to the log file: $ node-red > knxjs_debug.log

fprisse commented 8 years ago

Deze Alexander, thank you for your prompt reply!

I Will do as asked as soon as i home again, this weekend.

Looking forward to making this work KR

Met grote groet,

Florent Prisse +31 6 2506 8802

On 1 jun. 2016, at 21:47, Alexander Borovsky notifications@github.com wrote:

Guys, may I ask you to help us to reveal the problem?

We need debug output when the problem occurs.

How to turn on the debug?

Go to your node_modules dir (local or global, depend on how did you install node-red-contrib-knx). And try to find knx.js package.

If you've installed it locally, node_modules placed in the node-red's directory:

/bla/bla/node-red/node_modules/knx.js

If you've installed it globally: node_modules placed under the user home directory: ~/.npm/node_modules/knx.js

or in linux libs directory: /usr/local/lib/node_modules/knx.js or: /usr/lib/node_modules/knx.js

Inside of knx.js, edit file 'knx.js/src/KnxConnection.js'. Find function KnxConnection, add to line 42:

this.debug = true;

Run node-red to collect the log

Then restart your node-red writing to the log file: $ node-red > knxjs_debug.log

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ykornilov commented 8 years ago

Closed with 873debc

jo3ran commented 5 years ago

Hi guys,

thank you very much for your cool node to connect to KNX. Unfortunately I'm still encountering the described error, using a ABS IPS/S3.1.1 interface: KNX connection disconnects at a non-reproducable moment in time. If I redploy (by simply moving a node in the NR ui) the connection is up again. I've also added a node that performs a cyclic 'read' to keep the connection open, which didn't help at all.

Would you still prefer me to debug in the described fashion:

Guys, may I ask you to help us to reveal the problem?

We need debug output when the problem occurs.

How to turn on the debug?

Go to your node_modules dir (local or global, depend on how did you install node-red-contrib-knx). And try to find knx.js package.

If you've installed it locally, node_modules placed in the node-red's directory:

/bla/bla/node-red/node_modules/knx.js

If you've installed it globally: node_modules placed under the user home directory: ~/.npm/node_modules/knx.js

or in linux libs directory: /usr/local/lib/node_modules/knx.js or: /usr/lib/node_modules/knx.js

Inside of knx.js, edit file 'knx.js/src/KnxConnection.js'. Find function KnxConnection, add to line 42:

this.debug = true;

Run node-red to collect the log

Then restart your node-red writing to the log file: $ node-red > knxjs_debug.log

Thank you