IpCamera: New IP Camera Binding

@Kim_Andersen
Does your camera now go online with latest build and get snapshots? Yes I heard it was getting added soon, do you know if this requires anything to change on our server ends other than the string line? Is it purely an upgrade already done in the myopenhab cloud?

Hi @m4rk,

Your situation does challenge my thinking which I like, so thanks for the extra info. The next build the Image will update at the poll rate if it is 5 seconds or higher, under 5 seconds it is limited. The ipcamera.jpg method is not limited and is the most efficient way to get an image (if the camera can not serve the file directly).

I wish to stress the difference between the traffic on your internal network VS the traffic that potentially leaves and can head to your devices that are away from home. Having a shorter polling time does not mean it leaves the internal network. It only leaves if you have the picture showing on a UI and the picture is changing on the UI, so if you close the page showing the picture it stops or you can limit it by the refresh options in the sitemap.

There are a few approaches you can take to keep traffic to a minimum. Consider these…

  1. Set the poll time to 10 seconds. Then follow the method here using WebView and html files that refresh every 15 minutes in the html code. The UI can then be pulled down and let go in both the ios and android apps and it will refresh and give updated content at any time. In basic UI just use the browsers refresh ability (F5). Note you will need to use a VPN as WebView does not pass through myopenhab which is why you need a VPN or another method. Even though the internal server is updating every 10 seconds, the image only updates every 15 minutes or when you manually drag and let go.
  1. Change to using Pushover to send an animated GIF when your door is told to open or close. Pushover does not use the myopenhab server and the GIF is pretty small and can fast forward in time showing the door movement. Pushover also can be told to keep the last X messages so unlike email it keeps things tidy automatically and gives a history of the last X messages and gifs.

  2. Use the gif feature and display that in your sitemap with

Webview url="http://192.168.0.999:54321/ipcamera.gif" height=9

You can trigger its creation with motion alarms or the door closing can trigger it. WebView needs VPN to leave internal network.

  1. The way you were doing it is another way to change the refresh time “on demand” and perhaps I need to re-add some code to make it possible again. I just don’t like the idea of using a rule to toggle the switch.

  2. Using an Image item, you can use multiple links in your sitemap like the below, One has a 15minute refresh and a link opens to a page with a 10 second refresh. Fingers crossed I go the syntax right…

Image url="http://192.168.0.999:54321/ipcamera.jpg" refresh=900000
Text label="Camera 10 sec" icon="camera"{Image url="http://192.168.0.999:54321/ipcamera.jpg" refresh=10000}
  1. I just ran a test and mjpeg streams work with up to 9 seconds between picture changes. I could then change the refresh rate at any time inside the binding, a variable refresh so if an alarm goes off you can get higher rate that auto drops back to 9 seconds when the alarms stop, would be a cool feature but it seems to be limited at 9 seconds between pictures so for your use case not good enough.