dufourgilles / knx-ip

KNX IP Gateway protocol implementation
30 stars 9 forks source link

How can I connect to KNX Virtual? #9

Closed mortiy closed 3 years ago

mortiy commented 3 years ago

I'm trying to connect to KNX Virtual setup via: knxClient.startDiscovery("127.0.0.1");, but getting this error:

Error: send ENETUNREACH 224.0.23.12:3671
    at doSend (dgram.js:683:16)
    at defaultTriggerAsyncIdScope (internal/async_hooks.js:351:12)
    at afterDns (dgram.js:629:5)
    at processTicksAndRejections (internal/process/task_queues.js:85:21) {
  errno: 'ENETUNREACH',
  code: 'ENETUNREACH',
  syscall: 'send',
  address: '224.0.23.12',
  port: 3671
}

Anyone was lucky enough to make this work?

dufourgilles commented 3 years ago

Why did you pick the loopback IP ? Seems like we can't send multicast message on the loopback. Can you try with a physical interface ?

mortiy commented 3 years ago

Yes, physical interface IP helped. Thanks.

Why did you pick the loopback IP ? I was just following the IP address from here. image

dufourgilles commented 3 years ago

OK. Good to know. Just in case, as you know the IP and port, you can skip the discovery part and just open the tunnel immediately.

dufourgilles commented 3 years ago

BTW. Didn't know there was a KNX Virtual App. I did request it and I'm going to start testing. Also, I developed this KNX-IP lib because I use it in a bigger project that includes a server to control, monitor, ... entire house. All in Typescript. And I use it for my own house since last year. It controls all the blinds, records all the sensor info and graphs them, ... I will publish a free version of the backend server in the near future with possibility to buy the GUI