Image not showing in Basic UI via myopenhab

Hi everyone,

I have a Netatmo Ring bell for which the binding has yet to be updated. So I ended up using their REST API to retrieve some information from it. That allowed me to retrieve an image url about recent snapshots taken by the camera.
I integrated that into my sitemap by updating the Image item with the proper url. This all works fine as long as I access the Basic UI from my local network.

I am also using myopenhab to acces my sitemap remotely. For that I mainly use the android app, but my issue also happens from a windows PC using the browser to access the sitemap.

This is not a general problem but seems to be specific to the image url retrieved from the netatmo smart video ring bell.

Here is an example of such a URL:

To reproduce this you could make a very simple sitemap only containing an Image specifying the above link as url parameter. It works locally, but not through myopenhab.

I am still on OH 2.5, but I also tried a blank 3.1 installation to see if this would incentivise me to migrate to 3.x but I had the same issue.

There should not be any kind of authentication for this link. Anyone should be able to access it.

I read stuff about that something like this can be caused when you use Paper UI or such, but this is all file based.

I have no clue what is going on. Hope someone here does :slight_smile:

The Dude

Are you using a URL that contains embedded credentials? These look like http://user:password@ip……
Also when doing any camera stuff it is best to use a VPN to connect into your local network securely. This keeps the traffic off the free cloud and you will get better performance if the cloud is a long way from where you live.

With using image items some of them do work through the cloud and other forms do not. The exact code you use would help but my knowledge is rusty on which ways work, but really as mentioned to get full use of cameras the VPN way is better. Also I did find an issue with using image items and large snapshots that are constantly changing as the data goes through the event bus.
Better to use webview or video elements and these will only work if you use VPN or reverse proxy type methods.

As stated, there are no credentials. I would expect you or anyone to be able to see the image I posted.
With VPN it obviously works as well, but I very much like how it works with myopenhab without having to establish the VPN connection.
Also I am honestly curious what is so different with this publicly accessible URL than with more or less all others which seem to work.

You could have lead with that question that most urls work, just a few don’t.
OK this is interesting about your link.

Linux command used:

curl --verbose --output /test.jpg

The reply states Content-Length: 228607 but the server only sends [15924 bytes data]
The http server has a bug in it as those two numbers should be the same. Can’t explain why it works locally but not remotely as I dont know how it is handled by the cloud, but this would be a good place to start looking. There are also a number of other http headers and it may be that the cloud actually reads and honours the headers. Note there is a MD5 checksum header and if that is wrong the cloud may be rejecting it. Hard to say but if a server does 1 thing wrong, it probably does more than 1 thing that can cause issues.

Thanks for the hint, which makes a lot of sense. Apparently ordinary browsers and for whatever reason the local version of Openhab are more robust.
I raised a topic in the netatmo forums, though I fear that they won’t care and I guess there aren’t many workarounds. Possibly trying to embed this into my own webpage? But obviously I want to dynamically update that link, which would mean rebuilding that webpage, oh well…

Thanks again for your tip though!

An alternate view is that not everything error-checks comprehensively. On a busy centralised service it makes more sense to check aggressively, and not waste limited resource processing rubbish data :wink:

It might be something is getting truncated across the network somewhere.