Add CTronics camera adapter - #404
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #404 +/- ##
========================================
Coverage 78.83% 78.83%
========================================
Files 6 6
Lines 841 841
========================================
Hits 663 663
Misses 178 178
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
MateoLostanlen
left a comment
There was a problem hiding this comment.
Review of the CTronics adapter. 8 correctness issues, 1 dead code block, 1 efficiency note. Details inline.
|
Hi @romainantes, Thanks a lot for the PR, and sorry for the late review! I left a few inline comments. I don't have access to the camera so it's not ideal for reviewing, but let me know what you think. Quick question by the way: why go through ONVIF rather than the camera's native API? I've heard ONVIF is often less well maintained on the firmware side. And following on from that, if it's pure ONVIF, I'm wondering if we should have a generic ONVIF adapter directly (reusable for other brands) rather than a CTronics-specific one. What do you think? |
…adapter raises ValueError before calling GotoPreset or updating the tracked azimuth.
…d serialize presets safely
…s mechanism and removed the unused Hi3510 CGI implementation
…d during ONVIF setup,
Thanks for the review and for raising this! I chose ONVIF because the camera’s native API did not expose a sufficiently complete and reliable interface for all the operations required by the adapter. In particular, I had difficulty covering PTZ presets, absolute focus, focus status, and the different control paths consistently through the native API. ONVIF provided a single control interface for these operations, and I validated the relevant absolute-focus behavior on the available CTronics camera hardware. That said, I am aware that ONVIF support can vary between firmware versions and vendors. The adapter therefore still handles several CTronics-specific details, such as snapshot capture, connection defaults, profile selection, preset-token behavior, and the camera’s advertised Imaging/PTZ capabilities. I agree that a generic ONVIF adapter could be valuable in the future, especially for the PTZ and Imaging functionality. However, I would prefer to keep this PR CTronics-specific for now because the current implementation still contains vendor-specific behavior and has only been validated on CTronics hardware. |
Adds support for CTronics cameras using HTTP snapshots and ONVIF PTZ/Imaging controls.
It also extends RTSP stream path customization and adds dedicated documentation for camera adapters.
Changes:
New Adapter: