Announcement: AppDaemon 3.0 beta 2

I’m taking a detailed look at this area soon - I’ve made some piecemeal changes over the releases and it’s time for me to rework it. I’ll also be making dependencies work at the app level instead of the module level.

2 Likes

in HAdashboard the
icon_on: mdi-door-open
icon_off: mdi-door-closed

is not recognised (no icon is chosen). This happens with some other icon as well. Not sure where the problem lays

These for exampe works well
icon_on: mdi-window-open
icon_off: mdi-window-closed

MDI adds new icons once in a while.
some new icons then are not recognized untill there is a new update in appdaemon.

Ok thanks, will wait update for putting the door icon

The next beta has the latest MDI icons.

I thought i can fix this issue from the beta 1 topic with a own skin.
Copied the default dashboard.css and variales.yaml to custom_css/skinname and started to play, but with no luck.
All i found that affects the sensor value was:

.widget {
  ...
  vertical-align: middle;
  ...
}

but it seems that only accepts top, middle or bottom.
Any hints on this?
Thanks in advance!

use the variables.yaml and just change where there is a problem. in this case the sensor variables.
i think you want to change the top from the container like top: 42px

1 Like

Thanks very much @ReneTode.
sensor_container_style: "margin-top: 30px" does what i want.

1 Like

I just finished upgrading to the beta and I have apps disabled but I am still receiving this error:

pi@raspberrypi:~ $ appdaemon -c /home/homeassistant/conf
2018-02-06 11:45:57.677528 INFO AppDaemon Version 3.0.0b2 starting
2018-02-06 11:45:57.678153 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2018-02-06 11:45:57.680273 INFO AppDaemon: Starting Apps
2018-02-06 11:45:57.680764 ERROR AppDaemon: Invalid value for app_dir: /home/homeassistant/conf/apps
2018-02-06 11:45:57.681152 INFO Dashboards are disabled
2018-02-06 11:45:57.681456 INFO API is disabled
2018-02-06 11:45:57.682595 INFO AppDeamon Exited

My config:

log:
  logfile: STDOUT
  errorfile: STDERR
appdaemon:
  disable_apps: 1   
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_url: http://URL
      ha_key: KEY
    HADashboard:
      dash_url: http://URL

Do I have to configure the test app?

FOr now, at least create the apps dir - I’ll fix it so disable_apps doesn’t require it in the next beta.

EDIT: No it’s working as designed from my testing - you just need

disable_apps: true

Ok, but now I get this:

pi@raspberrypi:~ $ appdaemon -c /home/homeassistant/conf
2018-02-06 11:58:38.017761 INFO AppDaemon Version 3.0.0b2 starting
2018-02-06 11:58:38.018405 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2018-02-06 11:58:38.021421 INFO AppDaemon: Apps are disabled
Traceback (most recent call last):
  File "/usr/local/bin/appdaemon", line 11, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/admain.py", line 341, in main
    admain.main()
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/admain.py", line 337, in main
    self.run(appdaemon, hadashboard)
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/admain.py", line 59, in run
    self.AD = ad.AppDaemon(self.logger, self.error, loop, **appdaemon)
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/appdaemon.py", line 236, in __init__
    self.app_config = self.read_config()
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/appdaemon.py", line 1458, in read_config
    if root[-11:] != "__pycache__":
TypeError: 'NoneType' object is not subscriptable

@aimc The error is much more simple if I try and start the appdaemon service:

Feb 06 12:00:42 raspberrypi systemd[1]: Started AppDaemon.
Feb 06 12:00:45 raspberrypi appdaemon[25919]: Traceback (most recent call last):
Feb 06 12:00:45 raspberrypi appdaemon[25919]:   File "/usr/local/bin/appdaemon", line 11, in <module>
Feb 06 12:00:45 raspberrypi appdaemon[25919]:     sys.exit(main())
Feb 06 12:00:45 raspberrypi appdaemon[25919]:   File "/usr/local/lib/python3.5/dist-packages/appdaemon/admain.py", line 230, in main
Feb 06 12:00:45 raspberrypi appdaemon[25919]:     conf.logfile = config['AppDaemon'].get("logfile")
Feb 06 12:00:45 raspberrypi appdaemon[25919]: KeyError: 'AppDaemon'

There have been changes in b3 that seem to address this, it works fine for me on my dev version.

For now, add the hello world app and re-enable apps.

@aimc Still the same error after enabling apps. Something to do with logs?
Should I uninstall and start from scratch?

Feb 06 12:25:02 raspberrypi systemd[1]: Started AppDaemon.
Feb 06 12:25:05 raspberrypi appdaemon[26435]: Traceback (most recent call last):
Feb 06 12:25:05 raspberrypi appdaemon[26435]:   File "/usr/local/bin/appdaemon", line 11, in <module>
Feb 06 12:25:05 raspberrypi appdaemon[26435]:     sys.exit(main())
Feb 06 12:25:05 raspberrypi appdaemon[26435]:   File "/usr/local/lib/python3.5/dist-packages/appdaemon/admain.py", line 230, in main
Feb 06 12:25:05 raspberrypi appdaemon[26435]:     conf.logfile = config['AppDaemon'].get("logfile")
Feb 06 12:25:05 raspberrypi appdaemon[26435]: KeyError: 'AppDaemon'
Feb 06 12:25:05 raspberrypi systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Feb 06 12:25:05 raspberrypi systemd[1]: [email protected]: Unit entered failed state.
Feb 06 12:25:05 raspberrypi systemd[1]: [email protected]: Failed with result 'exit-code'.

Sorry missed that - the fact it is asking for AppDameon means you aren’t
running 3.0b2 from systemd - I suspect you have 2 different installs.

@aimc So I uninstalled appdaemon and installed the beta again. Created the conf directory with apps directory and appdaemon.yaml. Inside apps directory I have apps.yaml and hello.py.

hello.py:

import appdaemon.plugins.hass.hassapi as hass

#
# Hello World App
#
# Args:
#

class HelloWorld(hass.Hass):

  def initialize(self):
     self.log("Hello from AppDaemon")
     self.log("You are now ready to run Apps!")

apps.yaml:

hello_world:
  module: hello
  class: HelloWorld

appdaemon.yaml:

appdaemon:
  logfile: STDOUT
  errorfile: STDERR
  logsize: 100000
  log_generations: 3
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_url: http://URL
      ha_key: KEY
      namespace: default
    HADashboard:
      dash_url: http://URL

Anything else I am missing?

@aimc Made some progress. Now If I remove the:

HADashboard:
  dash_url: http://URL

from the appdaemon.yaml, appdaemon starts with no errors but if I add then I get:

pi@raspberrypi:~ $ appdaemon -c /home/homeassistant/conf
2018-02-06 13:58:34.596040 INFO AppDaemon Version 3.0.0b2 starting
2018-02-06 13:58:34.597068 INFO Configuration read from: /home/homeassistant/conf/appdaemon.yaml
2018-02-06 13:58:34.599367 INFO AppDaemon: Starting Apps
Traceback (most recent call last):
  File "/usr/local/bin/appdaemon", line 11, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/admain.py", line 341, in main
    admain.main()
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/admain.py", line 337, in main
    self.run(appdaemon, hadashboard)
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/admain.py", line 59, in run
    self.AD = ad.AppDaemon(self.logger, self.error, loop, **appdaemon)
  File "/home/pi/.local/lib/python3.5/site-packages/appdaemon/appdaemon.py", line 257, in __init__
    basename = self.plugins[name]["type"]
KeyError: 'type'

Up and running :slight_smile: . Here’s my config in case someone runs into these issues:

log:
  logfile: STDOUT
  errorfile: STDERR
  logsize: 100000
  log_generations: 3
appdaemon:
  threads: 10
  plugins:
    HASS:
      type: hass
      ha_url: http://URL
      ha_key: KEY
      namespace: default
hadashboard:
  dash_url: http://URL
1 Like

get_state() seems to have slightly different behavior when attempting to grab the entire state dictionary via attribute=all.

Example: self.get_state('input_boolean.test', attribute=all) returns only the attributes of that input boolean; the state itself is not included in the dictionary:

{'friendly_name': 'Test', 'icon': 'mdi:calendar'}

Yes, that’s right, a little bug crept in and it’s already fixed, the fix will be in the next beta, probably this weekend :slight_smile:

1 Like