Skip to content
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

Basic ONVIF support #1369

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Basic ONVIF support #1369

wants to merge 13 commits into from

Conversation

mrlt8
Copy link
Owner

@mrlt8 mrlt8 commented Oct 4, 2024

  • ONVIF support - this is still a work in progress, but the bridge can now provide some basic ONVIF functionality. No additional configuration required. You can manually add the bridge to your ONVIF client using:
    • Hostname/IP: Hostname/IP where the container is running
    • Port: Same port as WebUI (Default: 5000)
    • Username (If WB_AUTH enabled): wb
    • Password (If WB_AUTH enabled): API key from the WebUI
  • ONVIF auto discovery can also be enabled, however, some additional configuration is required as WS-Discovery is multicast-based. To enable auto-discovery:
    1. You must run your container with network_mode: host or some networking mode that allows for multicast traffic.
    2. Set WS_DISCOVERY=true to enable the auto-discovery.
    • [Optional] Set ONVIF_URL=mybridge:5050 to change the address that WS-Discovery will advertise.

@iceman3k
Copy link

iceman3k commented Feb 1, 2025

"ONVIF_URL=mybridge:5050"
This option fails to change the advertised onvif port, the accessible port for onvif, or the webui port.

ONVIF_URL -> ONVIF_ADDRS in config.py for environmental variable
ONVIF_ADDRS -> xaddr in onvif.py

Line 41, looks like an array to get an domain or host:port

def get_xaddr():
    xaddr = config.ONVIF_ADDRS or socket.gethostbyname_ex(socket.gethostname())[2][0]
    root, sub = xaddr.partition("/")[::2]
    host, port = root.partition(":")[::2]

Port 5000 hardcoded in frontend.py

Copy link

@iceman3k iceman3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be adding onvif where requried

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants