Community Hass.io Add-on: AppDaemon2

This add-on is provided by the Community Hass.io Add-ons project.

:hugs: Installed one of our add-ons? Leave a reply and like this topic! :+1: Thx!

GitHub Release Project Stage Project Maintenance CircleCI

Supports armhf Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

About


AppDaemon is a loosely coupled, multithreaded, sandboxed python execution environment for writing automation apps for Home Assistant home automation software. It also provides a configurable dashboard (HADashboard) suitable for wall mounted tablets.

:information_source: This add-on runs the AppDaemon v2.x.x branch.
The v2.x.x version is not backward compatible with the AppDaemon v3.x.x branch.

Installation


The installation of this add-on is pretty straightforward and not different in comparison to installing any other Hass.io add-on.

  1. Add our Hass.io add-ons repository to your Hass.io instance.
    Add the following URL: https://github.com/hassio-addons/repository
  2. Install the “AppDaemon2” add-on.
  3. Start the “AppDaemon2” add-on
  4. Check the logs of the “AppDaemon2” add-on to see if everything went well.

:books: Please read the documentation for more information about the use and configuration of this add-on.

Contributing


This is an active open-source project. We are always open to people who want to use the code or contribute to it. We’ve set up a separate document for our contribution guidelines.

Thank you for being involved! :heart_eyes:

Support


You can always get support here at the Home Assistant community forums, join the conversation!

You have several options to get them answered:

You could also open an issue on GitHub:

We will do our best to help you out!

Repository on GitHub


Looking for more add-ons?


The primary goal of our add-ons project is to provide you (as a Hassio / Home Assistant user) with additional, high quality, add-ons that allow you to take your automated home to the next level.

Check out some of our other add-ons in our Community Hass.io Add-ons project.

4 Likes

About the author of this add-on

Hi there!

I am Franck Nijhof, and I have 30 years of programming experience, in many languages. I am using this experience to work on the Home Assistant project by giving back my knowledge and time to the open source community.

The add-on you are currently looking at right now was developed/packaged by me. It is not the only add-on I have created; there are many many more :wink:

However, I have a problem… I am an addict. A :coffee: addict that is. Lucky for you, I turn that C8H10N4O2 (caffeine molecule) into code (and add-ons)!

If you want to show your appreciation, consider supporting me for buying a cup of high octane wakey juice via one of the platforms below! :heart:

Sponsor Frenck via GitHub Sponsors

Support Frenck on Patreon

Enjoy your add-on, while I enjoy the brain juice. :coffee:

Thanks for all the :two_hearts:

…/Frenck

Join our Discord server Follow me on Twitter Flollow me on Instragram Follow me on GitHub Follow me on YouTube Follow me on Twitch patreon-icon

P.S.: In case you want to ask me a question: AMA (Ask Me Anything). Most of the time I am online at the Discord chat. (I go by @Frenck in there as well).

:tada: Add-on: AppDaemon v0.1.0

Time for yet another new add-on. There was already an add-on out there somewhere, but it is outdated. I hope this one helps you guys.

AppDaemon is a loosely coupled, multithreaded, sandboxed python execution environment for writing automation apps for Home Assistant home automation software. It also provides a configurable dashboard (HADashboard) suitable for wall mounted tablets.

Added

  • Initial release :tada:

Since this is the first release of this add-on, I’m looking forward to your feedback!

8 Likes

im getting an internal 500 error when connecting to the dashboard

   2017-10-30 17:48:57.426694 WARNING ------------------------------------------------------------
2017-10-30 17:48:57.427253 WARNING Unexpected error during loading of ._hello.py:
2017-10-30 17:48:57.427783 WARNING ------------------------------------------------------------
2017-10-30 17:48:57.430018 WARNING Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 901, in read_app
    conf.modules[module_name] = importlib.import_module(module_name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 121, in import_module
    raise TypeError(msg.format(name))
TypeError: the 'package' argument is required to perform a relative import for '._hello'
2017-10-30 17:48:57.430572 WARNING ------------------------------------------------------------
2017-10-30 17:48:57.431102 INFO App initialization complete
2017-10-30 17:48:57.432356 INFO Starting dashboard
2017-10-30 17:48:57.449068 INFO API is disabled
2017-10-30 17:48:57.464436 INFO Connected to Home Assistant 0.56.2
Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 416, in start
    resp = yield from self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 329, in _handle
    [middleware for middleware in app.middlewares
AssertionError: Handler <function secure.<locals>.wrapper at 0x7534c0c0> should return response instance, got <class 'dict'> [middlewares []]

Try changing this in the /config/appdaemon/appdaemon.yml file:

dash_url: http://127.0.0.1:5050

To match your actual URL.

yeah tried ip, tried hassio nothing worked sadly. did fresh install. same thing. it starts up. apps running fine. connects to hassio no issues but 500 each time. tried different ports. still nothing.

:tada: Add-on: AppDaemon v0.2.0

Full Changelog

Added

  • Added webui link to add-on configuration #2
  • Added commtype switch #1

This update is now available in your Hass.io panel.

Hi!

I tried the addon but it doesn’t start properly, i’m unable to add the commtype options. here’s the logs info:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: AppDaemon v0.2.0
 Python Apps and HADashboard 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] 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] 50-compiled-symlink.sh: executing... 
[cont-init.d] 50-compiled-symlink.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
starting version 3.2.2
[services.d] done.
usage: appdaemon [-h] [-c CONFIG] [-p PIDFILE] [-t TICK] [-s STARTTIME]
                 [-e ENDTIME] [-i INTERVAL]
                 [-D {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v]
                 [--commtype {SSE,WEBSOCKETS}] [--convertcfg] [-d]
appdaemon: error: argument --commtype: invalid choice: '' (choose from 'SSE', 'WEBSOCKETS')

Here’s the supervisor log confirming the problem.

17-11-01 02:01:22 INFO (SyncWorker_9) [hassio.dock.addon] Start docker addon hassioaddons/appdaemon-armhf with version 0.2.0
17-11-01 02:02:55 WARNING (MainThread) [hassio.addons.validate] Unknown options commtype
1 Like

more issues sadly

usage: appdaemon [-h] [-c CONFIG] [-p PIDFILE] [-t TICK] [-s STARTTIME]
                 [-e ENDTIME] [-i INTERVAL]
                 [-D {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v]
                 [--commtype {SSE,WEBSOCKETS}] [--convertcfg] [-d]
appdaemon: error: argument --commtype: invalid choice: '' (choose from 'SSE', 'WEBSOCKETS')
usage: appdaemon [-h] [-c CONFIG] [-p PIDFILE] [-t TICK] [-s STARTTIME]
                 [-e ENDTIME] [-i INTERVAL]
                 [-D {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v]
                 [--commtype {SSE,WEBSOCKETS}] [--convertcfg] [-d]
appdaemon: error: argument --commtype: invalid choice: '' (choose from 'SSE', 'WEBSOCKETS')

@Sparck75 & @Dominic. Thank you for these reports. I will release a fix asap.

:tada: Add-on: AppDaemon v0.2.1

Full Changelog

Fixed

  • Not possible to save commtype #4

This update is now available in your Hass.io panel.

2 Likes

you rock. thanks heaps for all your work

Actually, i was wrong… nothing gets deleted…

However, the path use by the image look for appdaemon.yaml inside /config/appdaemon instead of /config/hadaemon like it is right now … therefore, it creates the folder and default file (which is ok).

So people that use my image or vkorn image should be aware of this change when using the new image.

After that the only change I had to made was to add the port :5050 in my dash_url to make it work.

Everything run fine so far.

Sorry for the confusion!
Sparck

:tada: Add-on: AppDaemon v0.2.2

Full Changelog

Changed

  • Updated AppDaemon to v2.1.12

Removed

  • Removes repository.json to prevent user to install wrong repo
  • Removes Gratipay from README, since it is EOL

This update is now available in your Hass.io panel.

1 Like

I added this to hass.io via the community repo and am getting the following:

[services.d] starting services
starting version 3.2.2
[services.d] done.
2017-11-28 19:55:13.699833 INFO AppDaemon Version 2.1.12 starting
2017-11-28 19:55:13.701145 INFO Configuration read from: /config/appdaemon/appdaemon.yaml
2017-11-28 19:55:13.977231 WARNING Unable to connect to Home Assistant, retrying in 5 seconds
2017-11-28 19:55:19.256719 WARNING Unable to connect to Home Assistant, retrying in 5 seconds

I have tried https://localhost, https://192.168.1.11 and https://myname.duckdns.org, in various combinations for both the ha_url with :8123 and the dash_url with :5050.

Any idea of what to try next?

Thanks

1 Like

I also tried using my duckdns https URL and the paths to the ssl cert and key, but no luck…

HASS:
  ha_url: https://myname.duckdns.org:8123
HADashboard:
  dash_url: https://myname.duckdns.org:5050
  dash_dir: /config/appdaemon/dashboards
  dash_ssl_certificate: /ssl/fullchain.pem
  dash_ssl_key: /ssl/privkey.pem

Got it working… Two problems…

The config needed my hass http frontend password and the add-on’s IP was banned.

HASS:
  ha_url: https://myname.duckdns.org:8123
  ha_key: passwordhere

This is awesome! Thanks!

2 Likes

One note… The Open Web UI button opens http and not https even though dash_url has https. Does this need to be set by an option in the add-on’s Options panel?

:tada: Add-on: AppDaemon v0.3.0

Full Changelog

Changed

  • Upgrades add-on base image to v1.2.0
  • Improves S6 service script
  • Updates add-on URLs to new community forum URL
  • Moves copy of rootfs at a later stage

This update is now available in your Hass.io panel.

This is unfortunately not fixable. The the “Is this add-on running on SSL?” question/setting is not managed by Hass.io itself, but by the AppDaemon. There is no way for Hass.io to detect the correct setting in this case.

So I choose it to have the “default-out-of-the-box” setting, non-ssl.

Sorry for this, but I have no way of making it work correctly at this moment.