I am using 4 different types of camera but only one is making trouble. This Reolink E1 Pro is supporting ONVIF and RTSP but no HTTP.
So its not directly possible to connect to a website to get a snapshot. I have another instance of AgentDVR running were all 4 cameras are collected and showed without issues.
I am using the HTTP stream to connect to the E1 Pro which is working inside my network without issues. I used this streaming link from AgentDVR http://:8090/grab.jpg?oid=3&size=1280x720 to setup a generic ipcamera topic. Within this topic after activating the switch for updating the Image item the item is updated and can showed in basic ui aswell. But only if I switch it on and off again. I can follow directly the updating if I use the switch to on but then basicui can’t handle it and the page is in a refresh loop.
In the thing there is an image url which points to the Openhab server but If I open up this link I only get an error openhab page but no image.
From my other camera which is configured in Openhab with the same ipcamera binding the Image URL is working and I use this for showing the image in basic ui.
I also tried the link from my AgentDVR in basic ui which is working but only in my internal network and not over mobile network.
Is there anyone who has a hint for me how to solve this?
There really isn’t enough here to pinpoint the specific problem but I can show how I configured my cameras.
Install the IPCamera binding
Create and configure the Thing. Here is one of mine. I don’t have extensive experience with the bindings and different types of cameras. This one is an RTSP stream.
I’m not showing the Channels becuase I didn’t make any changes there.
The next steps depends on what you want to show on the UI. I’m OK with images with a one second refresh so that’s what I configured. Link a String Item to the Image URL Channel.
That’s going to give you a URL that only works when you are on the LAN though. The front part of the URL needs to be stripped off to become a relative URL which will work locally and remotely. On the Link apply an ECMA Script and in the “Thing to Item Transformation” put | input.substring(input.indexOf('/', 8)+1).
I use MainUI so I can’t speak specifically to BasicUI. I imagine you’d just use an Image element pointing at the Item. In MainUI I use an Image card.
oh man you made my day. The clue was just to add “ffmpeg” for the snapshotURL. Because I have a working RTSP URL my thing instantly switched to online.
PTZ commands are also working and in this thing I used the item for the snapshow URL and added it to my basic ui and suprise –> this is working internally and also externally from my network. Very nice. Thanks!