Hacker News new | ask | show | jobs
by kkfx 504 days ago
Not much a question, but a RANT. As an user I'm grateful for HA slick UI and functionality but while the best on the market is... A damn hell.

YAML instead of pure Python is a hell. Trying to push things to be configured via WebUI is a big discomfort because well... Generic users do like clicking around, but generic users will not use HA simply because it's not and will not be possible in future to create a no-code usable IoT. All low-code/no-code stuff COMPLICATE life instead of simplify. External deps like InfluxDB to just prune past data and keep them as I wish it not much nice, having a built-in option to state how to prune and for how long to keep each specific sensor or default policy would be very nice.

Essentially the RANT could be condensed in: please consider designing for people who know how to code, because they will anyway be the most common users. IoT OEMs will only be hostile for most because they still fails to understand how to makes business in an open world, so professional integrator will not much choose HA anyway since it's way too time consuming to really customize and keep it up. A pure code approach with NO energy wasted in config WebUIs/low code/no code on contrary could makes HA an interesting "base for system integrators" in a much broader sense. NanoKVM PCIe, JetKVM show the start of a feature-rich light-out management for anything, they will be the bridge between home IoT and classic homelabs/IT. HA could play a very nice role there, essentially offering a platform to bridge the not-really-IT-ready world of ModBUS and co appliances to the TCP-enabled and digitally controlled stuff. A future where small devices could be fitted in most appliances to "makes them smart" like being in the middle of a washing machine control panel connected to home p.v. system to start programmatically depending on available p.v., a connected oven pre-loaded with food the user start when he/she knows the time he/she will be at home.

This is a potentially nice niche market who could explode in the relatively near future. It's not possible as low code/no code/pre-packaged black box stuff. Being a component anyone could easily plug in a larger system is needed.

YAML might be ok if we limit HA to some smart bulb, just having a Victron battery inverter with some 40+ sensors demanding a significant load of YAML it's nightmarish. In python native it's HYPER quick.

1 comments

It's a major pain to write YAML for Home Assistant. Some parts of Home Assistant lack complete examples which are up to date. The documentation doesn't include examples for every single thing. Part of writing some automations was just a lot of trial and error, looking things up on the Internet, validating the configuration, and restarting Home Assistant. It's just not a great experience.

Discovering what has to be selected to use as an action in the automation GUI is another nuisance. The most recent example is with a light I wanted to set to 20% brightness. I had no means to find something with the keyword "brightness" or anything similar. It turned out that this was exposed as turn light on.

Breaking changes are their own source of friction. My only advantage has been that many of my automations are now just GUI automations with some custom YAML where it can't be avoided.

All of these things are far beyond what a non-technical user could be able to do. It can be difficult even for someone who knows how to look things up, read documentation and update everything when breaking changes are made.

Home Assistant isn't the kind of tool one can put in someone else's hands to use it without additional maintenance or supervision. It's also not the tool to use in any commercial setting due to its countless problems.

Well... GUI automation is not automation. It can't be. Automation must be automateable, code is, since you can save in a text file, versioned etc. GUIs can't. Reproducing them means doing countless step every time, hard to document with screenshots etc instead of "here the snippet" and Python code is self-documented, so discovering how to do things is MUCH easier, YAML need to be read from source code, not just importing a module and run help(modname). That's why to me HA should be pure-python NOT "sold" as a pre-deployed blackbox but as a simple pip-able package. Anyone could easily integrate it in anything else, documenting could be just the code for most simple stuff or a wiki with shared personal configs. Those can be automated as well to test it's validity pinging the author when a snippet fails as well.

That's the power of automation, of code, of end-users programming. Harnessing it means reduce all efforts after the first implementation and speed up anything breaking changes as well.

Thanks. I understand where you're coming from now. Your requirement to use Python code for automation could be satisfied by an external component which uses the Home Assistant API or through some internal custom Python based component which runs your code for automation.

The current setup for automations isn't good for anyone - not for end users, not for developers. I've resorted to using the UI because it seemed to be less likely to break across releases.