FluBBaOfWard / openhab-addons

Add-ons for openHAB
Eclipse Public License 2.0
4 stars 2 forks source link

Configuration entry for network interface to use when sending ps4 wake packet #4

Closed aguiswite closed 4 years ago

aguiswite commented 4 years ago

My OpenHAB instance has 2 network interfaces. It appears the the server and ps4 must both be on the same subnet for the wake packet to send successfully. I configured OpenHAB to use interface A as my primary address in the system settings because that subnet is where the majority of IoT devices exist. However, my PS4 exists on a different subnet which is accessible via network interface B. The playstation binding is sending the wake packet on interface A when it should be sending on interface B instead. I think the solution should be as easy as passing the bound socket address (from Thing config entry) into the DatagramSocket constructor.

FluBBaOfWard commented 4 years ago

It seems the DatagramSocket constructor wants the local IP of the network interface, so maybe the best/easiest way is to make a new config for outbound IP. Is that a good enough solution?

aguiswite commented 4 years ago

Yes, that is exactly what I need. An outbound IP configuration will be perfect. Thanks @FluBBaOfWard!

FluBBaOfWard commented 4 years ago

Here is a test version with config for outboundIP. If that works for you I will make a real release of it. org.openhab.binding.playstation-2.5.6-SNAPSHOT.jar.zip

aguiswite commented 4 years ago

The updated binding worked for me on the first try. Thank you for adding this feature.