5 ms·
THC: Tight Home Control, automation framework in Tcl
- ajsnigrutin 5y agoJust curious, why this instead of eg. home assistant?
- rkeene2 5y agoI have not used this (yet), but there are a lot of problems with Home Assistant, with the main advantage being that it has all the integrations already written and it works for most things almost all the time. 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.
- madjam002 5y agoI've been running HA for 4 years and I've never had it corrupt, it's been the same install as well. That said, I agree the integration configuration is a bit messy, although recent updates have made this better. 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.
- jjeaff 5y agoI had corruption problems until I bought a high quality SD card for my raspberry pi. Then, I switched to an Intel NUC with an SSD and have never had any corruption in the 2 years I have used it heavily.
- rkeene2 5y agoThe issue appears to be that it updates that JSON file isn't re-written in atomic way
- throwaway1777 5y agoNiiiice, thc.
- na85 5y agoWow, I have always been dubious of the claim that Tcl continues to be used in "behind the scenes" applications today. For a long time it was just (for me, anyways) That Thing You Have To Learn To Script Your Eggdrop Bot but it's a neat albeit quirky little language and evidently is used in at least this project! Kudos!
- dexterhaslem 5y agoonce you recognize it, you may start to catch it in use in applications all over the place. if you ever use xilinx tools, ECAD, etc, you will see reams of tcl handling builds and project definitions
- na85 5y agoMy impression was that Tcl used to be very popular for that sort of thing, but that it was supplanted by Lua, Python, and JavaScript. What makes Tcl compelling for those applications?
- dexterhaslem 5y agothat I couldn't tell you. I'd personally pick lua (or damn near anything else) first. maybe just entrenched knowledge/tooling in certain industries monster codebases.
- RHSeeger 5y agoPersonally, I'd pick Tcl long before Lua... but I'd pick almost anything before Lua; which I find frustrating to work with. There's a _lot_ of personal preference and "feeling" that goes into what each person likes in a language.
- buescher 5y agoNetwork effects. John Ousterhout invented tcl in part to script/implement the Magic VLSI layout tool. So it's not surprising it's spread to other EDA applications.
- celeduc 5y agoSide effects may include dry mouth, red eyes, and core dumps.
- asdff 5y agoIn all seriousness, naming your product after something established and in existence ensures I am going to never be able to find it again thanks to modern SEO practices. I remember in the 90s and early 2000s everyone named their product after a non English word as a rule to make it easy to trademark your product and for customers to search it out against common words. Today, everything is just some random clever English word. There is even a restaurant in my neighborhood called "Milk" now, the madness is overwhelming.
- capableweb 5y agoI'd agree with you, but searching for "thc github" right now on Google at least shows me this project on 7th place in the search results, even if the repository is relatively young. I'm sure you can do something similar by adding "Milk + $city" or "Milk + $street-name" to your other example.
- BizarroLand 5y agoThere's a pretty good Danish music group who called themselves "The White Album", which sounds like a decent band name. They've been operating since 2011. https://en.wikipedia.org/wiki/The_White_Album_(band) 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.
- user3939382 5y agoFYI if anyone’s interested, there’s a network login hacking tool called THC Hydra that’s been around forever.
- eurasiantiger 5y agoWhy not perl?
- jvanderbot 5y agoI can't find documentation on how to add a TCL wrapper for an interface to the sensors. Is this abstracted somehow?
- zdw 5y agoAny Tcl experts here that have opinions about CI tools, specifically code formatters (like `go fmt` or python's `black`) and other testing tools for use with Tcl?
- a9h74j 5y agoI wasn't expecting this to happen.