Supergiovane / node-red-contrib-knx-ultimate

Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer.
https://youtu.be/egRbR_KwP9I
MIT License
141 stars 34 forks source link

PM.368 KNXUltimate-KNXEngine: Multicast: cannot add membership (Error: addMembership EINVAL #366

Closed EugenElephant closed 2 weeks ago

EugenElephant commented 2 weeks ago

Dear Supergiovane, thank you very much for maintaining the repository for the knx fans.

Describe the bug I'm trying to connect to my KNX system from the node red the node seems to be in a endless cycle trying to reconnect all the time. The log output is:

physAddr: '15.15.245', connectionKeepAliveTimeout: 60, ipAddr: '192.168.178.30', ipPort: 3671, hostProtocol: 'Multicast', isSecureKNXEnabled: false, suppress_ack_ldatareq: false, loglevel: 'trace', localEchoInTunneling: false, localIPAddress: '192.168.178.63', interface: '', jKNXSecureKeyring: null, localSocketAddress: undefined } [error] 6/30/2024, 3:54:05 PM.361 KNXUltimate-KNXEngine: Multicast: cannot add membership (Error: addMembership EINVAL at Socket.addMembership (node:dgram:863:11) at Socket. (/data/node_modules/knxultimate/build/KNXClient.js:197:28) at Socket.onListening (node:dgram:259:7) at Socket.emit (node:events:532:35) at Socket.emit (node:domain:488:12) at startListening (node:dgram:182:10) at node:dgram:373:7 at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -22, code: 'EINVAL', syscall: 'addMembership' }) [error] 6/30/2024, 3:54:05 PM.362 knxUltimate-config: received KNXClientEvents.error: addMembership EINVAL [debug] 6/30/2024, 3:54:05 PM.363 KNXUltimate-KNXEngine: KNXClient: into Disconnect(), channel id is not defined so skip disconnect packet and close socket [error] 6/30/2024, 3:54:05 PM.363 knxUltimate-config: Disconnected by: addMembership EINVAL [info] 6/30/2024, 3:54:13 PM.362 KNXUltimate-config: Bind KNX Bus to interface (Auto). Node KNX Gateway [trace] 6/30/2024, 3:54:13 PM.363 KNXUltimate-KNXEngine: ipAddressHelper.js: getLocalAddress: getting interfaces [debug] 6/30/2024, 3:54:13 PM.363 KNXUltimate-KNXEngine: ipAddressHelper.js: parsing interface: lo ({"address":"127.0.0.1","netmask":"255.0.0.0","family":"IPv4","mac":"00:00:00:00:00:00","internal":true,"cidr":"127.0.0.1/8"}) [trace] 6/30/2024, 3:54:13 PM.364 KNXUltimate-KNXEngine: ipAddressHelper.js: Found NOT suitable interface: lo ({"address":"127.0.0.1","netmask":"255.0.0.0","family":"IPv4","mac":"00:00:00:00:00:00","internal":true,"cidr":"127.0.0.1/8"}) [debug] 6/30/2024, 3:54:13 PM.364 KNXUltimate-KNXEngine: ipAddressHelper.js: parsing interface: lo ({"address":"::1","netmask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff","family":"IPv6","mac":"00:00:00:00:00:00","internal":true,"cidr":"::1/128","scopeid":0}) [trace] 6/30/2024, 3:54:13 PM.364 KNXUltimate-KNXEngine: ipAddressHelper.js: Found NOT suitable interface: lo ({"address":"::1","netmask":"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff","family":"IPv6","mac":"00:00:00:00:00:00","internal":true,"cidr":"::1/128","scopeid":0}) [debug] 6/30/2024, 3:54:13 PM.364 KNXUltimate-KNXEngine: ipAddressHelper.js: parsing interface: eth0 ({"address":"192.168.178.63","netmask":"255.255.255.0","family":"IPv4","mac":"00:11:32:90:2e:6c","internal":false,"cidr":"192.168.178.63/24"}) [trace] 6/30/2024, 3:54:13 PM.365 KNXUltimate-KNXEngine: ipAddressHelper.js: Found suitable interface: eth0 ({"address":"192.168.178.63","netmask":"255.255.255.0","family":"IPv4","mac":"00:11:32:90:2e:6c","internal":false,"cidr":"192.168.178.63/24"}) [debug] 6/30/2024, 3:54:13 PM.365 KNXUltimate-KNXEngine: ipAddressHelper.js: parsing interface: eth0 ({"address":"2003:d6:473b:2800:211:32ff:fe90:2e6c","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"00:11:32:90:2e:6c","internal":false,"cidr":"2003:d6:473b:2800:211:32ff:fe90:2e6c/64","scopeid":0}) [trace] 6/30/2024, 3:54:13 PM.366 KNXUltimate-KNXEngine: ipAddressHelper.js: Found NOT suitable interface: eth0 ({"address":"2003:d6:473b:2800:211:32ff:fe90:2e6c","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"00:11:32:90:2e:6c","internal":false,"cidr":"2003:d6:473b:2800:211:32ff:fe90:2e6c/64","scopeid":0}) [debug] 6/30/2024, 3:54:13 PM.366 KNXUltimate-KNXEngine: ipAddressHelper.js: parsing interface: eth0 ({"address":"fe80::211:32ff:fe90:2e6c","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"00:11:32:90:2e:6c","internal":false,"cidr":"fe80::211:32ff:fe90:2e6c/64","scopeid":3}) [trace] 6/30/2024, 3:54:13 PM.366 KNXUltimate-KNXEngine: ipAddressHelper.js: Found NOT suitable interface: eth0 ({"address":"fe80::211:32ff:fe90:2e6c","netmask":"ffff:ffff:ffff:ffff::","family":"IPv6","mac":"00:11:32:90:2e:6c","internal":false,"cidr":"fe80::211:32ff:fe90:2e6c/64","scopeid":3}) [info] 6/30/2024, 3:54:13 PM.366 knxUltimate-config: perform websocket connection on KNX Gateway [info] 6/30/2024, 3:54:13 PM.367 KNXUltimate-config: Connecting... KNX Gateway [info] 6/30/2024, 3:54:13 PM.367 knxUltimate-config: Connected to { physAddr: '15.15.245', connectionKeepAliveTimeout: 60, ipAddr: '192.168.178.30', ipPort: 3671, hostProtocol: 'Multicast', isSecureKNXEnabled: false, suppress_ack_ldatareq: false, loglevel: 'trace', localEchoInTunneling: false, localIPAddress: '192.168.178.63', interface: '', jKNXSecureKeyring: null, localSocketAddress: undefined } [error] 6/30/2024, 3:54:13 PM.368 KNXUltimate-KNXEngine: Multicast: cannot add membership (Error: addMembership EINVAL at Socket.addMembership (node:dgram:863:11) at Socket. (/data/node_modules/knxultimate/build/KNXClient.js:197:28) at Socket.onListening (node:dgram:259:7) at Socket.emit (node:events:532:35) at Socket.emit (node:domain:488:12) at startListening (node:dgram:182:10) at node:dgram:373:7 at process.processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -22, code: 'EINVAL', syscall: 'addMembership' }) [error] 6/30/2024, 3:54:13 PM.369 knxUltimate-config: received KNXClientEvents.error: addMembership EINVAL

To Reproduce the easiest would be probably to import the configuration to see it:

[ { "id": "3e977ce51a92a4d6", "type": "tab", "label": "Doorbird", "disabled": false, "info": "", "env": [] }, { "id": "6fd0d7755db51555", "type": "knxUltimate", "z": "3e977ce51a92a4d6", "server": "8bfeaac58108cae0", "topic": "30/0/0", "setTopicType": "str", "outputtopic": "", "dpt": "1.001", "initialread": 0, "notifyreadrequest": false, "notifyresponse": false, "notifywrite": true, "notifyreadrequestalsorespondtobus": false, "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0", "listenallga": false, "name": "Tuer", "outputtype": "write", "outputRBE": "false", "inputRBE": "false", "formatmultiplyvalue": 1, "formatnegativevalue": "leave", "formatdecimalsvalue": 999, "passthrough": "no", "x": 630, "y": 780, "wires": [ [] ] }, { "id": "b2e35aacb1fe4bed", "type": "inject", "z": "3e977ce51a92a4d6", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "bool", "x": 430, "y": 780, "wires": [ [ "6fd0d7755db51555" ] ] }, { "id": "8bfeaac58108cae0", "type": "knxUltimate-config", "host": "192.168.178.30", "port": "3671", "physAddr": "15.15.245", "hostProtocol": "Multicast", "suppressACKRequest": false, "csv": "", "KNXEthInterface": "Auto", "KNXEthInterfaceManuallyInput": "eth0", "stopETSImportIfNoDatapoint": "stop", "loglevel": "trace", "name": "KNX Gateway", "localEchoInTunneling": false, "delaybetweentelegrams": "50", "delaybetweentelegramsfurtherdelayREAD": "1", "ignoreTelegramsWithRepeatedFlag": false, "autoReconnect": "yes" } ]

Expected behavior I hope to get it connected to send a switch value into the bus

Screenshots

image image

Knx-Ultimate Version 3.0.0

Are you running node-red behind homematic, docker or anything similar? yes, it runs in the following environment:

Additional context i have read the similar issues here and tried all possible settings, but nothing seems to help. After a lot of try and fail, even my ETS 5 bus monitor stopped connecting saying that there are no free connections any more. After restart of the IP interface it started connecting again. But KNXUltimate still has no connection.

I would appreciate any help or a hint.

Supergiovane commented 2 weeks ago

Hi You choosed “Multicast” on an ip tunnel. Please switch to Tunnel UDP in the gateway config window

Supergiovane commented 2 weeks ago

V. 3.0.1 is out. You can set the protocol to "Auto" :-)

EugenElephant commented 2 weeks ago

thank you very much. The version 3.0.1 with the automatic protocol works perfectly :)