Localhost won't work in the image widget

Hi… So I’m using the image widget in HABpanel to view my camera feed using a Raspberry Pi 3 via motioneye, and I set the Image URL settings in the image widget to http://RP.i.IP.Address:8081

The problem is when the IP changes the feed breaks, and I need to update it every time…

My questions are why http://localhost:8081 won’t work? it works in other places in my system…

Also, Is there a better way to view the feed?


Try the developer tools (F12) and check the console for errors?
‘localhost’ means your client, where you run the browser, so unless you happen to view the page on your raspberry pi it won’t work.

A possible solution would be to display the image in a sitemap in Basic UI, then copy the URI from there (it should be “proxified” like “http://<openhab-ip>:8080/proxy?sitemap=default.sitemap&widgetId=02000500&t=...”) then convert it to a relative URI you can use in HABPanel:


(remove the &t=... part)

Note, if you modify the sitemap the widgetId parameter could probably change and would have to be adjusted.

1 Like

Thanks, I’ll try that,

but do you happen to know where to locate the config file in which the image widget’s URL field value is stored?

Not sure it’s what you mean, but I’d advise against editing the configuration directly, unless you’re really careful.

1 Like