Announcement: Appdaemon v4.0.0

sorry, but that behaviour doesnt come from AD.
what you had before was custom, and the actual behavior is i think from HA.

Haha, well I do realize that as I posted above. I no longer have any customer components as they don’t work with AD4, but was wondering if the AD camera widget could be update to provide useful functionality.

Also, I am now see any tablet with a camera stream banned on HA restart, then a server crash. Very strange.

whitelist your network in HA.

the HA cams have a changing token.
when you restart HA, the token is changed, but the dashboard doesnt know that at that moment, and tries to connect to HA with the old token.
HA sees an invalid token and that causes that HA blocks that IP.

that cant be helped from our side.
the camera widget, just like all of dashboard, will get attention from us, in the near future.
but the fullscreen is no function from the widget that is somehow behaviour from HA.

My entire network is whitelisted, that’s the weird part. Do I need to whitelist the tablet IP’s separately? I did remove my token from the appdameon config file, maybe that’s the issue.

Interesting, I guess the custom component I was using before, created by @tjntomas, was automatically handling the token on refresh.

Awesome, Hadashboard definitely needs some loving. The other dashboards have their benefits, but ultimately fall short of Hadashboard.

i guess there is something wrong there then, because then HA wouldnt ban your dashboards.

there will always be problems when dashboard is running while restarts are made.
also when dashboards are running when you restart AD, there is no garantee that it will work.

in case from the cams you get into a race situation. its also depending on your refresh settings.
when the dashboard refreshes the cam it will use the last token it did get from HA, but if HA at the same time changes the token, there will be a problem.

shouldnt make any difference because the widget uses the token from the cam.
the token that was in appdaemon.yaml before was set by the addon. the addon now sets it in another way, so its not visible in appdaemon.yaml, but it is still there.

1 Like

Currently I can refresh my tablet browser via MQTT after a HA restart, that might be a solution for this. Is there a way to set a refresh within the dash file on restart?

nope.
dashboard has no knowledge from a restart.
that might be 1 of the things we will try to implement when we start rewriting dashboard.

edit: but however we try, we cant garantee it always goes right, just because of the racing possibilities.
thats why you need to make sure that HA cant block your dashboard.

1 Like

The widget need a minor change to the camerastream.yaml file as noted here:

I will update my custom widgets to work with AD4 shortly.

Awesome, that will be a better option, it works great. Any chance on adding a new feature similar to this: Fullscreen images (cameras, weather radars) on click for HADashboard

Sure, just a few minor additions to the code needed for that to work.

1 Like

You’re awesome, much appreciated!

@rds76 did this with jquery which is a very nice hack, but I think I’ll do it with plain js.

1 Like

@tjntomas

the widget from AD 4 also takes token from HA and it also has the possibilty to stream (allthough that was always possible)

so if there is no other advantage yours offers you could use the default widget.

Fine! I didnt look at the new/updated widgets yet.

we added 2 new ones
input_text and input_datetime
and we changed the camera widget.

all other changes are saved for AD 5

and allthough i am very greatefull for custom widgets like yours that solved a problem, they also give a lot of people trouble when they upgrade.

i am glad though that you didnt miss the breaking change that slipped in because of a change in the YAML interpreter.

Yes, I just solve any issue I personally run into since I am bit impatient, and post the resulting widgets. Does the camera widget have the full screen function? If not, I think I can just make a pull request to fix it.

1 Like

there is a problem with that.
a lot of people who use the latest versions from HA tell me that if they click on the camera it goes to full screen, but they cant return to the previous dashboard without a back button.

i think that HA has added something to the stream url, which makes it go to full screen, because there is no such thing in the widget.

so if there is a fullscreen function added to the widget that might clash with HA camera streams.

the nicest thing would be that if there is clicked on the cam it goes to full screen for a few seconds and then returns.

i cant test it myself anymore, because i took my cams out of HA, because the cams caused that my HA did crash at unexpected moments.

in AD 5 we will create the option to add any action (navigate, goto fullscreen, show other sensor values, etc.) to any user action (click, doubleclick, swipe, etc.)
and the option to add custom actions also.

but before we are there, if you got a reliable workable addition to the cam widget we would appreciate a PR, and ill make andrew accept it into the next AD 4 release.

but please test it with a few people before, because of the strange things that i saw herad in the last months.

The coming additions sounds great! Yes, I got a working code that shows the stream in full screen on a click and then reverts on a subsequent click, but I can add an option to go back after a certain interval. I also noted some confusion as to the HA/Appdaemon functionality from a few posts.

1 Like

its sometimes hard to tell.

even when i ask them if they use a custom widget they say no, and then after a few more questions they have a custom widget,
so its hard to tell for me what is HA behaviour and what is caused by a custom widget :wink:

I added a long-lived token back to appdaemon.yaml and the bans went away.