Since v3, "?time" appended to iframe widget image URLs

My camera display iframe broke after upgrading to v3 and I am at a loss on where to proceed from here.

It appears that AppDaemon v3 is appending a “?time” parameter to all img URLs even if they already include parameters, completely breaking the widget for me.

Previously in v2, this (sanitized) config worked fine for me:

camera_iframe:
  widget_type: iframe
  refresh: 10
  img_list:
    - http://10.0.0.2:8123/api/camera_proxy/camera.1?api_password=HASSPass
    - http://10.0.0.2:8123/api/camera_proxy/camera.2?api_password=HASSPass
    - http://10.0.0.2:8123/api/camera_proxy/camera.3?api_password=HASSPass
    - http://10.0.0.2:8123/api/camera_proxy/camera.4?api_password=HASSPass
    - http://10.0.0.2:8123/api/camera_proxy/camera.5?api_password=HASSPass
    - http://10.0.0.2:8123/api/camera_proxy/camera.6?api_password=HASSPass
    - http://10.0.0.2:8123/api/camera_proxy/camera.7?api_password=HASSPass
    - http://10.0.0.2:8123/api/camera_proxy/camera.8?api_password=HASSPass

It appears that since the upgrade, these URLs have a “?time=” parameter appended to the URLs that are called from the dashboard, resulting in all requests instead going to a URL like:

http://10.0.0.2:8123/api/camera_proxy/camera.8?api_password=HASSPass?time=1517282786

This is a malformed URL, as such HASS is sending a 401 response, and no image appears inside the iframe.

If I correct the URL to “http://10.0.0.2:8123/api/camera_proxy/camera.8?api_password=HASSPass&time=1517282786” (with an ampersand before the time parameter rather than a question mark) and access it in my browser it works fine, as expected.

Any ideas? Is there a better way for me to be doing this in v3 or is this a legitimate bug?

i think the time parameter is added to get the browser to refresh.
but it should check if there is already an ? in the url.
did you also try url_list instead of img_list?

Yes, this looks like a bug, I’ll fix it for beta 3.

EDIT: It’s now fixed in dev and will be in beta3.

2 Likes