hassio-addons / addon-appdaemon2 Goto Github PK
View Code? Open in Web Editor NEWAppDaemon2 - DEPRECATED - Community Hass.io Add-on for Home Assistant
License: MIT License
AppDaemon2 - DEPRECATED - Community Hass.io Add-on for Home Assistant
License: MIT License
First thanks again for this new version ๐
With the 0.40 version I can connect to Home Assistant (hass.io 0.60) using
ha_url: http://homeassistant:8123
in appdaemon.yaml.
When using the recommended url
ha_url: http://hassio/homeassistant
I get the following error:
2018-01-07 23:53:07.247416 INFO AppDaemon Version 2.1.12 starting
2018-01-07 23:53:07.247629 INFO Configuration read from: /config/appdaemon/appdaemon.yaml
2018-01-07 23:53:07.247776 DEBUG AppDaemon Section: {'logfile': 'STDOUT', 'errorfile': 'STDERR', 'threads': 10, 'app_dir': '/config/appdaemon/apps'}
2018-01-07 23:53:07.247903 DEBUG Hass Section: {'ha_url': 'http://hassio/homeassistant'}
2018-01-07 23:53:07.248043 DEBUG HADashboard Section: {'dash_url': 'http://127.0.0.1:5050', 'dash_dir': '/config/appdaemon/dashboards'}
2018-01-07 23:53:07.248162 DEBUG Calling HA for config with key: and url: http://hassio/homeassistant
2018-01-07 23:53:07.248268 DEBUG get_ha_config()
2018-01-07 23:53:07.248387 DEBUG get_ha_config: url is http://hassio/homeassistant/api/config
2018-01-07 23:53:07.261722 DEBUG Success
2018-01-07 23:53:07.261911 DEBUG {'components':..., 'version': '0.60.0', 'whitelist_external_dirs': ['/config/www']}
2018-01-07 23:53:07.305312 INFO Starting Apps
2018-01-07 23:53:07.305529 DEBUG Entering run()
2018-01-07 23:53:07.318479 DEBUG Creating worker threads ...
2018-01-07 23:53:07.320344 DEBUG Done
2018-01-07 23:53:07.320505 DEBUG Calling HA for initial state with key: and url: http://hassio/homeassistant
2018-01-07 23:53:07.320588 DEBUG Refreshing HA state
2018-01-07 23:53:07.320675 DEBUG get_ha_state: url is http://hassio/homeassistant/api/states
2018-01-07 23:53:07.347400 INFO Got initial state
2018-01-07 23:53:07.347681 DEBUG Reading Apps
2018-01-07 23:53:07.347960 INFO Loading Module: /config/appdaemon/apps/hello.py
2018-01-07 23:53:07.348500 INFO Loading Object hello_world using class HelloWorld from module hello
2018-01-07 23:53:07.404350 INFO hello_world: Hello from AppDaemon
2018-01-07 23:53:07.405227 INFO hello_world: You are now ready to run Apps!
2018-01-07 23:53:07.405366 INFO App initialization complete
2018-01-07 23:53:07.405466 DEBUG Starting timer loop
2018-01-07 23:53:07.405650 INFO Starting dashboard
2018-01-07 23:53:07.409604 INFO API is disabled
2018-01-07 23:53:07.409764 DEBUG Start Loop
2018-01-07 23:53:07.413487 WARNING Disconnected from Home Assistant, retrying in 5 seconds
2018-01-07 23:53:07.413659 WARNING ------------------------------------------------------------
2018-01-07 23:53:07.413821 WARNING Unexpected error:
2018-01-07 23:53:07.413918 WARNING ------------------------------------------------------------
2018-01-07 23:53:07.414148 WARNING Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py", line 1213, in appdaemon_loop
result["ha_version"]))
KeyError: 'ha_version'
2018-01-07 23:53:07.414257 WARNING ------------------------------------------------------------
Just updated this add-on to 1.1.0 running on hass.io 0.64.2, and suddenly dashboards don't work. They do load and display, but tapping buttons, now only log an error.
Config:
{
"log_level": "info",
"commtype": "sse",
"system_packages": [],
"python_packages": []
}
Dashboard buttons should turn lights on/off.
AppDaemon2 log displays:
2018-03-02 20:22:09.403862 INFO New dashboard connected: Kitchen Panel
2018-03-02 20:22:23.435239 WARNING Excessive time spent in scheduler loop: 5428.0ms
2018-03-02 20:22:23.437046 WARNING Scheduler clock skew detected - delta = 4.433150053024292 - resetting
Error handling request
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 381, in start
resp = await self._request_handler(request)
File "/usr/lib/python3.6/site-packages/aiohttp/web_app.py", line 310, in _handle
resp = await handler(request)
File "/usr/lib/python3.6/asyncio/coroutines.py", line 213, in coro
res = yield from res
File "/usr/lib/python3.6/site-packages/appdaemon/rundash.py", line 181, in call_service
data = yield from request.post()
TypeError: cannot 'yield from' a coroutine object in a non-coroutine generator
In the browser console:
POST http://10.0.1.160:5050/call_service 500 (Internal Server Error)
send @ jquery-3.1.1.min.js:4
ajax @ jquery-3.1.1.min.js:4
r.(anonymous function) @ jquery-3.1.1.min.js:4
WidgetBase.call_service @ dashboard.js:217
OnButtonClick @ application.js:1244
(anonymous) @ dashboard.js:238
dispatch @ jquery-3.1.1.min.js:3
q.handle @ jquery-3.1.1.min.js:3
hi,
Not sure why but I can't get your repository to install appdaemon. I'm very much a newb to hassio and so I don't really understand the error messages, but below is a dump from my log from where it tried to install appdaemon.
Thanks in advance.
17-11-11 22:11:03 INFO (MainThread) [hassio.addons.git] Clone addon https://github.com/hassio-addons/addon-appdaemon repository
17-11-11 22:11:09 INFO (MainThread) [hassio.addons.git] Remove custom addon repository https://github.com/home-assistant/hassio-addons-example
17-11-11 22:11:10 INFO (MainThread) [hassio.addons] Load addons: 19 all - 1 new - 2 remove
17-11-11 22:11:16 INFO (MainThread) [hassio.addons.addon] Create Home-Assistant addon data folder /data/addons/data/7bffb3a1_appdaemon
17-11-11 22:11:16 INFO (SyncWorker_11) [hassio.dock.addon] Start build 7bffb3a1/armhf-addon-appdaemon:dev
17-11-11 22:11:19 ERROR (MainThread) [aiohttp.server] 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 323, in _handle
resp = yield from handler(request)
File "/usr/lib/python3.6/site-packages/hassio/api/util.py", line 31, in wrap_api
answer = await method(api, *args, **kwargs)
File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 474, in install
if not await self.docker.install(self.last_version):
File "/usr/lib/python3.6/site-packages/hassio/dock/util.py", line 18, in wrap_api
return await method(api, *args, **kwargs)
File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 219, in _install
return self._build(tag)
File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 232, in _build
image = self.docker.images.build(**build_env.get_docker_args(tag))
File "/usr/lib/python3.6/site-packages/docker/models/images.py", line 175, in build
raise BuildError(chunk['error'])
docker.errors.BuildError: Please provide a source image with `from` prior to commit
I have Home Assistant 0.64 and Hassio 0.95 on my Raspberry Pi 3
From three days after restarting Hassio it show me the following error...
18-02-25 22:20:26 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:27 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:27 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:27 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:27 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons
18-02-25 22:20:28 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:28 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons
18-02-25 22:20:29 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:29 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:29 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:29 WARNING (MainThread) [hassio.api.security] Invalid token for access /addons/a0d7b954_appdaemon/info
18-02-25 22:20:30 WARNING (MainThread) [hassio.api.security] Invalid token for access /supervisor/info
What's happening?
Add a configuration option to the add-on to allow a user to switch between different commtypes.
The commtype is using websockets by default, but in some cases, SSE is still used.
Hi,
I've seen this topic in the forum about the problem about refreshing the Dashboard:
It seems that it's refered to the Hassio addon of Appdaemon because in a python environment installation the problem does not exist.
Is someone working in this issue?
Information in the dashboard should be refreshed instantanously when any entity state is updated on homeassistant.
Dashboard has to be reloaded from the browser to refresh it.
Hass.io support adding links to the WebUI of an add-on. The link for the HADashboard needs to be added.
This allows users to jumpstart even quicker.
After 0.2.0, commtype is required in options, but isn't there by default, making the following error appear in the logs when appdaemon is started:
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')
But commtype can't be added to options:
{
"log_level": "info",
"commtype": "websockets"
}
Gives the following error in supervisor logs:
17-11-01 07:00:08 WARNING (MainThread) [hassio.addons.validate] Unknown options commtype
Error messages and unable to start appdeamon since last change.
See expected behavior above.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.