IpCamera: New IP Camera Binding

@andy294 A fix has been made in this PR

Hi @matt1, thank you for your PR, unfortunately it’s still the same issue on my side. I have

  • pulled the current main branch (checked, that the changes of the PR are there)
  • Created a new kar file for the IP Camera addon (4.3.0-SNAPSHOT)
  • Removed the installed IP Camera addon (4.2.1)
  • Removed temporary files and directories from /var/lib/openhab/tmp
  • Restarted openhab
  • Moved the new IP Camera addon to /usr/share/openhab/addons
  • Created a new Thing and passed the mjpeg url under advanced settings

Is there something, I can do more?

try leaving the port off ie
http://192.XXX.YYY.17/ISAPI/Streaming/channels/103/httpPreview

@matt1 You made my day !! It works now with your changes. Thank you :smiley: :+1:

Great thanks for reporting back as that means line 270 also needs the same change for it to be fully fixed. I just tested it and its working with the port specified now after the second change is made. Making another PR as some cameras may require the port for it to work so this needs to be fixed. I would just leave the port off for now, no need to change or test as I have HIK cameras here and could reproduce it and prove the fix.

1 Like

Hi, I can’t get my camera to work.
I have a Tapo C110. I have set her up as a ONVIF Thing with the following configuration:

UID: ipcamera:onvif:4361137307
label: ONVIF IP Camera
thingTypeUID: ipcamera:onvif
configuration:
  mjpegOptions: -q:v 5 -r 2 -vf scale=640:-2 -update 1
  ipAddress: 192.168.2.218
  updateImageWhen: "0"
  gifPreroll: 0
  onvifPort: 2020
  ffmpegLocation: /usr/bin/ffmpeg
  ipWhitelist: DISABLE
  mp4OutOptions: -c:v copy -c:a copy
  pollTime: 1000
  password: ********
  port: 8888
  snapshotUrl: ffmpeg
  snapshotOptions: -an -vsync vfr -q:v 2 -update 1
  ptzContinuous: false
  onvifMediaProfile: 0
  ffmpegInput: rtsp://jbaudisch:pwdJBtpl!()2204@192.168.2.218:554/stream1
  gifOutOptions: -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
  hlsOutOptions: -strict -2 -f lavfi -i aevalsrc=0 -acodec aac -vcodec copy
    -hls_flags delete_segments -hls_time 2 -hls_list_size 4
  username: ******

And it is shown as “online”. On the Items I also get the imageURL and mjpegURL displayed:

http://192.168.2.220:8080/ipcamera/4361137307/ipcamera.jpg
http://192.168.2.220:8080/ipcamera/4361137307/ipcamera.mjpeg

When I access the jpg via browser, it works.
When I access the mjpeg via browser, it doesn’t.
When I access the mjpeg via VLC, it works.

Then I tried to add both as an image-card widget to my UI like this:

component: oh-image-card
config:
  item: ONVIF_IP_Camera_Image_URL
  refreshInterval: 3000
  lazy: true
  lazyFadeIn: true

and

component: oh-image-card
config:
  item: ONVIF_IP_Camera_MJPEG_URL
  lazy: true
  lazyFadeIn: true

But neither the ImageURL shows something, nor does the MjpegURL.