edgexfoundry / device-onvif-camera Goto Github PK
View Code? Open in Web Editor NEWOwner: Device WG
License: Apache License 2.0
Owner: Device WG
License: Apache License 2.0
Summary of the problem:
Not able to enable/disable DHCP with set network interfaces api on Bosch camera
Issue reproducible on below camera models:
Bosch DINION 6000HD
Repro steps:
Summary of the problem:
'Remove Configuration' API not working.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Execute this command to set Set metadata configuration
command -add configuration -
Step #1:
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/AddConfiguration
--header 'Content-Type: application/json'
--data-raw '
{
"AddConfiguration":{
"ProfileToken":"0",
"Name":"Analytics #3",
"Configurations":[
{
"Type":"tt:Viproc",
"Token":"1"
}
]
}
}'
Step #2
Verify with getProfiles command - new configuraiton added sccess fully.
curl -X GET http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/Media2Profiles
Step #3
Command to remove the newly added configuration -
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/RemoveConfiguration\
--header 'Content-Type: application/json'
--data-raw '
{
"RemoveConfiguration": {
"ProfileToken": "0",
"Configurations": [
{
"Type": "tt:Viproc",
"Token": "1"
}
]
}
}'
Executed successfully - but not removed properly verify with GetProfiles command-
What is this client used for? I have been running this service in an environment without core-data and the software stack works just fine.
However, something about the last 4 commits has broken it, as i get an endless stream of errors:
level=WARN ts=2022-05-05T03:47:31.959858833Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:32.961778923Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:33.962877041Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:34.964178535Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:35.965569188Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:36.966632657Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:37.967566331Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:38.968655964Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
level=WARN ts=2022-05-05T03:47:39.969798371Z app=device-onvif-camera source=clients.go:137 msg="unable to Get service endpoint for 'core-data': no matching service endpoint found. retrying..."
I think it may be related to the security hardening PR. The service no longer starts.
Summary of the problem:
'Set Users' API working only if new user through camera web-interface.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Execute this command to set a new user (Note : new user only create through bosch camera web-page login)
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/Users
--header 'Content-Type: application/json'
--data-raw '
{
"Users":{
"Username":"User",
"Password":"Password1123!",
"UserLevel":"User"
}
}'
Expected result: set users api will modify an user successfully
Actual result: - fault code: SOAP-ENV:Receiver ter:Action -500 return code.
Step 13/23 : RUN ${MAKE}
---> Running in 0e1f4ef4bbdb
CGO_ENABLED=1 GO111MODULE=on go build -ldflags "-X github.com/edgexfoundry/device-onvif-camera.Version=0.0.0" -o cmd/device-onvif-camera ./cmd
go: updates to go.mod needed; to update it:
go mod tidy
make: *** [Makefile:19: cmd/device-onvif-camera] Error 1
The command '/bin/sh -c ${MAKE}' returned a non-zero code: 2
Summary of the problem:
Set DNS API not updating camera DNS settings correctly.
Issue reproducible on below camera models:
Geo Vision GV-BX8700
Honeywell HC30WB5R1
Able to enable/disable DHCP on Geo vision and Honeywell cameras, however not able to update IP address with 'DNS Manual"
Not getting any error, but IP address not updated when verified using Get DNS api.
Bosch DINION 6000HD
Enabling/disabling of DHCP not working
Repro steps:
Expected result: User should be able to enable/disable DHCP and updated ip address without any issues.
Actual result: On Geo vision camera it fails to set IP address, and on Bosch camera not able to enable/disable DHCP option.
Summary of the problem:
'Create Rules' API adding multiple times same rule.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Command to create rule
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/CreateRules
--header 'Content-Type: application/json'
--data-raw '
{
"CreateRules": {
"ConfigurationToken": "1",
"Rule": [
{
"Name": "Test1",
"Type": "tt:ObjectInField",
"Parameters": {
"SimpleItem": [
{
"Name": "Armed",
"Value": "true"
}
]
}
}
]
}
}'
Then verify with GetRules command-
curl -x GET GET http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/Rules
Actual result - Adding multiple times same rule.
Executed - Should be create one for same rule.
here
in device-onvif-camera/doc/docker-compose/read.md
at the section Run Security Mode
Enter the command make gen ds-onvif-camera to generate non-secure compose file
should be
Enter the command make gen ds-onvif-camera to generate compose file
the "non-secure " should be delete
The BaseNotificationURL can be retrieved by using net.Interfaces()
.
More detail: #13 (comment)
Summary of the problem:
'Modify Analytics Modules' API not working.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Execute this command to Modify Analytics Modules
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/AnalyticsModules
--header 'Content-Type: application/json'
--data-raw '
{
"AnalyticsModules": {
"ConfigurationToken": "1",
"AnalyticsModule": [
{
"Name": "Viproc",
"Parameters": {
"SimpleItem": [
{
"Name": "Mode",
"Value": "Profile 144"
}
]
}
}
]
}
}'
Actual result - Soap error, 500
Executed - should be successfully modify
edgex-device-onvif-camera | level=INFO ts=2022-03-18T16:37:50.421013331Z app=device-onvif-camera source=async.go:104 msg="Adding discovered device Bosch-DINION IP starlight 6000 HD-00075fc4-23b6-b623-c45f-0700075fc45f to Metadata"
edgex-device-onvif-camera | level=ERROR ts=2022-03-18T16:37:50.423403425Z app=device-onvif-camera source=async.go:120 msg="failed to create discovered device Bosch-DINION IP starlight 6000 HD-00075fc4-23b6-b623-c45f-0700075fc45f: request failed, status code: 400, err: {\"apiVersion\":\"v2\",\"message\":\"*[]requests.AddDeviceRequest json decoding failed\",\"statusCode\":400}\n"
edgex-core-metadata | level=ERROR ts=2022-03-18T16:33:41.762359038Z app=core-metadata source=http.go:47 X-Correlation-ID=5d990b69-0331-44bf-8fed-15f0232bf0f1 msg="*[]requests.AddDeviceRequest json decoding failed -> AddDeviceRequest.Device.Name field only allows unreserved characters which are ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_~"
auto-discovery-docker.md i get an msg below:
level=WARN ts=2022-07-01T07:46:12.894347595Z app=device-onvif-camera source=driver.go:580 msg="netscan discovery was called, but DiscoverySubnets are empty!"
and i found the DiscoverySubnets is empty in configration.toml which is in device-onvif-camera container
and i can not change it because it's read_only
what can i do now?
The API of the device service translates REST/HTTP requests to SOAP/HTTP. The onvif features section of README links to ONVIF specs which document the SOAP API.
Things are straight forward when it comes to GET commands. However, it isn't that easy to figure out the data model of the input.
The only documented example of a SET command is in docs/getting-started-guide.
It took me some time to figure out how to do a RelativeMove. This only became obvious after I accidentally discovered the device-onvif-camera's Postman collection. It would be nice to make that more accessible. I could use that to figure out how to do RelativeMove:
curl -X PUT http://0.0.0.0:59882/api/v2/device/name/tp-link-Tapo-C210-3fa1fe68-b915-4053-a3e1-14ebb69b5003/RelativeMove -H 'Content-Type: application/json' \
-d '{"RelativeMove": {"ProfileToken": "profile_1","Translation": {"PanTilt": {"x": 50,"y": 50}}}}'
which isn't obvious by just looking at the onvif spec:
I think instead of the Postman collection, the service should publish the spec based on the default camera.yaml profile using OpenAPI spec, added to the docs with Swagger UI.
https://github.com/edgexfoundry/device-onvif-camera/tree/main/doc
API specification is not available.
As discussed at today's TSC meeting since the plan is to deprecate the existing device-camera service once this service has been released, we should ensure that this service provides the capability to capture camera snapshots (e.g. see the OnvifSnapshot
device resources in the old service), as otherwise we're not replacing the existing functionality.
Provision watchers placed in a specific directory should be added automatically in a similar way as device-rfid-llrp-go
That way the user does not need to manually add them after startup.
Environment: Ubuntu 20.04 LTS
Please see the full log:
$ make docker
docker build . \
--build-arg http_proxy= \
--build-arg https_proxy= \
--build-arg no_proxy= \
-t edgexfoundry/device-onvif-camera:1194f4c37254434fbe91228c6fb68d2a7544bc72 \
-t edgexfoundry/device-onvif-camera:0.0.1-dev.20-dev
Sending build context to Docker daemon 165.9MB
Step 1/23 : ARG BASE=golang:1.17-alpine3.15
Step 2/23 : FROM ${BASE} AS builder
---> 862d0b7eee94
Step 3/23 : ARG MAKE="make build"
---> Using cache
---> c4da64680ca2
Step 4/23 : ARG ALPINE_PKG_BASE="make git gcc libc-dev zeromq-dev libsodium-dev"
---> Using cache
---> 084c1ba974c1
Step 5/23 : ARG ALPINE_PKG_EXTRA=""
---> Using cache
---> a8512d659cef
Step 6/23 : LABEL Name=edgex-device-onvif-camera
---> Using cache
---> dd57e68fa0e7
Step 7/23 : RUN sed -e 's/dl-cdn[.]alpinelinux.org/nl.alpinelinux.org/g' -i~ /etc/apk/repositories
---> Using cache
---> 93d717721dea
Step 8/23 : RUN apk add --no-cache ${ALPINE_PKG_BASE} ${ALPINE_PKG_EXTRA}
---> Running in def34c0717a2
fetch https://nl.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
fetch https://nl.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
(1/25) Installing libgcc (10.3.1_git20211027-r0)
(2/25) Installing libstdc++ (10.3.1_git20211027-r0)
(3/25) Installing binutils (2.37-r3)
(4/25) Installing libgomp (10.3.1_git20211027-r0)
(5/25) Installing libatomic (10.3.1_git20211027-r0)
(6/25) Installing libgphobos (10.3.1_git20211027-r0)
(7/25) Installing gmp (6.2.1-r1)
(8/25) Installing isl22 (0.22-r0)
(9/25) Installing mpfr4 (4.1.0-r0)
(10/25) Installing mpc1 (1.2.1-r0)
(11/25) Installing gcc (10.3.1_git20211027-r0)
(12/25) Installing brotli-libs (1.0.9-r5)
(13/25) Installing nghttp2-libs (1.46.0-r0)
(14/25) Installing libcurl (7.80.0-r1)
(15/25) Installing expat (2.4.7-r0)
ERROR: libcurl-7.80.0-r1: package mentioned in index not found (try 'apk update')
(16/25) Installing pcre2 (10.40-r0)
(17/25) Installing git (2.34.2-r0)
(18/25) Installing musl-dev (1.2.2-r7)
(19/25) Installing libc-dev (0.7.2-r3)
(20/25) Installing libsodium (1.0.18-r0)
(21/25) Installing pkgconf (1.8.0-r0)
(22/25) Installing libsodium-dev (1.0.18-r0)
(23/25) Installing make (4.3-r0)
(24/25) Installing libzmq (4.3.4-r0)
(25/25) Installing zeromq-dev (4.3.4-r0)
Executing busybox-1.34.1-r5.trigger
1 error; 141 MiB in 39 packages
The command '/bin/sh -c apk add --no-cache ${ALPINE_PKG_BASE} ${ALPINE_PKG_EXTRA}' returned a non-zero code: 1
make: *** [Makefile:37: docker] Error 1
Linter script is currently broken.
Enable linting as per edgex-go.
For security mode (using vault), default command needs to be changed in .env file.
DEFAULT_EDGEX_RUN_CMD_PARMS="/device-onvif-camera --registry --confdir=/res"
Need to update documentation to reflect this
https://github.com/edgexfoundry-holding/device-onvif-camera/blob/main/doc/docker-compose/README.md
device-onvif-camera
and connect it to 10 simulated or real onvif cameras.checkStatuses
callFor me, this took about 44 seconds
when running as stated above. Using multiple goroutines is able to shorten that to about 11 seconds, but still pretty long.
Obviously this will cause issues, as the default time period between checks are 30 seconds, so the code needs to complete before then.
Deployment Environment:
EdgeX Version [REQUIRED]:
Anything else relevant?
Need to change onvif image location in add-device-onvif-camera.yml file.
Currently it has below:
device-onvif-camera:
image: edgex/device-onvif-camera${ARCH}:${DEVICE_ONVIFCAM_VERSION}
It should change to below:
device-onvif-camera:
image: edgexfoundry/device-onvif-camera${ARCH}:${DEVICE_ONVIFCAM_VERSION}
The GetCredentials rety loop is not hooked up with any other signaling to cancel when a SIGINT
or other is sent to the process. This will delay shutdown as either the timer has to run out or the user has to SIGKILL
the process.
level=WARN ts=2022-06-16T21:38:54.879604779Z app=device-onvif-camera source=credentials.go:61 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m32.987007063s"
level=WARN ts=2022-06-16T21:38:55.879965419Z app=device-onvif-camera source=credentials.go:61 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m31.986646081s"
level=WARN ts=2022-06-16T21:38:56.880378244Z app=device-onvif-camera source=credentials.go:61 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m30.986235633s"
^C
level=INFO ts=2022-06-16T21:38:57.799049308Z app=device-onvif-camera source=config.go:318 msg="Watching for 'AppCustom' configuration changes has stopped"
level=INFO ts=2022-06-16T21:38:57.799666781Z app=device-onvif-camera source=messaging.go:88 msg="Disconnected from MessageBus"
level=INFO ts=2022-06-16T21:38:57.799047447Z app=device-onvif-camera source=config.go:467 msg="Watching for '/Writable' configuration changes has stopped"
level=INFO ts=2022-06-16T21:38:57.799768165Z app=device-onvif-camera source=httpserver.go:126 msg="Web server shutting down"
level=ERROR ts=2022-06-16T21:38:57.799842391Z app=device-onvif-camera source=httpserver.go:143 msg="Web server failed: http: Server closed"
level=INFO ts=2022-06-16T21:38:57.801041628Z app=device-onvif-camera source=httpserver.go:128 msg="Web server shut down"
level=WARN ts=2022-06-16T21:38:57.881311693Z app=device-onvif-camera source=credentials.go:61 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m29.985302169s"
level=WARN ts=2022-06-16T21:38:58.882085199Z app=device-onvif-camera source=credentials.go:61 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m28.984519117s"
level=WARN ts=2022-06-16T21:38:59.882383818Z app=device-onvif-camera source=credentials.go:61 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m27.984228452s"
Anything else relevant?
Should probably use similar code to the taskLoop
Put the default pre-defined device and profile paths into the configuration
ProfilesDir = "./res/profiles"
DevicesDir = "./res/devices"
Rename the sample devices and profiles to *.example, such as camera.toml.example and camera.yaml.example
Version API
No
Version API doesn't return the SDK version. Sample responses:
{
"apiVersion": "v2",
"version": "0.0.0",
"serviceName": "device-onvif-camera",
"sdk_version": "0.0.0"
}
The makefile here is missing the setting of the SDK version
https://github.com/edgexfoundry/device-onvif-camera/blob/main/Makefile#L22-L23
That is done here properly:
https://github.com/edgexfoundry/device-rfid-llrp-go/blob/main/Makefile#L21-L23
Note this looks to be an issue will many or all the Go Devices and App services
Deployment Environment:
EdgeX Version [REQUIRED]:
Anything else relevant?
A specific camera profile is referenced for HIKVISION, however that profile does not exist in the profiles directory.
Is this profile still relevant, or should the references be removed?
Summary of the problem:
Not able to update video encoder configuration using 'set video encoder configuration' API
Issue reproducible on below camera models:
Geo Vision GV-BX8700
Bosch DINION 6000HD
Honeywell HC30WB5R1
Repro steps:
Expected result: able to update video encoder configuration values correctly
Actual result: set video encoder configuration api not working as expected.
doc/docker-compose folder
This is no longer needed now that Compose Builder in edgex-compose has been update to included this
Also https://github.com/edgexfoundry/device-onvif-camera/blob/main/doc/auto-discovery-docker.md
needs to be reworked with compose builder in mind.
remove folder and update main README to describe how to use Compose Builder, including any needed Env Overrides or changes in Consul
SDK
Use v2.2.0 version of the device SDK
Why does DisconnectDevice
exist? It does not appear to implement any interface, and it just warns that it is not implemented. Can it be safely removed?
device-onvif-camera/internal/driver/driver.go
Lines 223 to 228 in ca3b9af
Run bin/set-credentials.sh
, select ALL.
Deployment Environment:
EdgeX Version [REQUIRED]:
Anything else relevant?
🛑
I followed : https://github.com/edgexfoundry/device-onvif-camera/blob/main/doc/auto-discovery-docker.md ( i.e. Set Up Auto Discovery with Docker)
When I am running the containers I am getting a error in device-onvif-camera:
level=ERROR ts=2022-05-30T04:13:44.682604091Z app=device-onvif-camera source=init.go:42 msg="Failed to init cache: failed to send a http request -> Get "http://edgex-core-metadata:59881/api/v2/device/service/name/device-onvif-camera?limit=-1&offset=0\": dial tcp: lookup edgex-core-metadata on 192.168.0.1:53: read udp 192.168.0.115:33190->192.168.0.1:53: i/o timeout"
level=INFO ts=2022-05-30T04:13:44.682709107Z app=device-onvif-camera source=bootstrap.go:135 msg="Un-Registering service from the Registry"
AND
I followed: https://github.com/edgexfoundry/device-onvif-camera/blob/main/doc/auto-discovery.md (i.e. Auto Discovery)
When I am running the containers I am getting a error in device-onvif-camera:
level=INFO ts=2022-05-30T04:31:51.942762705Z app=device-onvif-camera source=devices.go:49 msg="Loading pre-defined devices from /res/devices"
level=INFO ts=2022-05-30T04:31:51.943721555Z app=device-onvif-camera source=devices.go:85 msg="Device device-onvif-camera exists, using the existing one"
level=INFO ts=2022-05-30T04:31:51.943814738Z app=device-onvif-camera source=message.go:50 msg="Service dependencies resolved..."
level=INFO ts=2022-05-30T04:31:51.943840422Z app=device-onvif-camera source=message.go:51 msg="Starting device-onvif-camera 0.0.0 "
level=INFO ts=2022-05-30T04:31:51.944104305Z app=device-onvif-camera source=message.go:55 msg="Camera device service started"
level=INFO ts=2022-05-30T04:31:51.944130546Z app=device-onvif-camera source=message.go:58 msg="Service started in: 1.279078281s"
level=INFO ts=2022-05-30T04:31:51.94394255Z app=device-onvif-camera source=autodiscovery.go:51 msg="Starting auto-discovery with duration 10s"
level=DEBUG ts=2022-05-30T04:31:51.944162915Z app=device-onvif-camera source=discovery.go:34 msg="protocol discovery triggered"
route ip+net: no such network interface
level=DEBUG ts=2022-05-30T04:31:52.946479407Z app=device-onvif-camera source=async.go:127 msg="Filtered device addition finished"
level=DEBUG ts=2022-05-30T04:32:02.946596983Z app=device-onvif-camera source=discovery.go:34 msg="protocol discovery triggered"
route ip+net: no such network interface
level=DEBUG ts=2022-05-30T04:32:03.949196507Z app=device-onvif-camera source=async.go:127 msg="Filtered device addition finished"
level=DEBUG ts=2022-05-30T04:32:13.949314222Z app=device-onvif-camera source=discovery.go:34 msg="protocol discovery triggered"
route ip+net: no such network interface
Can someone please help me in resolving the above mentioned errors or what can be the cause of the issue?
Thanks in advance.
Observation
When discovering devices, if the device is password-protected, and the credentials do not match the default credentials, the device will not be added to EdgeX. This is because the GetDeviceInformation
requires authentication.
Problem
Without these devices being added to EdgeX there is no way to assign credentials to them. Thus, currently your solution requires all auto-discovered cameras to share the same username, password, and authentication type (which is bad practice).
Proposed Solution
GetDeviceInformation
, but it is still a valid ONVIF device, it should be added to EdgeX, so that the credentials can be added after the fact.Implement CGO binary hardening as was done for other device services.
Summary of the problem:
'Create Users' API not creating new user.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Execute this command to create a new user (Note : new user only creates through BOSH camera web-page login)
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/CreateUsers
--header 'Content-Type: application/json'
--data-raw '
{
"CreateUsers": {
"User": [
{
"Username": "Test",
"Password" : "Tes123456!",
"UserLevel": "User"
}
]
}
}'
Expected result: Create users api will creates an user successfully
Actual result: - fault code: SOAP-ENV:Receiver ter:Action -500 return code.
Improve the network scan for discover devices
#13 (comment)
This seems to happen when the device service is stuck in a getCredentials retry loop. Even devices which DO have proper authentication are getting 503 errors when being called by the command service. I assume this is due to some sort of blocking or botteneck occurring in the sdk from the getCredentials loop.
i follow getting-started-with-docker-security.md, getting-started-with-docker.md, Run device-onvif-camera with edgex-compose to config device-onvif-camera,the auto discovery can work, but the log has the warn info below
Unable to retrieve camera credentials from SecretProvider at path 'credentials001': No value for the keys: [mode] exists. Retrying for 11.859810351s
i has do secret, like this, the return code is 201 that i think is success, so what can i do now
root@xinyustorage:~# curl --request POST 'http://localhost:59984/api/v2/secret' --header 'Content-Type: application/json' --data-raw '{
"apiVersion":"v2",
"path": "credentials001",
"secretData":[
{
"key":"username",
"value":"admin"
},
{
"key":"password",
"value":"Admin12345"
}
]
}'
{"apiVersion":"v2","statusCode":201}
Default configuration consists of all fixed scopes. In order to execute 'SetScopes', I have tried to create new scope using AddScopes API. However, adding new scope was unsuccessful and camera becomes unresponsive after that. Had to reboot Tapo C200 camera to make it work again.
NOTE: This issue happens randomly, and is not always reproduce-able.
Provision Watcher
{
"provisionwatcher":{
"apiVersion":"v2",
"name":"Test-Provision-Watcher_Emulator",
"adminState":"UNLOCKED",
"identifiers":{
"Manufacturer": "Happytimesoft",
"Model": "IPCamera"
},
"serviceName": "device-onvif-camera",
"profileName": "onvif-camera",
"autoEvents": [
{ "interval": "15s", "sourceName": "Users" }
]
},
"apiVersion":"v2"
}
Panic
level=DEBUG ts=2022-02-17T17:23:55.687729987Z app=device-onvif-camera source=discovery.go:35 msg="protocol discovery triggered"
Onvif WS-Discovery: Find 192.168.0.215:2020
Onvif WS-Discovery: Find 192.168.0.53:5357
Error 192.168.0.53:5357
camera is not available at 192.168.0.53:5357 or it does not support ONVIF services
level=DEBUG ts=2022-02-17T17:23:56.759283954Z app=device-onvif-camera source=onvifclient.go:227 msg="SOAP Request: <tds:GetDeviceInformation></tds:GetDeviceInformation>"
level=DEBUG ts=2022-02-17T17:23:56.789358733Z app=device-onvif-camera source=onvifclient.go:245 msg="SOAP Response: <GetDeviceInformationResponse><Manufacturer>TP-Link</Manufacturer><Model>C200</Model><FirmwareVersion>1.1.16 Build 211209 Rel.37726n(4555)</FirmwareVersion><SerialNumber>00c20000</SerialNumber><HardwareId>1.0</HardwareId></GetDeviceInformationResponse>"
level=DEBUG ts=2022-02-17T17:23:56.789400759Z app=device-onvif-camera source=driver.go:333 msg="Discovered camera from the address '192.168.0.215:2020'"
level=DEBUG ts=2022-02-17T17:23:56.789450723Z app=device-onvif-camera source=async.go:140 msg="Device TP-Link-C200-00c20000's Manufacturer value TP-Link did not match PW identifier: Happytimesoft"
level=DEBUG ts=2022-02-17T17:23:56.789476407Z app=device-onvif-camera source=async.go:127 msg="Filtered device addition finished"
level=DEBUG ts=2022-02-17T17:24:10.68887651Z app=device-onvif-camera source=executor.go:52 msg="AutoEvent - reading Users"
level=DEBUG ts=2022-02-17T17:24:10.688932544Z app=device-onvif-camera source=command.go:127 msg="Application - readDeviceResource: reading deviceResource: Users; X-Correlation-ID: "
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x8efc0e]
goroutine 61 [running]:
github.com/IOTechSystems/device-onvif-camera/internal/driver.(*DeviceClient).callOnvifFunction(0x0, 0xc00058b560, 0x6, 0xc00058b568, 0x8, 0xdf8c70, 0x0, 0x0, 0x0, 0x0, ...)
/device-onvif-camera/internal/driver/onvifclient.go:217 +0x14e
github.com/IOTechSystems/device-onvif-camera/internal/driver.(*DeviceClient).CallOnvifFunction(0x0, 0xc00011c8f7, 0x5, 0xc00009bb30, 0xc00011c910, 0x6, 0xa36b4c, 0xb, 0xdf8c70, 0x0, ...)
/device-onvif-camera/internal/driver/onvifclient.go:143 +0x14b
github.com/IOTechSystems/device-onvif-camera/internal/driver.(*Driver).HandleReadCommands(0xc0003dec00, 0xc000028ac0, 0x1d, 0xc0005122d0, 0xc00009af00, 0x1, 0x1, 0x1, 0x5, 0x0, ...)
/device-onvif-camera/internal/driver/driver.go:146 +0x1ba
github.com/edgexfoundry/device-sdk-go/v2/internal/application.(*CommandProcessor).ReadDeviceResource(0xc00053bba8, 0xc0005159e0, 0xc, 0xc0005159db)
/go/pkg/mod/github.com/edgexfoundry/device-sdk-go/[email protected]/internal/application/command.go:146 +0x55b
github.com/edgexfoundry/device-sdk-go/v2/internal/application.CommandHandler(0x970001, 0x0, 0x0, 0xc0005cdd78, 0x0, 0x0, 0x0, 0xc0003d5620, 0x0, 0x0, ...)
/go/pkg/mod/github.com/edgexfoundry/device-sdk-go/[email protected]/internal/application/command.go:107 +0x59d
github.com/edgexfoundry/device-sdk-go/v2/internal/autoevent.readResource(0xc0000c2190, 0xc0003d5620, 0x16, 0xc0002984f0, 0x1)
/go/pkg/mod/github.com/edgexfoundry/device-sdk-go/[email protected]/internal/autoevent/executor.go:89 +0x1a6
github.com/edgexfoundry/device-sdk-go/v2/internal/autoevent.(*Executor).Run(0xc0000c2190, 0xae8c58, 0xc0003dec40, 0xc000416110, 0xc0000c6070, 0xc0003d5620)
/go/pkg/mod/github.com/edgexfoundry/device-sdk-go/[email protected]/internal/autoevent/executor.go:53 +0x296
created by github.com/edgexfoundry/device-sdk-go/v2/internal/autoevent.(*manager).triggerExecutors
/go/pkg/mod/github.com/edgexfoundry/device-sdk-go/[email protected]/internal/autoevent/manager.go:78 +0x245
On startup, the service attempts to create a device client for each registered device. This causes it to lookup the camera credentials secrets. When the secrets do not exist, it waits up to 2 minutes for them, for each device. This all happens serially and delays the starting of the service.
level=INFO ts=2022-03-29T00:39:55.184382784Z app=device-onvif-camera source=driver.go:86 msg="Initializing device client for '3fa1fe68-b915-4053-a3e1-1027f5ea88f4' camera"
level=WARN ts=2022-03-29T00:39:55.184402418Z app=device-onvif-camera source=driver.go:283 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m59.999998509s"
level=WARN ts=2022-03-29T00:39:56.184607352Z app=device-onvif-camera source=driver.go:283 msg="Unable to retrieve camera credentials from SecretProvider at path '3fa1fe68-b915-4053-a3e1-1027f5ea88f4': Error, path (3fa1fe68-b915-4053-a3e1-1027f5ea88f4) doesn't exist in secret store. Retrying for 1m58.999817495s"
...
level=ERROR ts=2022-03-29T00:41:55.234543205Z app=device-onvif-camera source=driver.go:90 msg="failed to initial device client for '3fa1fe68-b915-4053-a3e1-1027f5ea88f4' camera, skipping this device."
“make run device-onvif-camera” should be “make run -onvif-camera” in auto-discovery-docker.md
Hello
I am trying to setup a video streaming from my mobile to edgex. Following steps have been followed: -
Attaching config files for reference as well as error log from docker desktop. Any help to resolve this will be highly appreciated. Thanks in advance.
config and log.zip
Summary of the problem:
'Set metadata configuration' API not working.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Executed this below command to set-meta data configuration -
curl -C PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/MetadataConfiguration
--header 'Content-Type: application/json'
--data-raw '
{
"MetadataConfiguration": {
"Configuration": {
"Token": "1",
"SessionTimeout": "PT60S"
}
}
}'
Expected result: set users api will set metadata configuration successfully
Actual result: - fault code: SOAP-ENV:Receiver ter:Action -500 return code.
Summary of the problem:
Set scope API deleting all configurable scopes instead of updating scope item.
Issue reproducible on below camera models:
Geo Vision GV-BX8700
Bosch DINION 6000HD
Honeywell HC30WB5R1
Repro steps:
Expected result: all configurable scopes updated correctly with desired scope item mentioned in 'set scopes' command
Actual result: Deletes all configurable scopes
Note: Not getting any error after executing ' set scopes' api, it gives 200/success message.
Summary of the problem:
Set system date and time API not working as expected .
Issue reproducible on below camera models:
Geo Vision GV-BX8700
On Geo Vision camera, NTP enable/disable works correctly but not able to set date manually.
Bosch DINION 6000HD
On Bosch camera, NTP enable/disable does not work and not able to set date manually.
Repro steps:
Expected result: User able to set date NTP settings and set date manually.
Actual result:
On Geo Vision camera, NTP enable/disable works correctly but not able to set date manually.
On Bosch camera, NTP enable/disable does not work and not able to set date manually.
In security mode documentation, need to change omvif image path.
Documentation URL: https://github.com/edgexfoundry-holding/device-onvif-camera/blob/main/doc/auto-discovery-docker.md
For security mode, currently it has below
image: edgex/device-onvif-camera${ARCH}:${DEVICE_ONVIFCAM_VERSION}
it should be change to below:
image: edgexfoundry/device-onvif-camera${ARCH}:${DEVICE_ONVIFCAM_VERSION}
Summary of the problem:
'modify Rule' API not working for same rule if added multiple times.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Execute this command
Step #1
created rule multiple times with same parameter- same rule are added as previous issue report.(issue #35)
Step #2
Modifying the same added rule -
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/Rules
--header 'Content-Type: application/json'
--data-raw '
{
"Rules": {
"ConfigurationToken": "1",
"Rule": [
{
"Name": "Test1",
"Type": "tt:ObjectInField",
"Parameters": {
"SimpleItem": [
{
"Name": "Armed",
"Value": "true"
}
]
}
}
]
}
}
'
Then verify with GetRules command-
curl -x GET GET http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/Rules
Actual result - Not modifying rule, but working if rule is added one time only.
Executed - Should be modifying all same rule added before.
Observation
We have discovered that our Tapo C200
cameras all return the same serial number when queried via GetDeviceInformation
.
We have also learned that the happytime-multi-onvif-server
sets all camera serial numbers to 123456
by default.
Problem
Only 1 device of each type Tapo C200
and happytime
can be added to EdgeX due to name conflicts.
Proposed Solution
Use the Endpoint Reference
as specified in the ONVIF spec. This is available during WS-Discovery:
7.3.1 Endpoint reference
A device or an endpoint that takes the client role should use a URN:UUID [RFC4122] as the address property
of its endpoint reference.The device or an endpoint that takes the client role shall use a stable, globally unique identifier that is constant
across network interfaces as part of its endpoint reference property. The combination of an wsadis:Address
and wsadis:ReferenceProperties provide a stable and globally-unique identifier.
We have indeed confirmed that even when the device IP address changes, the EndpointReference
stays the same, and is unique to all of our cameras.
Summary of the problem:
'Delete Users' API not deleting users.
Issue reproducible on below camera models:
Geo Vision GV-BX8700
Bosch DINION 6000HD
Honeywell HC30WB5R1
Repro steps:
Expected result: Delete users api deletes user successfully
Actual result: Not getting any error after executing delete users api, but its not deleting user.
Summary of the problem:
'Delete Rules' API not working for same rule if added multiple times.
Issue reproducible on below camera models:
#Bosch DINION 6000HD
Reproduce steps:
Execute this command
curl -X PUT http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/DeleteRules
--header 'Content-Type: application/json'
--data-raw '
{
"DeleteRules": {
"ConfigurationToken": "1",
"Rule": [
{
"RuleName": "NEW object"
},
{
"RuleName": "Armed"
}
]
}
}'
Then verify with GetRules command-
curl -x GET GET http://localhost:59882/api/v2/device/name/Bosch-DINION-IP-starlight-6000-HD-00075fd8-7c31-317c-d85f-0700075fd85f/Rules
Actual result - Not deleting rule
Executed - Should be deleted rule
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.