UPDATE: If using openHAB 3, see this newer main UI widget OH3 Widget: Move a PTZ camera - Add-ons / UIs - openHAB Community
There are 3 main camera widgets that I have created:
- A clickable camera widget that is easier to setup compared to this one due to no Pan Tilt Zoom (PTZ) controls.Click here for forum thread
- One that matches the clickable widget and also includes PTZ controls that are only shown after you click on the thumbnail.Click here for forum thread
- And this widget here that can not be clicked and displays the PTZ controls that allow you to move the camera.
This is my first attempt at creating a Habpanel widget, so feel free to suggest changes and mod it to your needs. All styles have been left off to allow any css or themes that you choose to effect how this looks. If you have improved it in any way then please post a picture.
To setup the widget:
- Give the widget a URL and tell the binding what format the url is providing. Mjpeg and HLS both work here.
- gotoPreset channel item is needed so you can move the camera with ONVIF presets. These are what the numbers do.
- PTZ RELATIVE and also CONTINUOUS movement controls
- Motion Alarm channel (icon will display to indicate alarm state)
- Audio Alarm channel (icon will display to indicate alarm state)
- Any item that you want to switch ON and OFF.
Json file is attached or it can be downloaded from the widget gallery inside the Habpanel editor…
camera-ptz.widget.json (6.2 KB)