-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to choose which interface to search on? #31
Comments
I never tried on VM but I think you can connect manually. and searching is not working properly (There are many issues on camera side. even if you didn't use VM |
You could try the attached patch, attempts do a discovery on each interface in turn. For me (Xubuntu) this doesn't work as it return all the interfaces with the same IP. This 'glitch' is noted here: Netdisco (https://github.com/home-assistant/netdisco) finds all camera attached on multiple interfaces, using 'netifaces'. But not sure we want to put added requirements on the code. |
Had the same issue. pysony wasn't able to find the camera until I told it to broadcast on the right network interface with the diff --git a/src/pysony.py b/src/pysony.py
index 6e7d845..931e812 100755
--- a/src/pysony.py
+++ b/src/pysony.py
@@ -44,6 +44,7 @@ class ControlPoint(object):
sock.settimeout(0.1)
# Set the socket to broadcast mode.
sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
+ sock.bind(('10.0.1.1', 0))
self._udp_socket = sock
def close(self):
|
Hello,
I'm running VirtualBox sharing USB WIFI-dongle as Bridged Adapter from Windows. My virtualbox seems to have two network cards.
Also when running on Raspberry PI I have 3 network cards (1 wired and 2 WIFI).
By default dump_camera_capabilities.py does not find any camera. I need to modify __bind_sockets() and add .bind() to choose which interface should be searched. Like this:
192.168.122.178 is IP which I get from camera.
Is there a way to search all interfaces and select which camera should be used?
I guess there may be several cameras found on different interfaces.
The text was updated successfully, but these errors were encountered: