openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

[ekey] listen to udp6 instead of udp only #5815

Open hsteppke opened 5 years ago

hsteppke commented 5 years ago

Expected Behavior

Taken the CV LAN Modul from ekey sends in ipv4 only the binding should listen to udpv4 sockets but it rather starts listen on udpv6 only. I did verified it using "netstat -plunt" and there i see it only listen to the port i have given in the udp6 part only.

I suggest to change: openhab1-addons/bundles/binding/org.openhab.binding.ekey/src/main/java/org/openhab/binding/ekey/internal/EKeyPacketReceiver.java Line 82 try { // create socket socket = new DatagramSocket(port); } catch (SocketException e) { e.printStackTrace(); }

Possible Solution

uses DatagramSocket(int port, InetAddress laddr) with a local IPv4 Addre

Your Environment

openhabianpi

9037568 commented 5 years ago

You're going to have to be a whole lot more clear. I have no clue what this is requesting.