-
-
Notifications
You must be signed in to change notification settings - Fork 92
Automatic image refresh does not work #342
Comments
I did further testing and auto refresh does work if I use the Nest URL as a static URL instead of from an openHAB String Item. For an example on how the image URL looks like (I deleted some chars here and there, so that it does not really work with my camera): |
Looks like
Since it's only defined here - only for static urls: org.openhab.ui.habpanel/web/app/widgets/image/image.widget.js Lines 58 to 60 in 7fbdf02
This was introduced in #143. I think the rationale at the time was that if you're specifying a String item, you're responsible for autoupdating it via rules instead of relying on the widget's autoupdate. Nonetheless, it's still a bug. |
At the moment, I am using a time triggered rule as a workaround, but it is very hacky: rule "Nest Snapshot Refresh" It is necessary to really change the URL and the sleep is also necessary, otherwise it won't update. |
I will check if we can add input validation on the widget configuration when I get on a PC. |
I have an image widget with an openHAB String item which contains a snapshot url for my Nest camera and I have set auto refresh to 60 seconds.
Instead of refreshing the image, I get this in the browser console:
vendor.js:119 TypeError: Cannot read property 'indexOf' of undefined
at image.widget.js:70
at n (vendor.js:108)
at m.$eval (vendor.js:147)
at m.$digest (vendor.js:144)
at m.$apply (vendor.js:147)
at vendor.js:109
When I enable No Cachebusting, then I don't get an error in the browser console, but the image goes black after 60 seconds.
Using openHAB 2.4.0. Tested on newest Chrome version on Linux and Android.
The text was updated successfully, but these errors were encountered: