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

Use config name instead of Cardinal #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Finally, to start the virtual Onvif devices run:
node main.js ./config.yaml
```

Your Virtual Onvif Devices should now automatically show up for adoption in Unifi Protect as "Onvif Cardinal" device. The username and password are the same as on the real Onvif device.
Your Virtual Onvif Devices should now automatically show up for adoption in Unifi Protect as the name specified in the config. The username and password are the same as on the real Onvif device.


# Docker
Expand Down
4 changes: 2 additions & 2 deletions src/onvif-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class OnvifServer {
GetDeviceInformation: (args) => {
return {
Manufacturer: 'Onvif',
Model: 'Cardinal',
Model: `${this.config.name}`,
FirmwareVersion: '1.0.0',
SerialNumber: `${this.config.name.replace(' ', '_')}-0000`,
HardwareId: `${this.config.name.replace(' ', '_')}-1001`
Expand Down Expand Up @@ -408,7 +408,7 @@ class OnvifServer {
onvif://www.onvif.org/type/video_encoder
onvif://www.onvif.org/type/ptz
onvif://www.onvif.org/hardware/Onvif
onvif://www.onvif.org/name/Cardinal
onvif://www.onvif.org/name/${this.config.name}
onvif://www.onvif.org/location/
</d:Scopes>
<d:XAddrs>http://${this.config.hostname}:${this.config.ports.server}/onvif/device_service</d:XAddrs>
Expand Down