that will recompile your files when you start appdaemon, but not any more after that.
What i meant by this is i feel like there is maybe a component or process when loading that is maybe causing the lag.
yeah but not from your dashboard server but on the device where you load it or your network.
if your tablet is faster then your PC, then the problem is on your PC not in the server.
you dont go to google and say: “hey, my tablet loads faster then my PC, so there must be something wrong with your servers” you find out what is wrong with your PC.
you can rebuild your system as much as you like, but i dont think you will find anything.
probably 2-3 seconds on the Samsung tablet
that is pretty normal so your dashboard is running as expected.
Thanks, i will add the recompile text and restart AppDaemon and see how we go.
you dont go to google and say: “hey, my tablet loads faster then my PC, so there must be something wrong with your servers” you find out what is wrong with your PC.
Agreed. Was just comparing the speeds on all my devices and can appreciate that theyre not all going to be the same.
Either way i want to re build my Home Assistant setup on the new RPi3 B+ and clean it all up as there as been alot of “testing”. Now that im happy with my setup it will be good to just slowly set it all back up and take note of how its all acting as i add everything back.
I still haven;t seen any info in the actual compile times - which as Rene states is all I can have an influence on. If a dashboard requires compilation due to a change it will take a lot longer than if it does not. On my system (much more powerful than a PI) a bifgcompile takes 1 - 2 seconds, but if no compile is required, the dashboard piece is done in maybe 50 ms. After a 50ms compile, my iPad loads the dash in half a second or less.
Now, in a pi, the compile time could be 5 - 10 seconds, but if no compile is required, the PIs response should be way less than a second.
So, I want to see the actual compile times - they are in your access log. If I see 10 seconds for an already compiled dash there is a problem in AD, but if it’s less than a second, the problem is elsewhere as Rene has described.
And for completeness, there were no significant changes that I am aware of to the dashboard in 3.0 - the only thing I am aware of that would affect loading times, especially on slower devices is a bug fix I made to the security code, which is why I asked if you were using passwords - you’re not so that can’t be a factor.
IN a regular running system, all the dashboards should be compiled, and even on slow devices you should get a decent response time - compilation is what takes the most time and is affected by the power of your platform which is why I made efforts to only compile a dashboard when necessary.
Hi Andrew, apologies but i have been a bit busy at work hence not getting around to posting my logs.
As i recently re setup HASSIO i did have a quick look in the HA front end at the logs and navigating to different dashboards were taking anywhere from 2-3 seconds. I dont have alot on these pages either. I also added the lines as @ReneTode noted but it didnt make a difference after restarting the appdaemon service.
Is there anything in the logs i should look out for to ensure that those lines are effective? I will post a copy of the logs tonight.
Here is a copy of the AppDaemon log after restarting the service and then loading a couple pages. I know there are warnings coming up with the CSS files but i removed that widget and it took the same amount of time.
Is there anything unusual in here that you guys can see?
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 03-version-requirements.sh: executing...
INFO: Supervisor version requirements checks passed.
[cont-init.d] 03-version-requirements.sh: exited 0.
[cont-init.d] 20-init-configuration.sh: executing...
[cont-init.d] 20-init-configuration.sh: exited 0.
[cont-init.d] 21-compiled-dir.sh: executing...
[cont-init.d] 21-compiled-dir.sh: exited 0.
[cont-init.d] 30-auto-password.sh: executing...
[cont-init.d] 30-auto-password.sh: exited 0.
[cont-init.d] 31-ha-url.sh: executing...
[cont-init.d] 31-ha-url.sh: exited 0.
[cont-init.d] 50-compiled-symlink.sh: executing...
[cont-init.d] 50-compiled-symlink.sh: exited 0.
[cont-init.d] 80-system-packages.sh: executing...
[cont-init.d] 80-system-packages.sh: exited 0.
[cont-init.d] 81-python-packages.sh: executing...
[cont-init.d] 81-python-packages.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
starting version 3.2.4
[services.d] done.
2018-03-29 19:48:10.430530 INFO AppDaemon Version 3.0.0 starting
2018-03-29 19:48:10.431560 INFO Configuration read from: /config/appdaemon/appdaemon.yaml
2018-03-29 19:48:10.436714 INFO AppDaemon: Starting Apps
2018-03-29 19:48:10.446514 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-03-29 19:48:10.501439 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-03-29 19:48:10.503662 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-03-29 19:48:10.505569 INFO Starting Dashboards
2018-03-29 19:48:10.549597 INFO API is disabled
2018-03-29 19:48:10.593209 INFO AppDaemon: HASS: Connected to Home Assistant 0.65.6
2018-03-29 19:48:11.014747 INFO AppDaemon: Got initial state from namespace default
2018-03-29 19:48:12.145252 INFO HADashboard: New dashboard connected: Main Panel
2018-03-29 19:48:12.152242 INFO HADashboard: New dashboard connected: Home Panel
2018-03-29 19:48:13.123419 INFO AppDaemon: Reading config
2018-03-29 19:48:13.139113 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2018-03-29 19:48:13.140660 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2018-03-29 19:48:13.142239 INFO AppDaemon: App 'hello_world' added
2018-03-29 19:48:13.144080 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2018-03-29 19:48:13.146831 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2018-03-29 19:48:13.238739 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2018-03-29 19:48:13.793092 INFO hello_world: Hello from AppDaemon
2018-03-29 19:48:13.798258 INFO hello_world: You are now ready to run Apps!
2018-03-29 19:48:13.800066 INFO AppDaemon: App initialization complete
2018-03-29 19:48:13.857128 INFO HADashboard: New dashboard connected: Main Panel
2018-03-29 19:48:15.079230 INFO Loading custom skin 'default'
2018-03-29 19:48:15.080343 INFO Compiling dashboard 'MainBed'
2018-03-29 19:48:16.138794 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:16.185207 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:17.216194 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:17.250657 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:17.316215 INFO Loading custom widget 'wunderground.yaml'
2018-03-29 19:48:17.317064 INFO Loading custom widget 'basewunderground'
2018-03-29 19:48:18.139996 INFO function [get_dashboard] finished in 3061 ms
2018-03-29 19:48:18.157966 INFO HADashboard: Dashboard disconnected
2018-03-29 19:48:18.510721 INFO HADashboard: New dashboard connected: Main Panel
2018-03-29 19:48:20.354257 INFO Loading custom skin 'default'
2018-03-29 19:48:20.354801 INFO Compiling dashboard 'CameraBed'
2018-03-29 19:48:20.958026 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:20.986742 INFO Loading custom widget 'wunderground.yaml'
2018-03-29 19:48:20.987610 INFO Loading custom widget 'basewunderground'
2018-03-29 19:48:21.486556 INFO function [get_dashboard] finished in 1132 ms
2018-03-29 19:48:21.501719 INFO HADashboard: Dashboard disconnected
2018-03-29 19:48:21.623361 INFO HADashboard: New dashboard connected: Main Panel
2018-03-29 19:48:27.472188 INFO Loading custom skin 'default'
2018-03-29 19:48:27.474458 INFO Compiling dashboard 'MainBed'
2018-03-29 19:48:29.155648 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:29.235365 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:30.286429 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:30.322173 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:30.383128 INFO Loading custom widget 'wunderground.yaml'
2018-03-29 19:48:30.384230 INFO Loading custom widget 'basewunderground'
2018-03-29 19:48:31.152664 INFO function [get_dashboard] finished in 3680 ms
2018-03-29 19:48:31.179882 INFO HADashboard: Dashboard disconnected
2018-03-29 19:48:31.436886 INFO HADashboard: New dashboard connected: Main Panel
2018-03-29 19:48:32.772032 INFO Loading custom skin 'default'
2018-03-29 19:48:32.772724 INFO Compiling dashboard 'AirconBed'
2018-03-29 19:48:33.489246 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:33.648892 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:33.691118 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:33.734353 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:34.010548 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:34.011221 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_inactive
2018-03-29 19:48:34.073853 INFO Loading custom widget 'wunderground.yaml'
2018-03-29 19:48:34.074895 INFO Loading custom widget 'basewunderground'
2018-03-29 19:48:34.716604 INFO function [get_dashboard] finished in 1944 ms
2018-03-29 19:48:34.732554 INFO HADashboard: Dashboard disconnected
2018-03-29 19:48:34.904970 INFO HADashboard: New dashboard connected: Main Panel
2018-03-29 19:48:36.994514 INFO Loading custom skin 'default'
2018-03-29 19:48:36.996390 INFO Compiling dashboard 'MainBed'
2018-03-29 19:48:37.811318 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:37.854815 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-29 19:48:38.838009 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:38.870060 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-29 19:48:38.926812 INFO Loading custom widget 'wunderground.yaml'
2018-03-29 19:48:38.927563 INFO Loading custom widget 'basewunderground'
2018-03-29 19:48:39.689483 INFO function [get_dashboard] finished in 2695 ms
2018-03-29 19:48:39.707519 INFO HADashboard: Dashboard disconnected
2018-03-29 19:48:39.955960 INFO HADashboard: New dashboard connected: Main Panel
Here is my log performing the tasks as you mentioned.
I’ve also attached my appdaemon.yaml file below for reference. A question I had regarding that is my dash_url is not what I use to access HADashboard. Is this normal? I use 10.0.0.117:5050 where as that shows 127.0.0.1:5050.
Python Apps and HADashboard using AppDaemon 3.x for Home Assistant
From: Community Hass.io Add-ons
By: Franck Nijhof [email protected]
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 03-version-requirements.sh: executing…
INFO: Supervisor version requirements checks passed.
[cont-init.d] 03-version-requirements.sh: exited 0.
[cont-init.d] 20-init-configuration.sh: executing…
[cont-init.d] 20-init-configuration.sh: exited 0.
[cont-init.d] 21-compiled-dir.sh: executing…
[cont-init.d] 21-compiled-dir.sh: exited 0.
[cont-init.d] 30-auto-password.sh: executing…
[cont-init.d] 30-auto-password.sh: exited 0.
[cont-init.d] 31-ha-url.sh: executing…
[cont-init.d] 31-ha-url.sh: exited 0.
[cont-init.d] 50-compiled-symlink.sh: executing…
[cont-init.d] 50-compiled-symlink.sh: exited 0.
[cont-init.d] 80-system-packages.sh: executing…
[cont-init.d] 80-system-packages.sh: exited 0.
[cont-init.d] 81-python-packages.sh: executing…
[cont-init.d] 81-python-packages.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
starting version 3.2.4
[services.d] done.
2018-03-30 07:48:11.227295 INFO AppDaemon Version 3.0.0 starting
2018-03-30 07:48:11.228077 INFO Configuration read from: /config/appdaemon/appdaemon.yaml
2018-03-30 07:48:11.231925 INFO AppDaemon: Starting Apps
2018-03-30 07:48:11.239712 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-03-30 07:48:11.306991 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-03-30 07:48:11.308533 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-03-30 07:48:11.310149 INFO Starting Dashboards
2018-03-30 07:48:11.331662 INFO API is disabled
2018-03-30 07:48:11.355973 INFO AppDaemon: HASS: Connected to Home Assistant 0.65.6
2018-03-30 07:48:11.597111 INFO AppDaemon: Got initial state from namespace default
2018-03-30 07:48:11.968445 INFO HADashboard: New dashboard connected: Home Panel
2018-03-30 07:48:13.864328 INFO AppDaemon: Reading config
2018-03-30 07:48:13.875935 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2018-03-30 07:48:13.876482 INFO AppDaemon: /config/appdaemon/apps/apps.yaml added or modified
2018-03-30 07:48:13.877268 INFO AppDaemon: App ‘hello_world’ added
2018-03-30 07:48:13.878659 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2018-03-30 07:48:13.880226 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2018-03-30 07:48:13.884098 INFO HADashboard: New dashboard connected: Main Panel
2018-03-30 07:48:13.923998 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2018-03-30 07:48:14.258809 INFO hello_world: Hello from AppDaemon
2018-03-30 07:48:14.263545 INFO hello_world: You are now ready to run Apps!
2018-03-30 07:48:14.265708 INFO AppDaemon: App initialization complete
2018-03-30 07:48:15.590331 INFO Loading custom skin ‘default’
2018-03-30 07:48:15.591261 INFO Compiling dashboard ‘MainBed’
2018-03-30 07:48:16.533494 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:16.574814 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:17.564144 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:17.597097 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:17.660519 INFO Loading custom widget ‘wunderground.yaml’
2018-03-30 07:48:17.661535 INFO Loading custom widget ‘basewunderground’
2018-03-30 07:48:18.447071 INFO function [get_dashboard] finished in 2857 ms
2018-03-30 07:48:18.725357 INFO HADashboard: New dashboard connected: Main Panel
2018-03-30 07:48:21.155486 INFO Loading custom skin ‘default’
2018-03-30 07:48:21.156182 INFO Compiling dashboard ‘MainBed’
2018-03-30 07:48:22.415278 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:22.461670 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:23.473632 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:23.509584 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:23.566036 INFO Loading custom widget ‘wunderground.yaml’
2018-03-30 07:48:23.566902 INFO Loading custom widget ‘basewunderground’
2018-03-30 07:48:24.319849 INFO function [get_dashboard] finished in 3164 ms
2018-03-30 07:48:24.356680 INFO HADashboard: Dashboard disconnected
2018-03-30 07:48:24.497905 INFO HADashboard: New dashboard connected: Main Panel
2018-03-30 07:48:27.178714 INFO Loading custom skin ‘default’
2018-03-30 07:48:27.181416 INFO Compiling dashboard ‘MainBed’
2018-03-30 07:48:28.223827 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:28.270222 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:29.304374 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:29.340025 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:29.404204 INFO Loading custom widget ‘wunderground.yaml’
2018-03-30 07:48:29.405459 INFO Loading custom widget ‘basewunderground’
2018-03-30 07:48:30.163013 INFO function [get_dashboard] finished in 2985 ms
2018-03-30 07:48:30.227216 INFO HADashboard: Dashboard disconnected
2018-03-30 07:48:30.344464 INFO HADashboard: New dashboard connected: Main Panel
2018-03-30 07:48:33.027926 INFO Loading custom skin ‘default’
2018-03-30 07:48:33.029610 INFO Compiling dashboard ‘MainBed’
2018-03-30 07:48:34.087711 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:34.132078 WARNING Variable definition not found in CSS Skin variables: $sensor_container_style
2018-03-30 07:48:35.121660 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:35.154360 WARNING Variable definition not found in CSS Skin variables: $navigate_icon_active
2018-03-30 07:48:35.228902 INFO Loading custom widget ‘wunderground.yaml’
2018-03-30 07:48:35.229642 INFO Loading custom widget ‘basewunderground’
2018-03-30 07:48:36.019719 INFO function [get_dashboard] finished in 2992 ms
2018-03-30 07:48:36.134112 INFO HADashboard: Dashboard disconnected
2018-03-30 07:48:36.318678 INFO HADashboard: New dashboard connected: Main Panel
That’s what I was thinking. The URL I use is the same IP address as my RPi but the URL in the appdaemon.yaml file was created on install.
I changed the URL to what I was use and restarted to see if would make any difference and nothing. I even # the URL out and everything still worked with no difference. Is that weird or is that URL for something else?
changes in appdaemon.yaml only take effect if you restart appdaemon correctly (sometimes you need to restart your device to make sure AD is really restarted)
you probably didnt do that, so appdaemon just kept running with its old values.
without dash_url set the dashboard cannot start, unless they have made serious changes in appdaemon in the hassio addon.
From that log it looks like you are compiling the dash every time - I would expect to see the first one take a long time and the subsequent ones be much faster. Are you changing any files in the meantime in the compiled directory, or do you have something going on in there that might cause that?
The missing CSS variables? No, I wouldn’t expect that to cause it - I check for modified source files later than the compiled files - missing files wouldn;t be checked.
Yeah that’s what I was thinking, the time taken is exactly the same every time so I didn’t feel as though it was taking the dash_compile lines in my appdaemon.yaml file. Andrew does this have anything to do with the HA_URL being different to the one i actually use to access hadashboard?
Something interesting ive discovered in checking the compiled directory. Whilst it does exist it appears like a shortcut rather than a folder. When i try to go into that folder on a command line it says that directory doesnt exists but when i run a ls command to see a list of directories in the appdaemon folder, it is there. Is this normal? I installed appdaemon 3 via the addon store in HASSIO.
yeah thats the way they have configured the addon.
its not the intended way, and has cost problems in the past, but thats what you have to live with, because you did chose hassio.
with hassio, like with windows, you dont have full control about what happens on your device.