THC: Tight Home Control, automation framework in Tcl
github.com
github.com
Kudos!
What makes Tcl compelling for those applications?
I learned TCL for adding an embedded scripting language to a company's command line in 2005. I originally cast derision, but have learned to appreciate its beauty after a wrote a couple API frameworks in it. I think it has a little less magic now that lambdas and other shorthand notations are commonplace.
[1] Example portfile: https://github.com/macports/macports-ports/blob/master/shell...
[2] Macports source: https://github.com/macports/macports-base/tree/release-2.7/s...
I'm sure you can do something similar by adding "Milk + $city" or "Milk + $street-name" to your other example.
They've been operating since 2011. https://en.wikipedia.org/wiki/The_White_Album_(band)
They are incredibly difficult to find online because when you search for them the first who knows how many results are for, you guessed it, The Beatles' White Album.
Issues with Home Assistant as a developer of integrations:
- internal inconsistent politics slow adding new developers
- documentation is in sparse in many cases
Issues with Home Assistant as an administrator:
- The JSON database periodically corrupts itself
- The two "core" and App Daemon components can't live in the same system, must use Python venvs
Issues with Home Assistant as a user:
- There are two ways to configure integrations: via config file and via DB, which is really obtuse and difficult to version control, also sometimes the same integration is configured twice, once in each method, and sometimes parts of the integration are split
- Scripts in Home Assistant are linear steps, no branching. This is useful only in basic scenarios. There are three main ways of dealing with this with various trade-offs, and two of them are just moving the logic out of Home Assistant (python scripts, which run in a "safe" environment, and App Daemon which is unconstrained, but much heavier), with the third being using the templating system that's bolted onto the configuration system to generate dynamic conditional resolutions.
- If there is an error in your script (because, e.g., a device is offline temporarily) the script will abort instead of continuing, which means for example if your air purifier stops working due to the cloud, your local A/C stops getting set - this is not resilient
- The dashboard config (Lovelace) can be configured by the UI or config file (see above about integrations), but again it cannot be very dynamic in either scenario since the templating system cannot produce all possible configuration results, so for Lovelace's UI to be dynamic you need to write another tool to read the Home Assistant config and generate the resulting config (App Daemon can't directly do it)
- Upgrading between versions of Home Assistant generally breaks things and you have to spend time fixing them
That's most of the big issues that I can think of right now.
For automations and scripts, I use the built in automations for simple tasks (turn X off after Y minutes), and Javascript + Home Assistant JS + Generators for more complex automations.