Hey. I am new to the appdaemon topic and after I understand that the appdaemon.yaml need the old api-authentification to run I came to the point that it does not start with some error that it can not retrieve the vars from HA.
2018-10-30 10:11:49.788738 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: latitude
2018-10-30 10:11:49.789670 ERROR AppDaemon: AppDaemon is terminating
2018-10-30 10:11:49.796862 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: longitude
2018-10-30 10:11:49.797772 ERROR AppDaemon: AppDaemon is terminating
2018-10-30 10:11:49.798736 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: elevation
2018-10-30 10:11:49.799426 ERROR AppDaemon: AppDaemon is terminating
2018-10-30 10:11:49.800878 DEBUG AppDaemon: Event type:ha_stop:
2018-10-30 10:11:49.801668 DEBUG AppDaemon: None
2018-10-30 10:11:49.804180 INFO AppDaemon: HASS: Disconnecting from Home Assistant
2018-10-30 10:11:49.805711 DEBUG End Loop
2018-10-30 10:11:49.806469 INFO AppDeamon Exited
Nothing changed when I start it with or without sudo. My command is: “sudo appdaemon -c /home/homeassistant/.homeassistant/conf/ -D DEBUG”
I thought it could be something with the folder owner. I run my HA within python virtual-environment with the user and group ‘homeassistant’. So I changed all rights of the conf folder (under the root user with chmod -R conf) and within the conf folder:
> pi@raspberrypi:/home/homeassistant/.homeassistant $ ls -la
okay. I move the empty apps.yaml back to the apps folder.
Here is the full output+cmd:
pi@raspberrypi:~ $ appdaemon -c /home/homeassistant/.homeassistant/conf/ -D DEBUG
2018-10-30 21:40:38.998139 INFO AppDaemon Version 3.0.1 starting
2018-10-30 21:40:38.998773 INFO Configuration read from: /home/homeassistant/.homeassistant/conf/appdaemon.yaml
2018-10-30 21:40:38.999179 DEBUG AppDaemon Section: None
2018-10-30 21:40:38.999550 DEBUG HADashboard Section: None
2018-10-30 21:40:39.004510 WARNING config_file: /home/homeassistant/.homeassistant/conf/appdaemon.yaml is owned by homeassistant but appdaemon is running as pi
2018-10-30 21:40:39.006852 INFO AppDaemon: Starting Apps
2018-10-30 21:40:39.008594 WARNING config_dir: /home exists, but is not writeable, owner: root
2018-10-30 21:40:39.009273 WARNING config_dir: /home/homeassistant exists, but is not writeable, owner: homeassistant
2018-10-30 21:40:39.009924 WARNING config_dir: /home/homeassistant/.homeassistant exists, but is not writeable, owner: homeassistant
2018-10-30 21:40:39.010584 WARNING config_dir: /home/homeassistant/.homeassistant/conf exists, but is not writeable, owner: homeassistant
2018-10-30 21:40:39.013260 WARNING appdir: /home/homeassistant/.homeassistant/conf/apps is owned by homeassistant but appdaemon is running as pi
2018-10-30 21:40:39.013903 DEBUG AppDaemon: Creating worker threads …
2018-10-30 21:40:39.018546 DEBUG AppDaemon: Done
2018-10-30 21:40:39.019117 DEBUG AppDaemon: Entering run()
2018-10-30 21:40:39.019944 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-10-30 21:40:39.968964 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-10-30 21:40:39.970037 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-10-30 21:40:39.970677 DEBUG AppDaemon: Starting utility loop
2018-10-30 21:40:39.971248 INFO Dashboards are disabled
2018-10-30 21:40:39.971621 INFO API is disabled
2018-10-30 21:40:39.971958 DEBUG Start Loop
2018-10-30 21:40:39.988387 INFO AppDaemon: HASS: Connected to Home Assistant 0.81.1
2018-10-30 21:40:39.997145 DEBUG AppDaemon: HASS: get_ha_config()
2018-10-30 21:40:39.997684 DEBUG AppDaemon: HASS: get_ha_config: url is http://10.0.0.52:8123/api/config
2018-10-30 21:40:40.011899 DEBUG AppDaemon: HASS: get_ha_state: url is http://10.0.0.52:8123/api/states
2018-10-30 21:40:40.032265 DEBUG AppDaemon: HASS: Got state
2018-10-30 21:40:40.035291 INFO AppDaemon: Got initial state from namespace default
2018-10-30 21:40:41.990776 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: latitude
2018-10-30 21:40:41.991656 ERROR AppDaemon: AppDaemon is terminating
2018-10-30 21:40:41.998495 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: longitude
2018-10-30 21:40:41.999345 ERROR AppDaemon: AppDaemon is terminating
2018-10-30 21:40:42.000148 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: elevation
2018-10-30 21:40:42.000822 ERROR AppDaemon: AppDaemon is terminating
2018-10-30 21:40:42.002112 DEBUG AppDaemon: Event type:ha_stop:
2018-10-30 21:40:42.002900 DEBUG AppDaemon: None
2018-10-30 21:40:42.005415 INFO AppDaemon: HASS: Disconnecting from Home Assistant
2018-10-30 21:40:42.006870 DEBUG End Loop
2018-10-30 21:40:42.007617 INFO AppDeamon Exited
Yes, I can enter the internal ip from this appdaemon.yaml with the api-password with my browser.
Here the last 12 lines from my home-assistant configuration.yaml:
# Zeug um appdaemon nutzbar zu machen
http:
api_password: 16character_api_pass_like_this_G4Jsn4d2Sgj2D9Ds
# brauch man angeblich
homeassistant:
auth_providers:
- type: legacy_api_password
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
I hope that helps to get closer to a solution. I dont care (actually) about the dashboard but the apps could be really usefull. I really want to check the possibilities of appdaemon with HA. I was searching withing the other threads but found no solution.
Greetings by JamieMe
EDIT:
I regocnized that within my normal HA-Dashboard I got a message that says something about “sun” config
@DavidFW1960
No problem.
Here is my whole config (I change some data but keep the schematic):
#THIS IS THE RIGHT CONFIG
homeassistant:
# Name of the location where Home Assistant is running
name: My Home Assi
# Location required to calculate the time the sun rises and sets
latitude: 52.5096646
longitude: 13.37283
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 1.0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: Europe/Berlin
# Customization file
customize: !include customize.yaml
# Show links to resources in log and frontend
introduction:
# Enables the frontend
frontend:
# Enables configuration UI
config:
# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
# base_url: example.duckdns.org:8123
# Checks for available updates
# Note: This component will send some information about your system to
# the developers to assist with development of Home Assistant.
# For more information, please see:
# https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
updater:
# Optional, allows Home Assistant developers to focus on popular components.
include_used_components: true
# Discover some devices automatically
discovery:
# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
# Enables support for tracking state changes over time
history:
# View all events in a logbook
logbook:
# Enables a map showing the location of tracked devices
map:
# Track the sun
sun:
# Weather prediction
sensor:
- platform: yr
# Text to speech
tts:
- platform: google
language: 'de'
# Cloud
cloud:
# Homematic Funk bzw. HomeGear anbindung
homematic:
interfaces:
wireless:
host: 127.0.0.1
# Player
media_player:
- platform: samsungtv
host: 10.0.0.39
# Zeug um appdaemon nutzbar zu machen
http:
api_password: 16character_api_pass_like_this_G4Jsn4d2Sgj2D9Ds
# brauch man angeblich
homeassistant:
auth_providers:
- type: legacy_api_password
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
@gpbenton
Jep, I read that while doing research what could be the problem in another thread here. I try it many times with sudo, pi or homeassistant user. Here the output, some minutes ago:
pi@raspberrypi:/home/homeassistant/.homeassistant $ sudo -u homeassistant -H -s
homeassistant@raspberrypi:~/.homeassistant $ appdaemon -c /home/homeassistant/.homeassistant/conf -D DEBUG
2018-10-31 10:29:01.910400 INFO AppDaemon Version 3.0.1 starting
2018-10-31 10:29:01.911042 INFO Configuration read from: /home/homeassistant/.homeassistant/conf/appdaemon.yaml
2018-10-31 10:29:01.911602 DEBUG AppDaemon Section: None
2018-10-31 10:29:01.911978 DEBUG HADashboard Section: None
2018-10-31 10:29:01.917253 INFO AppDaemon: Starting Apps
2018-10-31 10:29:01.919112 WARNING config_dir: /home exists, but is not writeable, owner: root
2018-10-31 10:29:01.922497 DEBUG AppDaemon: Creating worker threads …
2018-10-31 10:29:01.927403 DEBUG AppDaemon: Done
2018-10-31 10:29:01.927934 DEBUG AppDaemon: Entering run()
2018-10-31 10:29:01.928640 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2018-10-31 10:29:02.839239 INFO AppDaemon: HASS: HASS Plugin Initializing
2018-10-31 10:29:02.840251 INFO AppDaemon: HASS: HASS Plugin initialization complete
2018-10-31 10:29:02.840888 DEBUG AppDaemon: Starting utility loop
2018-10-31 10:29:02.841454 INFO Dashboards are disabled
2018-10-31 10:29:02.841829 INFO API is disabled
2018-10-31 10:29:02.842163 DEBUG Start Loop
2018-10-31 10:29:02.860286 INFO AppDaemon: HASS: Connected to Home Assistant 0.81.1
2018-10-31 10:29:02.869465 DEBUG AppDaemon: HASS: get_ha_config()
2018-10-31 10:29:02.870477 DEBUG AppDaemon: HASS: get_ha_config: url is http://10.0.0.52:8123/api/config
2018-10-31 10:29:02.886011 DEBUG AppDaemon: HASS: get_ha_state: url is http://10.0.0.52:8123/api/states
2018-10-31 10:29:02.907693 DEBUG AppDaemon: HASS: Got state
2018-10-31 10:29:02.911124 INFO AppDaemon: Got initial state from namespace default
2018-10-31 10:29:04.863063 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: latitude
2018-10-31 10:29:04.864081 ERROR AppDaemon: AppDaemon is terminating
2018-10-31 10:29:04.870993 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: longitude
2018-10-31 10:29:04.872636 ERROR AppDaemon: AppDaemon is terminating
2018-10-31 10:29:04.874227 ERROR AppDaemon: Required attribute not set or obtainable from any plugin: elevation
2018-10-31 10:29:04.875640 ERROR AppDaemon: AppDaemon is terminating
2018-10-31 10:29:04.877985 DEBUG AppDaemon: Event type:ha_stop:
2018-10-31 10:29:04.879414 DEBUG AppDaemon: None
2018-10-31 10:29:04.882133 INFO AppDaemon: HASS: Disconnecting from Home Assistant
2018-10-31 10:29:04.884039 DEBUG End Loop
2018-10-31 10:29:04.885145 INFO AppDeamon Exited
homeassistant@raspberrypi:~/.homeassistant $
somehow the state from longtitude, latitude and elevation cant be get from HA.
at this point i got no idea why.
you seem to have HA running already at that point, so it cant be a race thing.
you use HA 0.81
i dont know if they changed something that causes this, but i dont think so.
but we can work around it untill we find out what is the trouble.
since 3.0.1 AD checks the whole path to the config and some needed dirs inside the config for the right filerights. and it reports where AD doesnt have access, so that reading the logs immediatly show problems.
config_dir is the part from AD that does that (like the appname that you normally see at that place)
since we know the whole path to the config we can say that this warning is unimportant.
if you go to http://10.0.0.52:8123 do you get your homeassistant gui?
when you do that in a browser that you didnt use before, can you login with api? (or remove password from the browser so that it asks it again)
in your HA config.
from reading the docs i thought it was needed too, but it seems that it can cause more trouble when its in and its not needed anyway. so please remove it, and restart HA.