Announcement: AppDaemon beta 3

I’m tracking the yarl issue - I currently have it pinned at the same version as HASS.

Hello install beta 3 today and my dashboard dont work… when open http://192.168.1.11:5050 got a white page and nothing on logs

When open dashboard url got this error

My logs is

2018-02-28 14:07:21.838667 INFO AppDaemon Version 3.0.0b3 starting
2018-02-28 14:07:21.839728 INFO Configuration read from: /home/homeassistant/appdaemon/appdaemon.yaml
2018-02-28 14:07:21.840564 DEBUG AppDaemon Section: None
2018-02-28 14:07:21.841388 DEBUG HADashboard Section: None
2018-02-28 14:07:21.844947 INFO AppDaemon: Starting Apps
2018-02-28 14:07:21.846224 DEBUG AppDaemon: Creating worker threads ...
2018-02-28 14:07:21.855255 DEBUG AppDaemon: Done
2018-02-28 14:07:21.856132 DEBUG AppDaemon: Entering run()
2018-02-28 14:07:21.857317 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-02-28 14:07:21.914853 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-02-28 14:07:21.916515 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-02-28 14:07:21.917662 DEBUG AppDaemon: Starting utility loop
2018-02-28 14:07:21.918647 INFO Starting Dashboards
2018-02-28 14:07:21.945706 INFO Starting API
2018-02-28 14:07:21.950535 DEBUG Start Loop
2018-02-28 14:07:21.996022 INFO AppDaemon: HASS: Connected to Home Assistant 0.64.0
2018-02-28 14:07:22.010172 DEBUG AppDaemon: HASS: get_ha_config()
2018-02-28 14:07:22.011046 DEBUG AppDaemon: HASS: get_ha_config: url is http://192.168.1.11:8123/api/config
2018-02-28 14:07:22.101803 DEBUG AppDaemon: HASS: get_ha_state: url is http://192.168.1.11:8123/api/states
2018-02-28 14:07:22.155760 DEBUG AppDaemon: HASS: Got state
2018-02-28 14:07:22.164244 INFO AppDaemon: Got initial state from namespace default
2018-02-28 14:07:22.487499 DEBUG AppDaemon: Event type:state_changed:
2018-02-28 14:07:22.493539 DEBUG AppDaemon: {'old_state': {'state': '21.3125', 'attributes': {'unit_of_measurement': 'mb', 'friendly_name': 'wallpanel pressure'}, 'last_changed': '2018-02-28T14:06:22.450251+00:00', 'last_updated': '2018-02-28T14:06:22.450251+00:00', 'entity_id': 'sensor.wallpanel_pressure'}, 'entity_id': 'sensor.wallpanel_pressure', 'new_state': {'state': '21.1875', 'attributes': {'unit_of_measurement': 'mb', 'friendly_name': 'wallpanel pressure'}, 'last_changed': '2018-02-28T14:07:22.443969+00:00', 'last_updated': '2018-02-28T14:07:22.443969+00:00', 'entity_id': 'sensor.wallpanel_pressure'}}
2018-02-28 14:07:22.499829 DEBUG AppDaemon: {'old_state': {'state': '21.3125', 'attributes': {'unit_of_measurement': 'mb', 'friendly_name': 'wallpanel pressure'}, 'last_changed': '2018-02-28T14:06:22.450251+00:00', 'last_updated': '2018-02-28T14:06:22.450251+00:00', 'entity_id': 'sensor.wallpanel_pressure'}, 'entity_id': 'sensor.wallpanel_pressure', 'new_state': {'state': '21.1875', 'attributes': {'unit_of_measurement': 'mb', 'friendly_name': 'wallpanel pressure'}, 'last_changed': '2018-02-28T14:07:22.443969+00:00', 'last_updated': '2018-02-28T14:07:22.443969+00:00', 'entity_id': 'sensor.wallpanel_pressure'}}
2018-02-28 14:07:24.278757 DEBUG AppDaemon: Starting timer loop
2018-02-28 14:07:24.279851 DEBUG AppDaemon: Reading Apps
2018-02-28 14:07:24.282566 INFO AppDaemon: Reading config
2018-02-28 14:07:24.283697 DEBUG AppDaemon: Reading /home/homeassistant/appdaemon/apps/apps.yaml
2018-02-28 14:07:24.285783 WARNING AppDaemon: File '/home/homeassistant/appdaemon/apps/apps.yaml' invalid structure - ignoring
2018-02-28 14:07:24.286543 INFO AppDaemon: /home/homeassistant/appdaemon/apps/apps.yaml added or modified
2018-02-28 14:07:24.287126 INFO AppDaemon: /home/homeassistant/appdaemon/apps/apps.yaml added or modified
2018-02-28 14:07:24.287870 INFO AppDaemon: Adding /home/homeassistant/appdaemon/apps to module import path
2018-02-28 14:07:24.296021 INFO AppDaemon: App initialization complete
2018-02-28 14:07:24.315514 DEBUG AppDaemon: Util loop compute time: 18.0ms
2018-02-28 14:07:24.331458 INFO Compiling dashboard 'Teste'
2018-02-28 14:07:25.009520 DEBUG AppDaemon: Scheduler loop compute time: 2.0ms
2018-02-28 14:07:25.202031 WARNING Dashboard 'Teste' not found
2018-02-28 14:07:25.203497 WARNING ------------------------------------------------------------
2018-02-28 14:07:25.204318 WARNING Unexpected error during DASH creation
2018-02-28 14:07:25.205064 WARNING ------------------------------------------------------------
2018-02-28 14:07:25.208917 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/dashboard.py", line 822, in get_dashboard
    with open(include_path, "r") as include_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/homeassistant/appdaemon/compiled/html/default/teste_head.html'

2018-02-28 14:07:25.209815 WARNING ------------------------------------------------------------
2018-02-28 14:07:25.210643 INFO function [get_dashboard] finished in 899 ms
Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_protocol.py", line 410, in start
    resp = yield from self._request_handler(request)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web.py", line 325, in _handle
    resp = yield from handler(request)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_middlewares.py", line 93, in impl
    return (yield from handler(request))
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/rundash.py", line 50, in wrapper
    return await myfunc(*args)
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/rundash.py", line 253, in load_dash
    return web.Response(text=response, content_type="text/html")
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_response.py", line 471, in __init__
    type(text))
TypeError: text argument must be str (<class 'dict'>)
2018-02-28 14:07:25.322958 DEBUG AppDaemon: Util loop compute time: 4.0ms
2018-02-28 14:07:26.004820 DEBUG AppDaemon: Scheduler loop compute time: 3.0ms
2018-02-28 14:07:26.330973 DEBUG AppDaemon: Util loop compute time: 5.0ms
2018-02-28 14:07:27.006197 DEBUG AppDaemon: Scheduler loop compute time: 4.0ms
2018-02-28 14:07:27.339688 DEBUG AppDaemon: Util loop compute time: 5.0ms
2018-02-28 14:07:28.006445 DEBUG AppDaemon: Scheduler loop compute time: 4.0ms
2018-02-28 14:07:28.350808 DEBUG AppDaemon: Util loop compute time: 5.0ms
2018-02-28 14:07:29.006386 DEBUG AppDaemon: Scheduler loop compute time: 4.0ms
2018-02-28 14:07:29.359715 DEBUG AppDaemon: Util loop compute time: 4.0ms
2018-02-28 14:07:29.739961 INFO Compiling dashboard 'Principal'
2018-02-28 14:07:30.011573 DEBUG AppDaemon: Scheduler loop compute time: 3.0ms
2018-02-28 14:07:30.436595 DEBUG AppDaemon: Util loop compute time: 69.0ms
2018-02-28 14:07:30.488518 DEBUG AppDaemon: Event type:state_changed:
2018-02-28 14:07:30.489393 DEBUG AppDaemon: {'old_state': {'state': 'above_horizon', 'attributes': {'next_setting': '2018-02-28T18:22:40+00:00', 'azimuth': 205.43, 'next_rising': '2018-03-01T07:09:08+00:00', 'next_dawn': '2018-03-01T06:41:26+00:00', 'next_dusk': '2018-02-28T18:50:24+00:00', 'next_noon': '2018-03-01T12:46:29+00:00', 'next_midnight': '2018-03-01T00:46:23+00:00', 'elevation': 37.86, 'friendly_name': 'Sun'}, 'last_changed': '2018-02-28T07:10:42.456651+00:00', 'last_updated': '2018-02-28T14:06:30.444663+00:00', 'entity_id': 'sun.sun'}, 'entity_id': 'sun.sun', 'new_state': {'state': 'above_horizon', 'attributes': {'next_setting': '2018-02-28T18:22:40+00:00', 'azimuth': 205.73, 'next_rising': '2018-03-01T07:09:08+00:00', 'next_dawn': '2018-03-01T06:41:26+00:00', 'next_dusk': '2018-02-28T18:50:24+00:00', 'next_noon': '2018-03-01T12:46:29+00:00', 'next_midnight': '2018-03-01T00:46:23+00:00', 'elevation': 37.78, 'friendly_name': 'Sun'}, 'last_changed': '2018-02-28T07:10:42.456651+00:00', 'last_updated': '2018-02-28T14:07:30.441726+00:00', 'entity_id': 'sun.sun'}}
2018-02-28 14:07:30.490576 DEBUG AppDaemon: {'old_state': {'state': 'above_horizon', 'attributes': {'next_setting': '2018-02-28T18:22:40+00:00', 'azimuth': 205.43, 'next_rising': '2018-03-01T07:09:08+00:00', 'next_dawn': '2018-03-01T06:41:26+00:00', 'next_dusk': '2018-02-28T18:50:24+00:00', 'next_noon': '2018-03-01T12:46:29+00:00', 'next_midnight': '2018-03-01T00:46:23+00:00', 'elevation': 37.86, 'friendly_name': 'Sun'}, 'last_changed': '2018-02-28T07:10:42.456651+00:00', 'last_updated': '2018-02-28T14:06:30.444663+00:00', 'entity_id': 'sun.sun'}, 'entity_id': 'sun.sun', 'new_state': {'state': 'above_horizon', 'attributes': {'next_setting': '2018-02-28T18:22:40+00:00', 'azimuth': 205.73, 'next_rising': '2018-03-01T07:09:08+00:00', 'next_dawn': '2018-03-01T06:41:26+00:00', 'next_dusk': '2018-02-28T18:50:24+00:00', 'next_noon': '2018-03-01T12:46:29+00:00', 'next_midnight': '2018-03-01T00:46:23+00:00', 'elevation': 37.78, 'friendly_name': 'Sun'}, 'last_changed': '2018-02-28T07:10:42.456651+00:00', 'last_updated': '2018-02-28T14:07:30.441726+00:00', 'entity_id': 'sun.sun'}}
2018-02-28 14:07:30.539465 WARNING Dashboard 'Principal' not found
2018-02-28 14:07:30.540958 WARNING ------------------------------------------------------------
2018-02-28 14:07:30.541761 WARNING Unexpected error during DASH creation
2018-02-28 14:07:30.542589 WARNING ------------------------------------------------------------
2018-02-28 14:07:30.544021 WARNING Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/dashboard.py", line 822, in get_dashboard
    with open(include_path, "r") as include_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/homeassistant/appdaemon/compiled/html/default/principal_head.html'

2018-02-28 14:07:30.544797 WARNING ------------------------------------------------------------
2018-02-28 14:07:30.545610 INFO function [get_dashboard] finished in 830 ms
Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_protocol.py", line 410, in start
    resp = yield from self._request_handler(request)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web.py", line 325, in _handle
    resp = yield from handler(request)
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_middlewares.py", line 93, in impl
    return (yield from handler(request))
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/rundash.py", line 50, in wrapper
    return await myfunc(*args)
  File "/usr/local/lib/python3.5/dist-packages/appdaemon/rundash.py", line 253, in load_dash
    return web.Response(text=response, content_type="text/html")
  File "/usr/local/lib/python3.5/dist-packages/aiohttp/web_response.py", line 471, in __init__
    type(text))
TypeError: text argument must be str (<class 'dict'>)
2018-02-28 14:07:31.004590 DEBUG AppDaemon: Scheduler loop compute time: 3.0ms
2018-02-28 14:07:31.444387 DEBUG AppDaemon: Util loop compute time: 5.0ms
2018-02-28 14:07:32.005935 DEBUG AppDaemon: Scheduler loop compute time: 4.0ms
2018-02-28 14:07:32.452524 DEBUG AppDaemon: Util loop compute time: 4.0ms
^C2018-02-28 14:07:32.659593 INFO Keyboard interrupt
2018-02-28 14:07:32.674960 INFO AppDaemon: HASS: Disconnecting from Home Assistant
2018-02-28 14:07:33.006087 DEBUG AppDaemon: Scheduler loop compute time: 4.0ms
2018-02-28 14:07:33.457225 DEBUG End Loop
2018-02-28 14:07:33.459292 INFO AppDeamon Exited

My config is

appdaemon:
  threads: 10
  api_port: 5000

  plugins:
    HASS:
      type: hass
      ha_url: http://192.168.1.11:8123
      ha_key: password

hadashboard:
   dash_url:  http://192.168.1.11:5050
   dash_dir: /home/homeassistant/.homeassistant/configs/dashboards/
   rss_feeds:
      - feed: http://feeds.jn.pt/JN-Ultimas
        target: JN
      - feed: https://tek.sapo.pt/rss
        target: TEK
   rss_update: 600

My folder permissions

compiled
drwxrwxrwx 3 homeassistant homeassistant 4096 Feb 28 14:10 compiled

dashboards folder (/home/homeassistant/.homeassistant/configs/dashboards/)

drwxrwxrwx 3 homeassistant homeassistant 4096 Feb 26 17:33 dashboards

Service is running with user homeassistant

appdaemon.service
[Unit]
Description=AppDaemon
[email protected]
[Service]
Type=simple
User=homeassistant
ExecStart=/usr/local/bin/appdaemon -c /home/homeassistant/appdaemon/
[Install]
WantedBy=multi-user.target

Any help?

there is no valid dashboard in your dashboard folder.
if you have a dashboard created, then please show what is inside that dash file.

Hello thanks for reply… my dashboard work on v2 there are two files in the folder

Teste.dash

title: Dashboard
widget_dimensions: [122, 120]
widget_margins: [10, 10]
columns: 8

#
# Layout
#    
layout:
    - clock
clock:
    widget_type: clock

Principal.dash

title: Casa
widget_dimensions: [1, 1]
widget_size: [130, 130]
widget_margins: [0, 0]
columns: 1200

global_parameters:
use_comma: 0
precision: 1
use_hass_icon: 1

layout:
- include: PrincipalPanels/top_panel
- include: PrincipalPanels/main_middle_panel
- include: PrincipalPanels/main_middle_panel_2
- include: PrincipalPanels/main_middle_panel_3
- include: PrincipalPanels/bottom_panel

top_panel

    header:
        widget_type: label
        title2: Casa
        title2_style: "text-align: left; vertical-align: top; font-size: 175%; color: #fff; top: 6px"

    clock:
        widget_type: clock
        time_format: "24hr"
        widget_style: "background-color: transparent; border-radius: 0px;"
        time_style: "font-size: 175%; color: #fff; vertical-align: top; text-align: right"
        date_style: "height: 0px;"

    layout:
        - spacer(10x1), header(960x40), clock(240x40)

main_middle_panel

 weather:
        widget_type: weather
        unit: "&deg;C"
        main_style: "color: orange; font-size: 80%;"
        sub_style: "color: white; font-size: 0%;"

    daniel_estado:
        widget_type: device_tracker
        title: Daniel
        device: danielphone
        icon_on: fa-male
        icon_off: fa-male
        state_text: 1
        state_map:
          "home": Em Casa
          "not_home": Fora

    joana_estado:
        widget_type: device_tracker
        title: Joana
        icon_on: fa-female
        icon_off: fa-female
        icon_style_active: "color: #cc6699"
        device: owt_joanaowt
        state_text: 1
        state_map:
          "home": Em Casa
          "not_home": Fora
    nas:
       widget_type: switch
       entity: switch.nas
       title: NAS
       icon_on: fa-server
       icon_off: fa-server

    pc_sala:
       widget_type: switch
       entity: switch.pc_sala
       title: PC Sala
       icon_on: fa-desktop
       icon_off: fa-desktop

    pc_sala:
       widget_type: switch
       entity: switch.pc_sala
       title: PC Sala
       icon_on: fa-desktop
       icon_off: fa-desktop

    uptime:
       widget_type: sensor
       entity: sensor.since_last_boot_template
       title: Uptime
       text_style: "color: white; font-size: 100%;"

    network_speed:
       title: Velocidade
       widget_type: sensor
       entity: sensor.speedtest_download
       sub_entity: sensor.speedtest_upload

    layout:
        - empty: 120
        - spacer(10x1), weather(280x130), spacer(20x1), daniel_estado(130x130), spacer(20x1), joana_estado(130x130), spacer(20x1), nas(130x130), spacer(20x1), pc_sala(130x130), spacer(20x1), uptime(130x130), spacer(20x1), network_speed(130x130)

Thks for help

Have you tried clearing out your compiled directory?

Yes, and appdaemon create folder css and javascript but no folder html

in the compiled folder there should be 3 subfolders. js, html and css.
if they are not created create them yourself.

i also saw that the teste dashboard was loaded before appdaemon was started.

best practice to make sure there are no problems after a change or update:

  1. close all dashboards on all devices
  2. clear cash at all devices
  3. close appdaemon
  4. clear the logs
  5. clear the subdirs in compiled (so html, css and js) but leave the structure
  6. to be absolutely sure, restart the device running appdaemon
  7. restart appdaemon in debug mode
  8. load 1 (and only 1) dashboard, preferably with only 1 sensor that changes regularly in chrome
  9. if it still not changes the sensor recheck the logs.

if you leave out 1 of these steps there can be an old problem that you already corrected still bugging you, or something that is changed by an update that doesnt take effect.

1 Like

IN the past this was necessary due to a bug which should be fixed in 3.0, but it’s still good advice if you are having issues.

1 Like

Ok… stop service and change port clear folder… without sucess… uninstall appdaemon and install again without sucess create a new dash like documentation and the error continues

Feb 28 17:10:18 PiServer appdaemon[553]:   File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/dashboard.py", line 822, in get_dashboard
Feb 28 17:10:18 PiServer appdaemon[553]:     with open(include_path, "r") as include_file:
Feb 28 17:10:18 PiServer appdaemon[553]: FileNotFoundError: [Errno 2] No such file or directory: '/home/homeassistant/appdaemon/compiled/html/default/daniel_head.html'
Feb 28 17:10:18 PiServer appdaemon[553]: 2018-02-28 17:10:18.271655 WARNING ------------------------------------------------------------
Feb 28 17:10:18 PiServer appdaemon[553]: 2018-02-28 17:10:18.272366 INFO function [get_dashboard] finished in 834 ms
Feb 28 17:10:18 PiServer appdaemon[553]: Error handling request
Feb 28 17:10:18 PiServer appdaemon[553]: Traceback (most recent call last):
Feb 28 17:10:18 PiServer appdaemon[553]:   File "/srv/appdaemon/lib/python3.5/site-packages/aiohttp/web_protocol.py", line 410, in start
Feb 28 17:10:18 PiServer appdaemon[553]:     resp = yield from self._request_handler(request)
Feb 28 17:10:18 PiServer appdaemon[553]:   File "/srv/appdaemon/lib/python3.5/site-packages/aiohttp/web.py", line 325, in _handle
Feb 28 17:10:18 PiServer appdaemon[553]:     resp = yield from handler(request)
Feb 28 17:10:18 PiServer appdaemon[553]:   File "/srv/appdaemon/lib/python3.5/site-packages/aiohttp/web_middlewares.py", line 93, in impl
Feb 28 17:10:18 PiServer appdaemon[553]:     return (yield from handler(request))
Feb 28 17:10:18 PiServer appdaemon[553]:   File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/rundash.py", line 50, in wrapper
Feb 28 17:10:18 PiServer appdaemon[553]:     return await myfunc(*args)
Feb 28 17:10:18 PiServer appdaemon[553]:   File "/srv/appdaemon/lib/python3.5/site-packages/appdaemon/rundash.py", line 253, in load_dash
Feb 28 17:10:18 PiServer appdaemon[553]:     return web.Response(text=response, content_type="text/html")
Feb 28 17:10:18 PiServer appdaemon[553]:   File "/srv/appdaemon/lib/python3.5/site-packages/aiohttp/web_response.py", line 471, in __init__
Feb 28 17:10:18 PiServer appdaemon[553]:     type(text))
Feb 28 17:10:18 PiServer appdaemon[553]: TypeError: text argument must be str (<class 'dict'>)

if i put the old compile folder the dashboard works but does not reflect the changes

after restarting just created the js and css folder automatic

Does this file actually exist?

Has anyone mentioned an issue with the RSS feeds “entity not found”? I get it all the time when starting up HADashboard, it stays that way for a while then sometimes the feed data starts showing, then a refresh or restart of HADashboard causes it to come back. Complicating things further sometimes after restart it shows up without issue. I have double and triple checked my config files and everything seems to be in order.

no the file and folder struc are not created, if you create the folders manually it also does not work

dont replace the old complied folder, but only make sure that those 3 folders exist.
/home/homeassistant/appdaemon/compiled/html
/home/homeassistant/appdaemon/compiled/js
/home/homeassistant/appdaemon/compiled/css
they must all be empty and all must have writing access for the user that you start appdaemon with.

I think I’ve found a bug in the mode widget of HADashboard.

icon_on and icon_off don’t seem to work. It still picks up the icon for the input_select from HASS.

Yes, I’ve tried refreshing browser cache and rebooting HASS even. :slight_smile:

Can you post your dashboard please

Sure thing.

Dash excerpt: https://pastebin.com/raw/NXSHEzph

End result: both widgets pick up the same icon i.e. the input select’s icon.

Thanks!

I tried with 2-3 feeds and none worked

I’ll take a look

Closing this thread since I just released beta 4: