After frustration with automation through the UI, I would like to give appdaemon a shot and see whether that is the experience I am looking for.
However, most of the documentation regarding appdaemon seems pretty old and I also feel like it does not do a very good explaining the basics.
I am currently running home assistant OS on a virtual machine hosted by my local server.
My ideal setup would be something where I can develop automations on my local computer in my standard IDE (pycharm or visual studio), ideally in such a way that I can debug and test them locally if possible, and then when satisfied push them to github or directly to my local server, which picks up the automation and runs it.
However, I’m not sure whether such an environment is possible with appdaemon? and if it is how I might achieve it.
I have installed Appdaemon as an addon in home assistant.
I have tried to setup a uv environment on my local desktop and install appdaemon in this environment. However I think the guide is expecting this development environment to be on the same server as the actual home assistant since it requires access to the appdaemon.yaml file located on the server as far as I can see.
So how do I do this correctly? or how have you set up appdaemon?
I installed samba share addon, and from my desktop machine I can now access the config directory as: smb://192.168.0.5/addon_configs/a0d7b954_appdaemon
However I don’t think I quite get what you meant, if I just try to use it directly like this it does not work:
(AppDaemon_home_assistant) tue@tue-desktop:~/PycharmProjects/AppDaemon_home_assistant$ appdaemon -c smb://192.168.0.5/addon_configs/a0d7b954_appdaemon
ERROR: Error accessing configuration: /home/tue/PycharmProjects/AppDaemon_home_assistant/smb:/192.168.0.5/addon_configs/a0d7b954_appdaemon/appdaemon.yaml not found
So when you say to treat it as a git repo, are you suggesting I clone the samba folder locally, and then it should work?
Also your urls don’t look correct, depending on your os, you’d mount a folder on your dev pc that points to your config folder. Then it’s simple directory paths instead of urls.
But can we have two config folders, one to keep codes under development and one to keep production ready codes and appdaemon would execute them at the same time?
I have never created a git repo inside home assistant, so I need to look into how that is done inside home assistant, though I assume that the cli already contains git and it is fairly standard. So the git repo is just for pushing the scripts I’m developing locally to my home assistant os right? It is disconnected from getting appdaemon up and running locally if I understand correctly.
I’m using ubuntu on my dev machine and the server that is hosting my home assitant is running truenas scale. You are correct that I haven’t mounted the drive as a folder in ubuntu yet, I will try to do that now and see whether that makes it work.
Not sure, never tried to do that. I’d assume you can however you’d likely need to change your appdeamon config to point at one vs the other whenever you’re dev’ing.
You’re really over thinking this.
When you connect to samba from another PC, it’s literally the same as if you created a git repo on your PC that is local to the machine.
It’s just a regular git repo, I haven’t used appdeamon for 5 years, but if I remember correctly, it could be set up in a way that each “app” could have it’s own folder, code, and configuration. So that’s what you’d do, a git repo in that folder and you’re done. Code away. Remember, a git repo is just a repository that has a folder structure to it with a .git folder that stores all the git oriented things. For all intents and purposes, it’s no different than any other folder.
Ok, on your ubuntu machine, you mount a drive that points at the samba share addon. It will then be a normal folder and you can create a repo in any sub folder to your hearts content.
Here is my configuration for home assistant, backed up by git.
I have now mounted my home assistant os configuration folder on my desktop computer and have gotten further, but it seems I’m still unable to work in my local environment. Does anyone have an idea what is missing?
(AppDaemon_home_assistant) tue@tue-desktop:~/PycharmProjects/AppDaemon_home_assistant$ appdaemon -c /mnt/ha/a0d7b954_appdaemon
2025-12-20 16:58:37.471565 INFO AppDaemon: ------------------------------------------------------------
2025-12-20 16:58:37.472086 INFO AppDaemon: AppDaemon Version 4.5.12 starting
2025-12-20 16:58:37.472118 INFO AppDaemon: ------------------------------------------------------------
2025-12-20 16:58:37.472145 INFO AppDaemon: Python version is 3.11.13
2025-12-20 16:58:37.472171 INFO AppDaemon: Configuration read from: /mnt/ha/a0d7b954_appdaemon/appdaemon.yaml
2025-12-20 16:58:37.473043 INFO AppDaemon: Using /mnt/ha/a0d7b954_appdaemon/apps as app_dir
2025-12-20 16:58:37.474569 INFO AppDaemon: Loading built-in plugin 'HASS' using 'HassPlugin' from 'appdaemon.plugins.hass.hassplugin'
2025-12-20 16:58:37.474667 INFO HASS: HASS Plugin initialization complete
2025-12-20 16:58:37.474748 INFO AppDaemon: Initializing HTTP
2025-12-20 16:58:37.475163 INFO AppDaemon: Using 'ws' for event stream
2025-12-20 16:58:37.477646 INFO AppDaemon: Starting API
2025-12-20 16:58:37.478351 INFO AppDaemon: Starting Admin Interface
2025-12-20 16:58:37.478426 INFO AppDaemon: Starting Dashboards
2025-12-20 16:58:37.488107 INFO AppDaemon: Scheduler running in realtime
2025-12-20 16:58:37.488559 INFO AppDaemon: Starting apps with 2 worker threads. Apps will all be assigned threads and pinned to them.
2025-12-20 16:58:37.490929 ERROR Error: ===== Unhandled exception in Task-51 ====================================
2025-12-20 16:58:37.491021 ERROR Error: HTTPFailure: Failed to start HTTP service at '192.168.0.5:5050'
2025-12-20 16:58:37.491573 ERROR Error: OSError: could not bind on any address out of [('192.168.0.5', 5050)]
2025-12-20 16:58:37.492399 ERROR Error: File "/home/tue/PycharmProjects/AppDaemon_home_assistant/.venv/lib/python3.11/site-packages/appdaemon/http.py", line 411, in start_server
2025-12-20 16:58:37.492468 ERROR Error: await self.site.start()
2025-12-20 16:58:37.492525 ERROR Error: File "/home/tue/PycharmProjects/AppDaemon_home_assistant/.venv/lib/python3.11/site-packages/aiohttp/web_runner.py", line 121, in start
2025-12-20 16:58:37.492573 ERROR Error: self._server = await loop.create_server(
2025-12-20 16:58:37.492617 ERROR Error: ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-12-20 16:58:37.492666 ERROR Error: File "/home/tue/.local/share/uv/python/cpython-3.11.13-linux-x86_64-gnu/lib/python3.11/asyncio/base_events.py", line 1539, in create_server
2025-12-20 16:58:37.492709 ERROR Error: raise OSError('could not bind on any address out of %r'
2025-12-20 16:58:37.492753 ERROR Error: ===========================================================================
2025-12-20 16:58:37.492818 INFO AppDaemon: Waiting for plugins to be ready
2025-12-20 16:58:37.498070 ERROR HASS: Cannot connect to host supervisor:80 ssl:default [Temporary failure in name resolution]
2025-12-20 16:58:37.498163 INFO HASS: Attempting reconnection in 5.0s
2025-12-20 16:58:42.500982 ERROR HASS: Cannot connect to host supervisor:80 ssl:default [Temporary failure in name resolution]
2025-12-20 16:58:42.501100 INFO HASS: Attempting reconnection in 5.0s
2025-12-20 16:58:47.505433 ERROR HASS: Cannot connect to host supervisor:80 ssl:default [Temporary failure in name resolution]
2025-12-20 16:58:47.505548 INFO HASS: Attempting reconnection in 5.0s
2025-12-20 16:58:52.509237 ERROR HASS: Cannot connect to host supervisor:80 ssl:default [Temporary failure in name resolution]
2025-12-20 16:58:52.509350 INFO HASS: Attempting reconnection in 5.0s
Yes because appdaemon doesn’t really offer anything better and it’s another point of failure. When I want python automations, I just write an integration.
Maybe this is a dumb question, but what exactly is the difference between an integration and what I am trying to achieve, it sounds like both methods are ways that allows python code in automations?
Are integrations only pushed through the official channels or would this be a way to make custom automation for me as well?
An integration is built right into HA, and you can make custom ones. It’s harder to understand, but but the documentation is much better now. Appdaemon is a separate system that runs next to HA and has its own api.
You could also do pyscript, which is a custom integration.
I ended up going to the appdaemon discord and they were able to help me solve the problem, it turns out I was missing:
ha_url: http://192.168.0.5:8123
inside the appdaemon.yaml file