sorry don’t worry it was a silly mistake. I had installed using the homeassistant user as said, and I was using the wrong user in the service file. Changed that and I am up and running .
Will still leave this in here though, in case someone else makes the mistake.
I am doing this now. If there are any conflicts in the future (for instance, if I don’t want to upgrade one or the other) I will create a new virtualenv for appdaemon.
Thanks @cgtobi for the guide, however I’m hitting at problem. When I get to sudo vi /etc/systemd/system/[email protected] I get asked for the appdaemon user password which I dont have. So, I back out to the default pi user account and continue from there.
However, when I try run sudo systemctl systemctl restart [email protected] it fails with the following output:
Any ideas what I’m doing wrong? My guess is that I need to enter a different service, although I’m just guessing. I’m running Home Assistant in a venv if that makes any difference?
I’m running homeassistant on a rPi in a virtual python environment. I followed this guide on how to get appdaemon setup but am unsure of where to go from here.
I have an appdaemon app that I’d like to get running with HA: Monitor App. Despite looking I’ve not been able to find any info on where exactly I should place app files inorder to use them, other than mention that it should be in a folder named apps.
I can see a ‘appdaemon’ folder located at ‘/srv/appdaemon/’ and I’ve manually created a sub folder within it named ‘apps’. Then I’ve created and added files ‘apps.yaml’ and ‘home_presence_app.py’ corresponding to the files in the Monitor App linked to above.
After restarting appdaemon and HA I’m not seeing any of the sensors that I was expecting the app to create. Nor, am I seeing any other signs of appdaemon apps running.
I can only assume that I’m looking in the wrong place and am now totally lost.
Any help on working this out would be greatly appreciated.
edit:
i should have read the (old) first post before reacting, because its all explained there (including the appdaemon config and where to put the apps files
allthough this way of installing is also telling how to create a user called appdaemon, which isnt really neccesary.
Thanks for the response. I setup appdaemon exactly as described at the top of this thread.
Now, I see that I need to activate the venv for appdaemon and then go to ~/.appdaemon where I can now see conf and apps folders. I think I’m in the right place now.
dont forget that now that you have created appdaemon with a user called appdaemon, you will always need to create and edit files when you are logged on as the user appdaemon.
when you create/copy/edit files as the user pi, homeassistant or root, appdaemon will not be able to read the files!
you will always see everything that appdaemon does it its logs.
if you dont know where to look in system logs then set actual files in appdaemon.yaml (again make sure that appdaemon can write there)
Depending on how you’ve set up home assistant your systemd script might go by a different name or you don’t use one at all. Just comment the line After: ... and try again.
appDaemon: Unexpected error refreshing default state - retrying in 10 minutes
Jan 09 09:12:40 HA-SERVER appdaemon[28169]: 2020-01-09 09:12:40.891678 WARNING A ppDaemon: Unexpected error refreshing default state - retrying in 10 minutes
Jan 09 09:12:41 HA-SERVER appdaemon[28169]: 2020-01-09 09:12:41.935917 WARNING A ppDaemon: Unexpected error refreshing default state - retrying in 10 minutes
Jan 09 09:12:42 HA-SERVER appdaemon[28169]: 2020-01-09 09:12:42.974844 WARNING A ppDaemon: Unexpected error refreshing default state - retrying in 10 minutes
Jan 09 09:12:44 HA-SERVER appdaemon[28169]: 2020-01-09 09:12:44.014636 WARNING A ppDaemon: Unexpected error refreshing default state - retrying in 10 minutes
Jan 09 10:12:51 HA-SERVER appdaemon[28169]: 2020-01-09 10:12:51.204275 WARNING A ppDaemon: Excessive time spent in utility loop: 1385.0ms