Community Hass.io Add-on: AppDaemon 3

I get this error and can’t start app daemon:

18-06-05 21:12:10 ERROR (SyncWorker_15) [hassio.docker] Can’t create container from addon_a0d7b954_appdaemon3: 409 Client Error: Conflict (“Conflict. The container name “/addon_a0d7b954_appdaemon3” is already in use by container “9f4f226c54c73f503dbb3b8c1a34847f28fa595fdc992bbbc2e0170d49c9a842”. You have to remove (or rename) that container to be able to reuse that name.”)

I can’t figure out how to fix it. Have tried uninstall and reinstall but get the same message.
I run hass.io 0.70.1
And supervisor 105

This is an Hassio issue, not an add-on issue, maybe try the Discord chat, there are probably people around that can help you fix that. (I’ve seen it in the chat before).

i have been searching and found nothing on this. Also tried several backup restores with wipe, but still it wont start. cant seem to figure this one out…

Hello since last version of HA when I try to arm the alarm panel with the alarm widget I get this error

2018-06-11 18:57:34.415489 INFO HADashboard: New dashboard connected: Main Panel
2018-06-11 18:57:36.984700 WARNING HADasboard: ------------------------------------------------------------
2018-06-11 18:57:36.984881 WARNING HADasboard: Unexpected error in call_service()
2018-06-11 18:57:36.985037 WARNING HADasboard: ------------------------------------------------------------
2018-06-11 18:57:36.985438 WARNING HADasboard: Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/appdaemon/rundash.py”, line 319, in call_service
service = data[“service”]
File “multidict_multidict.pyx”, line 140, in multidict._multidict._Base.getitem
File “multidict_multidict.pyx”, line 135, in multidict._multidict._Base._getone
KeyError: “Key not found: ‘service’”

2018-06-11 18:57:36.985568 WARNING HADasboard: ------------------------------------------------------------

any ideas ?

:tada: Release v1.2.0

Full Changelog

Changed

  • Upgrades base image in GitLab CI to 1.4.2
  • Rewrites GitLab CI
  • Upgrades base image to v1.4.2
  • Moves build-env to latest

Removed

  • Removes old links

Since this morning it stopped working, not sure what it is. Not sure when stopped working, was working fine few days ago (not sure if only before updating to 1.2 or not)

I do have HASSIO 0.71, on a UBUNTU-NUC, in my HASSIO ADDON 1.2.0, when I click START it does not start, and nothing in the log (“Error grabbing logs: EOF”).

I also deleted my backup folder (contained many big files), thinking was a space problem, but no

I didn’t know there was HASSIo LOG, I get thsi

18-06-15 15:48:42 INFO (SyncWorker_7) [hassio.docker.interface] Clean hassioaddons/appdaemon3-amd64 docker application
18-06-15 15:48:43 ERROR (SyncWorker_7) [hassio.docker] Can't start addon_a0d7b954_appdaemon3: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_appdaemon3 (863fd7f86bd8c51c20d157081686fcb6fa6444da67d4d9a74cd329e82fbb9e1a): Bind for 0.0.0.0:5000 failed: port is already allocated")
18-06-15 15:51:56 INFO (SyncWorker_10) [hassio.docker.interface] Clean hassioaddons/appdaemon3-amd64 docker application
18-06-15 15:51:56 ERROR (SyncWorker_10) [hassio.docker] Can't start addon_a0d7b954_appdaemon3: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_appdaemon3 (dcb5e3a12dde26bffd2c5d3653234c6bbdbe83866b85abf6d5181880384ee2b4): Bind for 0.0.0.0:5000 failed: port is already allocated")
18-06-15 15:52:07 INFO (SyncWorker_15) [hassio.docker.interface] Clean hassioaddons/appdaemon3-amd64 docker application
18-06-15 15:52:08 ERROR (SyncWorker_15) [hassio.docker] Can't start addon_a0d7b954_appdaemon3: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_appdaemon3 (c21073b87e8ff83646d11c0716a38c481747973a9130e77adec047aa6a29d595): Bind for 0.0.0.0:5000 failed: port is already allocated")
18-06-15 15:52:10 INFO (SyncWorker_18) [hassio.docker.interface] Clean hassioaddons/appdaemon3-amd64 docker application
18-06-15 15:52:11 ERROR (SyncWorker_18) [hassio.docker] Can't start addon_a0d7b954_appdaemon3: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_appdaemon3 (60d7c87cbdfea292ba47f71d3112815433b28aa97363a72a7853386bd0e5b134): Bind for 0.0.0.0:5000 failed: port is already allocated")
18-06-15 15:52:12 INFO (SyncWorker_17) [hassio.docker.interface] Clean hassioaddons/appdaemon3-amd64 docker application
18-06-15 15:52:12 INFO (SyncWorker_17) [hassio.docker.interface] Remove docker hassioaddons/appdaemon3-amd64 with latest and v1.2.0
18-06-15 15:52:12 INFO (MainThread) [hassio.addons.addon] Remove Home-Assistant addon data folder /data/addons/data/a0d7b954_appdaemon3
18-06-15 15:52:29 INFO (MainThread) [hassio.addons.addon] Create Home-Assistant addon data folder /data/addons/data/a0d7b954_appdaemon3
18-06-15 15:52:29 INFO (SyncWorker_17) [hassio.docker.interface] Pull image hassioaddons/appdaemon3-amd64 tag 1.2.0.
18-06-15 15:52:30 INFO (SyncWorker_17) [hassio.docker.interface] Tag image hassioaddons/appdaemon3-amd64 with version 1.2.0 as latest
18-06-15 15:52:32 ERROR (SyncWorker_17) [hassio.docker] Can't start addon_a0d7b954_appdaemon3: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_appdaemon3 (f9287b1965caa553a20b6be1f87bd876ecd10d1041b7d711b8269d457bdee326): Bind for 0.0.0.0:5000 failed: port is already allocated")
18-06-15 15:56:28 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
18-06-15 15:57:20 INFO (SyncWorker_17) [hassio.docker.interface] Clean hassioaddons/appdaemon3-amd64 docker application
18-06-15 15:57:20 ERROR (SyncWorker_17) [hassio.docker] Can't start addon_a0d7b954_appdaemon3: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_appdaemon3 (aeb54d929230c66cc09fc6b62820b10fce3f0360cbbb5de676171b47bf20d2f2): Bind for 0.0.0.0:5001 failed: port is already allocated")

I guess port 5000 and 5001 are used by something else … strange, I haven’t touched them in the past, I put 5009 and now its working.

I don’t know what that port is for though … I always use 5050

:tada: Release v1.3.0

Full Changelog

Changed

  • Upgrades base image to v2.0.0
  • Upgrades Hadolint to the latest version
  • Upgrades gcc to 6.4.0-r8
  • Upgrades python to 3.6.4-r1
  • Upgrades base image to v2.0.1
1 Like

Appdaemon doesn’t work since yesterday. It seems like the same problem as on Node Red.

Home assistant says: "Login attempt failed

Login attempt or request with invalid authentication from 172.30.32.2"

One of the entries in the error log:
2018-07-24 21:39:14.264836 WARNING AppDaemon: ------------------------------------------------------------
2018-07-24 21:46:24.367466 WARNING AppDaemon: ------------------------------------------------------------
2018-07-24 21:46:24.368382 WARNING AppDaemon: Unexpected error in worker for App Motion_with_dimming:
2018-07-24 21:46:24.369280 WARNING AppDaemon: Worker Ags: {‘name’: ‘Motion_with_dimming’, ‘id’: UUID(‘796cace4-da6c-42cf-8954-b610ebfe83a5’), ‘type’: ‘attr’, ‘function’: <bound method motion_dimming.motion_on of <motion_dim.motion_dimming object at 0x746311d0>>, ‘attribute’: ‘state’, ‘entity’: ‘binary_sensor.sensor’, ‘new_state’: ‘on’, ‘old_state’: ‘off’, ‘kwargs’: {‘new’: ‘on’, ‘handle’: UUID(‘e35e7a6b-36f0-4190-a370-1a67092f66cd’)}}
2018-07-24 21:46:24.370021 WARNING AppDaemon: ------------------------------------------------------------
2018-07-24 21:46:24.373026 WARNING AppDaemon: Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 590, in worker
self.sanitize_state_kwargs(app, args[“kwargs”]))
File “/config/appdaemon/apps/motion_dim.py”, line 15, in motion_on
self.turn_on(self.args[“lightID”], brightness_pct = desired_dimval)
File “/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py”, line 22, in func_wrapper
return func(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py”, line 330, in turn_on
self.call_service(“homeassistant/turn_on”, **rargs)
File “/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py”, line 22, in func_wrapper
return func(*args, **kwargs)
File “/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassapi.py”, line 457, in call_service
r.raise_for_status()
File “/usr/lib/python3.6/site-packages/requests/models.py”, line 939, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://hassio/homeassistant/api/services/homeassistant/turn_on
2018-07-24 21:46:24.373961 WARNING AppDaemon: ------------------------------------------------------------

I have basically the same problem with HADashboard

2018-07-23 19:44:40.639559 WARNING HADasboard: ------------------------------------------------------------
2018-07-23 19:44:40.640156 WARNING HADasboard: Unexpected error in call_service()
2018-07-23 19:44:40.641790 WARNING HADasboard: ------------------------------------------------------------
2018-07-23 19:44:40.644942 WARNING HADasboard: Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/appdaemon/rundash.py”, line 341, in call_service
await plugin.call_service (service, **args)
File “/usr/lib/python3.6/site-packages/appdaemon/plugins/hass/hassplugin.py”, line 360, in call_service
r.raise_for_status()
File “/usr/lib/python3.6/site-packages/aiohttp/client_reqrep.py”, line 718, in raise_for_status
headers=self.headers)
aiohttp.client_exceptions.ClientResponseError: 401, message=‘Unauthorized’

The issue has been identified and is with the Hass.io Supervisor.
A fix will be implemented asap.

Supervisor 120 has been release, addressing this issue.

image

Hit the reload button to trigger the refresh, hit update to install.

I’m running Hass.io on top of resinOS and everything was working great. Last night I tried upgrading Hass from 0.73.2 to 0.75.2 and AppDaemon stopped working. So I downgraded to 0.73.2 and kept getting the same errors. I even restored a snapshot of a working system and it’s still broken.

Here is the Supervisor log:

    18-08-09 14:50:51 ERROR (MainThread) [asyncio] Task exception was never retrieved
    future: <Task finished coro=<WebSocketWriter.ping() done, defined at /usr/local/lib/python3.7/site-packages/aiohttp/http_websocket.py:617> exception=RuntimeError('unable to perform operation on <TCPTransport closed=True reading=False 0x7197a030>; the handler is closed')>
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/site-packages/aiohttp/http_websocket.py", line 621, in ping
        return await self._send_frame(message, WSMsgType.PING)
      File "/usr/local/lib/python3.7/site-packages/aiohttp/http_websocket.py", line 603, in _send_frame
        self.transport.write(header + message)
      File "uvloop/handles/stream.pyx", line 671, in uvloop.loop.UVStream.write
      File "uvloop/handles/handle.pyx", line 159, in uvloop.loop.UVHandle._ensure_alive
    RuntimeError: unable to perform operation on <TCPTransport closed=True reading=False 0x7197a030>; the handler is closed
    18-08-09 14:50:51 INFO (MainThread) [hassio.api.proxy] Home-Assistant Websocket API request initialze
    18-08-09 14:50:51 INFO (MainThread) [hassio.api.proxy] Websocket access from a0d7b954_appdaemon3
    18-08-09 14:50:52 ERROR (MainThread) [hassio.homeassistant] Can't update HomeAssistant access token!
    18-08-09 14:50:52 ERROR (MainThread) [hassio.api.proxy] Failed authentication to HomeAssistant websocket

Here is my appdaemon.yaml file:

log:
  logfile: /config/appdaemon/applogs/appdaemon.log
  log_size: 16384
  errorfile: /config/appdaemon/applogs/appdaemon.err
appdaemon:
  threads: 10
  app_dir: /config/appdaemon/apps
  api_port: 5000
  plugins:
    HASS:
      type: hass
      ha_url: http://192.168.0.3:8123
      ha_key: !secret home_assistant_key
hadashboard:
  dash_url: http://127.0.0.1:5050
  dash_dir: /config/appdaemon/dashboards

I am running behind an Apache reverse proxy, but like I said, this was working. This new authentication system is going to be the death of me.

did you change to the new user password authentication?
that isnt supported by AD yet.
but if i am correct you can change back to the old authentication way

I’ve tried it both ways.

Further checking shows that connections from my proxy machine into the Hass machine are being rejected by the Hass machine, so none of the reverse proxy authentication is working. I’m trying to figure out if resinOS (or Hass.io) has some kind of automatic IP blocking that would lock out my proxy machine. This is so strange. I’m about to nuke and pave, but I already did that about three weeks ago in response to problems I had with HassOS and Hass 0.74, so I’m not anxious to waste more time.

sorry i cant help you with that part.
i just wanted to make sure that you knew that the new authentication isnt supported by AD.(yet)
i never have worked with hassio, so i am not familiar with the problems that come with that.
i hope you find out what the problem is.

Today an update has been released for the Supervisor (125) and Home Assistant (0.75.3) to address authentication issues.

:tada: Release v1.4.0

Full Changelog

Fixed

  • Fixes YAMLlint error
  • Fixes incorrect processing of Hassio API token

Changed

  • Upgrades Base image to 2.1.1
  • Replaces Python yq with yq from base image
  • Sets default shell
  • Updates README and links

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v1.4.1

Full Changelog

Changed

  • Upgrades base image to v2.1.2

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like