Getting "Handshake status 404 Not Found" when setting up AppDaemon

I am trying to install AppDaemon and have followed the instructions for installing in Docker, however when I run AD it cannot connect to HA and (repeatedly) throws the following exception:

2020-03-24 20:09:07.568299 DEBUG HASS: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/appdaemon/plugins/hass/", line 224, in get_updates = websocket.create_connection(
  File "/usr/local/lib/python3.8/site-packages/websocket/", line 515, in create_connection
    websock.connect(url, **options)
  File "/usr/local/lib/python3.8/site-packages/websocket/", line 226, in connect
    self.handshake_response = handshake(self.sock, *addrs, **options)
  File "/usr/local/lib/python3.8/site-packages/websocket/", line 80, in handshake
    status, resp = _get_resp_headers(sock)
  File "/usr/local/lib/python3.8/site-packages/websocket/", line 165, in _get_resp_headers
    raise WebSocketBadStatusException("Handshake status %d %s", status, status_message, resp_headers)
websocket._exceptions.WebSocketBadStatusException: Handshake status 404 Not Found

I am running AppDaemon using the following command:

docker run --rm -it -p 5050:5050 -v /Volumes/docker/home-assistant-appdaemon:/conf acockburn/appdaemon:latest -D DEBUG

My appdaemon.yaml looks like:

  latitude: -37.XXX
  longitude: 175.XXX
  elevation: 40
  time_zone: Pacific/Auckland
      type: hass

I can paste into a browser and HA loads successfully, so I think ha_url is fine. I can also load the AD dashboard at successfully.

Any suggestions for what might be wrong?

Try removing the trailing slash from ha_url and url. Everything else in your config looks the same as mine.

And here is my docker run command for your reference:

docker run --name=appdaemon -d -p 5050:5050 --restart=always  -e HA_URL=""   -e TOKEN="MYLONGLIVEDTOKEN" -e DASH_URL="" -v /home/appdaemon:/conf acockburn/appdaemon:latest

Thanks @tjntomas, that was the issue. I actually had two problems trying to set AppDaemon up:

  1. AppDaemon won’t connect to the HTTPS port of your HA instance, so I had to use the local-network-only HTTP port
  2. AppDaemon doesn’t seem to tolerate trailing slashes in the HA URL

It seems to be working now. Thanks a lot.