The first few posts are going to be an introductory series on the smart home/home automation, but as I move along, it should be a good mix of topics to appeal to people of all skill levels: tutorials, frontend examples, automation examples, product reviews, and more. I’m also open to ideas for posts!
I’ve also got three AppDaemon scripts that I converted for use with HACS. Those apps are available in HACS by default, if you include AppDaemon in your HACS configuration. I’ll have more added soon as well!
I use the Android app Automate, which is similar to Tasker. Based on Wi-Fi connection state and then GPS location, I can reliably detect that I’m away within just a few blocks of leaving my home, and then generally as soon as I’m back in the garage when returning. Automate just sends HTTP requests to the Home Assistant REST API to call the device_tracker.see service, which I’ve posted about previously here. I’ve got plans to share all of the details of my presence setup in a future blog post.
Gotcha. I do have plans to consider that in the future . I considered using my Google Home devices to do it since I already have them in most of the main rooms we use, but I’ve heard the functionality is somewhat flaky. If I do it in the future, it’ll probably be with ESP8266 devices.
I’m excited to announce the initial release of my Config Check AppDaemon app!
I’ve seen a few people around here asking for functionality to streamline the process of checking their configuration files and restarting Home Assistant, especially after some of the new additions to the Configuration menu pushed down the Check Config and Restart options on that page. This app will allow you to initiate a check of your configuration directly in Lovelace, and it creates a sensor that will tell you whether the configuration is valid (and why it failed if it’s invalid). Furthermore, the app will restart HASS automatically if your configuration is valid.
This has been tested successfully on my setup, so I’m ready to release it into the wild. Please check it out, put it through its paces, and log any issues on the GitHub repo! Full instructions can be found over there.
The app is also set up to work with HACS, though I’m not going to submit it to be in HACS as a default until I move it out of pre-release. For now, you can add the repository manually on the settings page. If you’ve never used AppDaemon before, and you’re hesitant to try this app because of it, don’t let that scare you off! Now that AppDaemon apps can be distributed by HACS, it’s pretty easy to set this up, especially on Hassio. Just install the AppDaemon add-on, and follow the steps in the HACS docs to enable AppDaemon support there. Then, add my repo and install the Config Check app, and all you have to do from there is add the three lines of App Config YAML to /config/appdaemon/apps/apps.yaml and complete the other steps in the readme.
Let me know if you have any questions, and happy config checking!
Everything went great with the test run and I moved on to creating a permanent install of Appdaemon.
After I got AD running I followed the install & config docs at @apop’s repo but for some reason I couldn’t get it to work.
I then realized that HACS was adding the check-config.py app files into it’s own appdaemon folder in the HA config directory and I had set up a completely different appdaemon docker config directory that I bound the “conf” directory to.
So to solve the issue and allow appdaemon to run HACS installed files in HA you need to bind the correct folder to the “conf” folder for AD. My HA config directory is found at “/home/finity/docker/hass-config” so you will modify the -v binding to “<your_HA_config_directory>/appdaemon:/conf”
Here is my docker run command that is working but you need to make sure you rename your path to the correct HA config directory:
@finity That’s great stuff! Do you think you could submit that a PR with that information to the HACS documentation? Otherwise, I can put something together.~ I’ll put together a PR to add it to the documentation as I think it needs to go on a brand-new page and not an existing one, and there’s some other things I’d like to include.
@Holdestmade That card looks awesome! Do you mind if I add a screenshot of it to the README to show another example of the app in action?
I’ve been playing around a bit and forcing some errors to see the response.
It looks like the sensor will only show one error at a time. Is that true or am I missing something?
EDIT to add:
Also, in regards to the post above about putting the reload buttons for the different items (automations, scripts, etc) in a card got me thinking that there is a loss of advantage to those buttons/services because the app automatically restarts HA on every valid config check as opposed to the operator simply choosing to reload just the domains supported by a “reload” instead of a full restart.
Is there a way to have any kind of “are you sure?” step to acknowledge that a full restart is desired instead of a reload? That way if you say “no” then the process stops and you can just do the reload at your leisure instead of the immediate auto restart.
The sensor is outputting everything it gets back from the check_config API endpoint. I believe once it hits a failure it stops there, so you’d have to correct that error and then run the check again.
That’s coming in 0.2.0. Wanted to get an MVP out there for testing, but yes, I intend to make auto-restart optional. Should be pushing that update today.
Neither! That’s one of the great things about AppDaemon, once you’ve updated apps.yaml or any of the .py files for installed apps, AppDaemon automatically sees the updates and restarts the apps that need to be restarted.
You should see something like the following in your logs when an update’s been made to an app: