Hi @kurty
Thanks for your feedback, I’m glad to hear the camera is working well with your client’s BlueROV2. (also on a MAC, from what you told me by email)
Regarding focus (and potentially other camera parameters), I believe there is a way to handle this directly from the joystick in Cockpit by combining Data Lake variables with Actions. I haven’t been able to test it myself yet, but here’s the theory:
1. Create Data Lake variables (for example: focus_near_active and focus_far_active, both booleans).
2. Map joystick buttons to those variables → when the button is pressed, the variable becomes true; when released, it becomes false.
3. Create HTTP Request Actions for your camera:
focus_increase → sends the focus-near command
focus_decrease → sends the focus-far command
stop_focus → sends the stop command
(Include the proper Basic Auth header: Authorization / Basic …)
4. Create JavaScript “gate” Actions that check the Boolean value:
If true, run the corresponding focus command
If false, run the stop_focus command
5. Link the JavaScript Actions to the Data Lake variables. This way, pressing the button starts focus, and releasing it automatically sends stop.
This setup should allow Cockpit to manage continuous focus directly via joystick input.
I think @rafael.lehmkuhl could contribute some insight here to confirm whether I’m on the right track. I’ll also be testing this soon, hopefully this week, and will share the results.
Just to add: I developed the more complex option above because Cockpit doesn’t natively support running an HTTP request when the button is released, and it is necessary to send stop_focus when releasing the button. That’s why I used Boolean variables, JavaScript, and linking between actions.
For other parameters in theory it’s much simpler — you can just create an HTTP Request Action and assign it to a button. For example: zoom (via presets), brightness, contrast, SD card recording, snapshots, etc.
Once I’ve tested it, I’ll share the exact details for creating the http request (url, get, headers), JavaScript, etc.
Best regards,
Andrés