IpCamera: New IP Camera Binding

Thank you for your answer! I have now switched to ONVIF. Unfortunately all properties are still NULL and I can’t query any values. But the binding shows that the item is online. I have read your README, but I don’t know exactly how to activate this “auto discovery”! thank you and many greetings!

Thing ipcamera:ONVIF:001 "Kamera im Wohnzimmer" @ "Wohnzimmer"
    [
        IPADDRESS="192.168.1.140",
        USERNAME="admin",
        PASSWORD="*****",
        SERVER_PORT=54323,
        ONVIF_PORT=8000,
        ONVIF_MEDIA_PROFILE=0,
        STREAM_URL_OVERRIDE="ffmpeg",
        SNAPSHOT_URL_OVERRIDE="ffmpeg",
        FFMPEG_OUTPUT="/mnt/ipcamera/wohnzimmer/", 
        FFMPEG_INPUT="rtsp://192.168.1.140/h264_stream",
        IP_WHITELIST="DISABLE"
    ]

Delete the following lines from your thing file so the binding discovers the URLs from ONVIF in case you have them wrong.

ONVIF_MEDIA_PROFILE
SNAPSHOT_URL_OVERRIDE
FFMPEG_INPUT

As for full discovery you would get rid of the thing file and press the plus button in the INBOX of paper ui. This is a better way as it should also fetch the onvif port in case you have enetered the port wrongly. Since I do not know your camera I can’t be sure of anything as you have not posted debug logs.

Please read the log section of the readme.

Hi all. Can I please ask if anyone manage to get a Axis (M3005-V) working and can you please share your config file?

Many thanks.

Hi can anyone reccomend a good ONVIF camera

  • POE
  • 5MP+
  • ONVIF
  • most importent thing is motion detection, will be sent by camera OOB as an HTTP request , MQTT even better :slight_smile:

for now i am using the Reolink RLC-510 wich ticks all the boxes , but motion is not sent
i can only qurey the API , so i need to send a get request every half a sec and i just dont like it!

i want to buy somthing like 10 more , and i want to move from reolink…
but i can say only good things about the reolink great price good quilty!

Only cameras that I know have MQTT are INSTAR brand which they should have something that matches all your wishlist.

Reolink, I thought that we had people with the alarms working via ONVIF? @Kim_Andersen any tips?

For cameras I would ask after searching first as the question probably gets asked daily over on this forum. https://ipcamtalk.com/ Any camera that has good onvif support will have good things said over in that forum and should work well in the binding.

Its also worth reading the very first post in this thread as it shows what each brand that has an API has working in the binding. Some brands can overlay any text you want on top of the video stream, others have better control over the audio alarm threshold.

Hi @matt1 great fourm thank you… yes it will be more effctive to ask there :slight_smile:

@Kim_Andersen, if you can please tell me how are using your motion detection, and what reolink model do you have ?

this is my status :slight_smile:

Unfortunatly none what so ever… Ever since I started to test the latest 3-4 versions of the binding, I have not been able to get anything to work stable.
First I ´ve struggled with my Dahua camera. It does not work the way its suppose to unless I manually feed it with an ffmpeg_input url. And still I cant get the HLS streaming to work.
Then I turned to my Reolink only to discovered having issues as well. HLS doestnt work, the alarm doesnt work (it worked partly the other day where I got the state about alarm (motion), but the switch did not turn to ON… pretty strange). HLS doesnt work either. I get no .TS files at all.

A coupple of weeks ago I had both cameras running on my Rpi4, I´d struggle with the Dahua untill I found the solution with feeding the ffmpeg_input url. Then it worked just fine as well. At that time the Reolink also worked just fine.
Then I moved the exact same setup to my Odroid C2, (its running Ubuntu and openhab 2.5.7). And they worked fine.
A coupple of days ago I took a big jump, moved my whole main system from my Rpi3B+ to the Odroid C2. Updated to latest openhab (2.5.8). Using the exact same ipcamera setup. And I´m back to issues with with HLS streaming on both cameras, and Reolink does not report any movement at all.

Yesterday I tried letting PaperUI scan for my cameras. It find both (ONVIF only). As far as I remember, it used to find the Dahua as a Dahua cam, right?. But no longer.
I have checked and doubble check the settings in the Dahua time settings. It´s syncronized to my PC clock, like like the Odroid C2 (I think, at least frontail log gives the exact same time, but I´m still very green as far as Ubuntu goes). Auto reboot is turned off, just to make sure this is not a reboot issue.

I have absolutly no idea whats going on… Moving around with different setup´s, and the exact same ipcamera setup, seems to give different results and issues.

Unless someone has some good advice how to troubbleshoot this, I´m stucked. And I have no idea what to do. I doubt these issues are related to the cameras. Its either Ubuntun, openhab (or the openhab setup), the ipcamera binding or ffmpeg. Maybe its a mix of several issues. And I do not have the knowlegde to troubbleshoot alone.

I use a Reolink RLC-410-5MP and Dahua IPC-HDW4631C-A.
As mentioned above atm motion detection isnt working on the Reolink. I has been working fine though.

This is my setup for the Reolink:

Thing ipcamera:ONVIF:Reolink "Pakeringsplads" @ "Cameras"
[
   IPADDRESS="10.4.28.202",
   USERNAME="openhab",
   PASSWORD="secret_password",
   PORT=80,
   ONVIF_PORT=8000,    
   SERVER_PORT=54321,
   IMAGE_UPDATE_EVENTS=1,
   UPDATE_IMAGE=false,
//   GIF_PREROLL=1,
   GIF_POSTROLL=5,
   IP_WHITELIST="DISABLE",

   FFMPEG_LOCATION="/usr/bin/ffmpeg",
   FFMPEG_GIF_OUT_ARGUMENTS="-r 2 -filter_complex scale=-2:360:flags=lanczos,setpts=0.5*PTS,split[o1][o2];[o1]palettegen[p];[o2]fifo[o3];[o3][p]paletteuse",
   FFMPEG_OUTPUT="/etc/openhab2/html/cams/parkeringsplads/",
   FFMPEG_HLS_OUT_ARGUMENTS="-strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy -hls_flags delete_segments -hls_time 1 -hls_allow_cache 0 -hls_list_size 3"

]

Did you test the FTP Upload Binding?

I implemented it exactly for motion detection purposes, which I and many others have been using for many years already.

I don’t own Reolink camera, but at least this manual indicates that Reolink cameras can send image via FTP when motion is detected by the camera. When FTP Upload Binding receive the image, image-received triggering channel is activated (there is also image channel which contains the image itself). See more from FTP Upload binding use case example

@Kim_Andersen thanks!

@pauli_anttila, i will give this a go for sure
an FTP server is somthing i need to setup ?

No, binding contains build in FTP server.

@pauli_anttila
Wired i have setup this and its working great
but its my making my OH crash …

i will put this on testing env to see what is the deal
but i like the diraction ! :slight_smile:

@Gad_Ofir
If you start a new thread and post some trace log output from when the binding is starting and connecting to the Reolink you own then I can take a look into it and help you out.

1 Like

Hi, I got a WANSVIEW Q6 camera and am trying to get any motion detection working.

It was very easy to setup the camera in openhab, so I can get an image as well as streams.

As it’s an ONVIF-camera I first tried the native ONVIF motion detection, but nothing happened. After reading that several people have issues right now I thought let’s got with the ffmpeg implementation, which in the long-run seems anyway to have way more options. But when activating it (ffmpeg is installed and the RTSP-stream can be successfully detected) actually nothing is happening. I’ve already set the debug-level for the ipcamera to TRACE, but also in the logs there’s not one single entry about ffmpeg, which would help me to spot the issue.
The ffmpegMotionControl is set to 100, so I would expect in that case to launch ffmpeg, which should be somehow visible in the logs, including it’s output/potential error messages. Did I miss something, I checked the readmes and explanations already several times.

If your using a item file I would look for a typo as no log output will indicate your sitemap control Is not linked to the binding correctly. Would need more info to be sure but a typo is most likely.

In the control tab of paper ui if it’s
Not linked you won’t see the control.

Thanks for the hint, but there’s no typo, as I can see e.g. the image in the control tab as well as the stream urls.

I really strongly recommend you stop using the image channel, the readme has info on far better ways and the image channel may get removed from the binding.

If you click on the square with an arrow on it from the control tab, you will see a list of channels. Does ’ FFmpeg Motion Alarm’ have a dot in the centre or is it an empty circle?

Thanks for the advice regarding the image channel.
Yes it has a dot in it, aka it’s linked to an item. But the item has the state NULL.

The state needs to be changed to either ON or a number between 1 and 100, then you should see logs getting produced. If not then please open a new thread with what items and sitemap lines you are using. It would also be worth watching the event.log file to see if the control sends the command to the channel.

Sorry maybe that was a misunderstanding. FFmpeg Motion Alarm is a switch only and if I understood it correct it should get to ON when ffmpeg is detecting a motion. I think you’re referring to the Dimmer ffmpegMotionControl, that’s set to 100.
In the events.log there’s nothing about the ffmpegMotionAlarm.

Yes I was mixed up and your right. Need to change ffmpegMotionControl for the logs to start.