Comments (15)
I cannot recreate the error by using device-virtual or device-modbus with 2.3.0 or main branch. Could you provide us with the onvif camera setup steps, the profile and the device information?
from device-onvif-camera.
@ajcasagrande, is this with 2.3.0, or the latest WIP 3.0.0 code?
from device-onvif-camera.
@lenny-intel facing this issue with Levski
.
from device-onvif-camera.
@ajcasagrande, is this with 2.3.0, or the latest WIP 3.0.0 code?
Yes this is using levski branch of edgex compose, stock 2.3.0 images (ignore the first usb one):
Full docker compose:
docker-compose.yml.txt
from device-onvif-camera.
Ok, so I have looked into it further, and the issue is being caused due to a timing issue in regards to the actual architecture of EdgeX (device-sdk-go) itself. Since EdgeX only provides an Initialize function and not a Start function, we (device-onvif-camera devs) have placed logic in the Initialize block which will ultimately cause the UpdateDevice to be called.
However, looking at the code:
https://github.com/edgexfoundry/device-sdk-go/blob/v2.3.0/pkg/service/init.go#L56-L67
The Initialize function is called before the selfRegister function. Because of this, the dic has not been updated to reflect the current running service, thus resulting in the empty value being returned.
The problem is that I assume this order was chosen to prevent a device service that failed initialization from registering. This is where the connundrum happens. So my suggestions forward is that I will create a feature request to implement a Start callback for the service which is called after the registration and bootstrapping. And then for the current codebase, implement a hacky async sleep to allow the registration to occur before the devices are communicated with.
Edit: Alternatively, a potential fix for the current codebase would be to move these line of code
https://github.com/edgexfoundry/device-sdk-go/blob/v2.3.0/pkg/service/service.go#L221-L227
to a new function which is called earlier in the bootstrap process (before driver.Initialize at least).
from device-onvif-camera.
@ajcasagrande, we will need to back port you hack to the levski code and release a path since this is a blocking bug, correct?
from device-onvif-camera.
@ajcasagrande, we will need to back port you hack to the levski code and release a path since this is a blocking bug, correct?
Yes, either the hack will need to be applied to the levski release of device-onvif-camera (and possibly device-usb-camera), or the alternative method would need to be patched in levski device-sdk-go.
from device-onvif-camera.
Edit: Alternatively, a potential fix for the current codebase would be to move these line of code
https://github.com/edgexfoundry/device-sdk-go/blob/v2.3.0/pkg/service/service.go#L221-L227
to a new function which is called earlier in the bootstrap process (before driver.Initialize at least).
@ajcasagrande , this seems like a good fix for Levski and then the Start API for Minnesota for better control. Thoughts?
from device-onvif-camera.
@lenny-intel Yes, I like that fix for Levski as opposed to doing the hack-y sleep method, assuming there are no other issues that arise after patching it.
from device-onvif-camera.
Moved this to the ONVIF repo for implementing the Start() API for this service
from device-onvif-camera.
Latest SDK requires the Start API() to be implemented.
from device-onvif-camera.
@ajcasagrande do you need my team to help fix this issue in 3.0?
from device-onvif-camera.
@ajcasagrande @presatish are you able to resolve this by the code freeze date (May 10th)?
from device-onvif-camera.
@cloudxxx8 I think we should be able to. We have prioritized this issue along with others to complete by May 10th.
from device-onvif-camera.
@cloudxxx8 Sorry, my notifications seem to not be working properly, or I set my outlook rules incorrectly. Yes, we will address this. Bruce has already added the stub for it, and I can implement it after my current refactor PR, since it may cause conflicts if done separately.
from device-onvif-camera.
Related Issues (20)
- Failed to invoke device service device-onvif-camera call back from core-metadata when tried to discovery onvif camera HOT 2
- Geo vision- Get stream URI not working with Multicast HOT 2
- Geo vision - set network gateway not working correctly HOT 3
- Document how to disable Axis replay attack prevention
- Remove code that loads static provision watchers (functionality now in latest SDK)
- Hikvision-DS-2DE2A404IW-DE3- Get device capabilities gives an error HOT 4
- Hikvision-DS-2DE2A404IW-DE3- Get device service capabilities API gives an error HOT 4
- Hikvision-DS-2DE2A404IW-DE3- Set scopes API gives an error HOT 3
- Hikvision-DS-2DE2A404IW-DE3 camera- Configuration of Analytics profile - Add Configuration API not working HOT 5
- onvif camera + example app service HOT 9
- Get command should return server error instead of timeout error HOT 4
- Remove obsolete code for type-safety
- refactor: Change configuration and provision watcher file format to YAML
- Fail to start service with error "registry is not available" HOT 9
- Swagger file is missing definitions for some schemas
- Replace credential scripts with curl commands
- SEO: Certain Google searches lead to the now defunct device-camera-go HOT 1
- Replace gorilla/mux with echo library
- The Hikvision NVR device (model: IDS-7816NX) has enabled Onvif, but the device-onvif-camera cannot be automatically discovered. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from device-onvif-camera.