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
[ipcamera] ONVIF discovery uses only the first listed network interface #9023
Comments
Yes the binding uses the selected interface in other areas of the binding so it can be done easily, see the class IpCameraHandlerFactory and how it uses NetworkAddressService. Your correct the discovery does not use this method, although I like the idea of sending it to all interfaces as the code already listens for replies back on all interfaces. I have been wondering why some people have mentioned discovery does not work for them, and this is probably the reason why so thanks for raising this. Actually it really does not matter much as the only thing that gets discovered is the IP and onvif port of the camera, if you manually add the camera with the UI and give these then you wont miss out on anything as the rest of the discovery is done when the camera actually connects after the thing is already created. |
I made some changes, but I can not test them as none of my devices have multiple networks. Can you test please? Changes made can be seen here. It will scan on all NICs and also use the discovery packet change you suggested which finds all my cameras here. |
Thanks, I cannot test right now as all my cameras are "in production", but I ordered I new one and will test when it arrives. Anyway, the issue is closed, so I think it will work ;) |
Using 2.5.10.
I have several network interfaces on my system, and the camera happens not to be on the first one, so I can only use discovery by disabling other interfaces. I might also end up having cameras on different interfaces (wired and Wifi).
Looking into the binding code, I seem to understand the discovery only uses the first available IP interface.
Would it be possible to use the primary interface defined in Openhab configuration if defined, instead of the first listed one?
At a second stage, would it be possible to launch discovery on all available interfaces?
I would be happy to help with code, but I do not have a develpment set-up so not easy for me to compile / test / commit binding code
The text was updated successfully, but these errors were encountered: