Hello
I want to display history log in HAdashboard --> example is my alarm history. I want to show when it was armed/disarmed/ motion detectors, etc…
I have made my history in a list through AppDeamon , but i am struggling to display it.
I tried a Sensor in HA: AppDeamon writes the state to the sensor, then i display the sensor in HADashboard. The issue with that is that the sensors only supports 255 characters. It crashes after that
I used an iframe to display an html file. I use AppDeamon to write the HTML file. The issue is that the iframe does not update somehow. I tried different browsers (iexplorer, chrome,) but does not work. I need to right - click and “Refresh/Reload frame” to get the updated info
Any suggestion? Any other way to achieve this?
Can i write the text into the widget directly from AppDemon? Which widget to use?
Can i force iframe refresh from AppDeamon or some other way?
Put some JS in the html page executed with setTimeOut that changes the url of the page and reloads after an interval in a way similar to @ReneTode mentioned.
I’ve used some simple GUID generation in javascript to avoid cache issues, to create a random id and append to the URL as a parameter
then just append the guid to the end of the url like @ReneTode mentioned, e.g.
url = "http://url?"uuid=" + uuid;
You could even avoid an entire reload by linking to a static HTML page that uses an ajax approach to load in the actual log you generate (which then doesn’t have to be in HTML format), and simply keep using this to rewrite the DOM in the page through JS.
I found that the sensor attributes do not have any limitations of 255 characters.
So now I am updating the status string to a sensor attribute “status”, rather than the state.
Then displaying the status as below
It seems to be working
me too, untill i searched on google how to disable cashe completely.
is a setting which you can change by editing something.
and because cashe is in general bad for a dashboard i did that.