Hi eveyone,
first thank you for sharing your developments.
I just installed appdaemon in my hassbian RPI3b to enable dashboard for HA (so, not hass.io addons).
Main issue: I can reach the dashboard at IP.5050, but all my HA entities are marked as “not found”, e.g. clock and reload work.
My HA ( https://my.duckdns.org:8123 with Let’sEncrypt) is running on virtualenv as well as appdaemon. Cause I’m not so confident, I followed BurnHA instructions (https://www.youtube.com/watch?v=yu7Rd-Rf2BU).
I made an initial mistake installing virtualenv on pi user and directory (can I simply remove ‘appdaemon’ dir under pi?), then I restarted the installation using ‘homeassistant’ user with ‘sudo su -s /bin/bash homeassistant’ and ‘source bin/activate’. I had to switch to ‘pi’ user for creating ‘/etc/systemd/system/appdaemon.service’ as homeassistant user is not sudoer.
This is my appdaemon.yaml in /home/homeassistant/appdaemon/conf:
log:
logfile: /home/homeassistant/appdaemon/conf/appdaemon.log
errorfile: /home/homeassistant/appdaemon/conf/aderror.log
appdaemon:
threads: 10
app_dir: /home/homeassistant/appdaemon/conf/apps/
plugins:
HASS:
type: hass
ha_url: http://192.168.0.38:8123
hadashboard:
dash_url: http://192.168.0.38:5050
dash_dir: /home/homeassistant/appdaemon/conf/dashboards
This is my /etc/systemd/system/appdaemon.service:
[Unit]
Description=Appdaemon for HASS
After=network-online.target
[Service]
Type=simple
User=homeassistant
ExecStart=/home/homeassistant/appdaemon/bin/appdaemon -D DEBUG -c "/home/homeassistant/appdaemon/conf"
[Install]
WantedBy=multi-user.target
This is appdaemon.log in /home/homeassistant/appdaemon/conf:
2018-11-21 13:47:15.344351 WARNING AppDaemon: HASS: ------------------------------------------------------------
2018-11-21 13:47:20.354093 DEBUG AppDaemon: Event type:ha_disconnected:
2018-11-21 13:47:20.355306 DEBUG AppDaemon: {}
2018-11-21 13:47:20.356436 WARNING AppDaemon: HASS: Disconnected from Home Assistant, retrying in 5 seconds
2018-11-21 13:47:20.357224 WARNING AppDaemon: HASS: ------------------------------------------------------------
2018-11-21 13:47:20.358044 WARNING AppDaemon: HASS: Unexpected error:
2018-11-21 13:47:20.358988 WARNING AppDaemon: HASS: ------------------------------------------------------------
2018-11-21 13:47:20.361333 WARNING AppDaemon: HASS: Traceback (most recent call last):
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/appdaemon/plugins/hass/hassplugin.py", line 152, i$
"{}/api/websocket".format(url), sslopt=sslopt
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/websocket/_core.py", line 511, in create_connection
websock.connect(url, **options)
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/websocket/_core.py", line 223, in connect
self.handshake_response = handshake(self.sock, *addrs, **options)
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/websocket/_handshake.py", line 79, in handshake
status, resp = _get_resp_headers(sock)
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/websocket/_handshake.py", line 150, in _get_resp_h$
status, resp_headers, status_message = read_headers(sock)
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/websocket/_http.py", line 298, in read_headers
line = recv_line(sock)
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/websocket/_socket.py", line 102, in recv_line
c = recv(sock, 1)
File "/home/homeassistant/appdaemon/lib/python3.5/site-packages/websocket/_socket.py", line 94, in recv
"Connection is already closed.")
websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed.
This is my aderror.log in /home/homeassistant/appdaemon/conf :
2018-11-21 07:36:24.509215 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: latitude
2018-11-21 07:36:24.510418 ERROR AppDaemon: AppDaemon is terminating
2018-11-21 07:36:24.511436 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: longitude
2018-11-21 07:36:24.512179 ERROR AppDaemon: AppDaemon is terminating
2018-11-21 07:36:24.512950 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: elevation
2018-11-21 07:36:24.513658 ERROR AppDaemon: AppDaemon is terminating
2018-11-21 07:36:24.514414 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: time_zone
2018-11-21 07:36:24.515121 ERROR AppDaemon: AppDaemon is terminating
This is my starting dashboard ‘main.dash’ in /home/homeassistant/appdaemon/conf/dashboards:
title: main
widget_dimensions: [120,120]
widget_margins: [5,5]
columns: 8
clock:
widget_type: clock
temp_esterna:
widget_type: temperature
title: Temp esterna
entity: sensor.netatmo_zatmoe_temperature
temp_interna:
widget_type: temperature
title: Temp interna
entity: sensor.netatmo_zatmoi0_temperature
luce_cucina:
widget_type: light
title: Luce cucina
entity: light.hue_lightstrip_plus_1
on_attributes:
brightness: 100
color_temp: 250
luce_pranzo:
widget_type: light
title: Luce cucina
entity: light.hue_pranzo
on_attributes:
brightness: 100
color_temp: 250
cancello:
widget_type: switch
title: Cancello
entity: switch.cancello
state_text: 1
reload:
widget_type: reload
I hope I provided all the information required.
Thank you for your help
SoL