Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven’t used home assistant much in earnest, but I have some gripes after dabbling:

- to get the most out of it, it wants to be installed as an “OS” on a dedicated device (like a raspberry pi). Without doing this, you can’t install add ons from the store. I’m guessing this might be because the add-ons themselves are packaged with docker?

- I went ahead and did what they wanted, and dedicated an entire raspberry pi to home assistant. But from there, it seemed extremely GUI oriented… I had to install an add on just to see my config files! I know plenty of people have had success keeping their configs in version control, but that seems to be fighting the current.

So as a particularly advanced user, I don’t think Home Assistant is for me. Which is perfectly fine!

Does anyone have any recommendations on home automation software for people who write code for a living? The main thing I’m after is a decent library of supported devices that I don’t have to reverse engineer and write SDKs for myself. I’d also like to dump any/all sensor readings and switch states into Prometheus and view data with grafana.



I run HA in docker. Configs are in a volume mount and get backed up with the other zfs datasets (I'm sure you could put them in git too..). Extensions work fine but sometimes you do need to run another docker container, eg zwavejs2mqtt. All that stuff lives in docker compose files in git.

They have moved to be UI based, which does seem to work much better for most users given how complex automations can get.


I agree. First I was pretty heavily against moving a lot of the configuration into UI. But I've embraced it since then. It makes it less "pure", sure, but it's so much quicker now to get things done in my experience.


Unfortunately HASS idiotically demands "host" network access, it's designed to be broken in other configurations.


It works without host access. It's just that to auto-detect devices on the subnet requires low level access across several protocols. Perhaps this could be done without host access but it seems to be a difficult problem.


No, it doesn't work without. Auto-detection is one thing, even that can be NAT'ed, definitely not difficult - bridging broadcasts between subnets is an OLD thing. But I digress, I'm actually speaking of all the integrations that foolishly assume the bind IP and the advertised IP are the same. So it's either an invalid bind address or an inaccessible internal one.


Mine is running with normal isolated networking. Z-wave and zigbee are both working fine. No integrations that don't. I think I originally had to assign the hue bridge to have a static ip though..


Neither Z-wave or ZigBee are the type of thing that would have to be directly visible on your local network to work properly. Try Homekit or something that has actually uses IP networking.


Kasa uses direct tcp/udp in my setup and works fine. Same for DLNA servers. No issues.


Which integration are you referring to? I've had it working fine.


> Without doing this, you can’t install add ons from the store.

Usually you can do it yourself, because yes they are just docker containers. I don't use them myself as I don't find much use for most of them. The more important addon tool is HACS and that works in the stand alone docker container.

> But from there, it seemed extremely GUI oriented… I had to install an add on just to see my config files

Yes it's very GUI focused now, you can usually get to the basic yaml config in any screen though if you click through to manually configue that component. This was generally done because the yaml config method was a pain even for the tech literate... because yaml.

If you want proper code in HomeAssistant have a look at AppDaemon https://appdaemon.readthedocs.io/en/latest/HASS_TUTORIAL.htm... Makes it easy to use Python in HomeAssistant.

Alternatively there is Node-red https://nodered.org/ (js visual node programing automation) and huginn https://github.com/huginn/huginn (Python automation)

They will never offer as much integration as HA so I tend to find using HA as a dashboard/device integrator and then Node-red/AppDaemon for the actual automations to be more optimal.


Wasn't Huginn ruby? Is it possible to use python from the ruby runtime?


Doh... Yes you are right, it is indeed ruby. I got my languages crossed, sorry


> "Does anyone have any recommendations on home automation software for people who write code for a living?"

I develop my own home automation components and use MQTT to interface with HA using its MQTT integration. This gives me the freedom to have fun developing sensors, presence detection, garage door openers, etc, all still with zero reliance on "cloud". And I still benefit from a single UX and integration point on HA, which to me is the biggest value.

I run HA on Docker and it's locked down as much as practical. For example, I use nginx reverse proxy and limit HA itself to 127.0.0.1:8123 -- I don't need/want anything automatically discovered on my network.

I also have no need for addons. That just seems like more headaches when upgrading HA.

Keeping things simple with HA has worked great.


I had the same concerns as you. Here is what I did:

- setup HASSOS as a VM in my proxmox (and passing the usb zigbee stick through)

- install HACS for extra addons

- install the VSCode addon (meh, I’d prefer vim)

- install zigbee2mqtt

- write all my automations with appdaemon

That last point lets me write everything as python code instead of point and click (nodered) or some weird and limited (to me) yaml. With appdaemon, anything python can do is possible and you get an api to HA for the automation part.

VSCode also gives you a terminal so you can use git etc.

If you prefer there is also the option of using ssh to edit your files directly, you can break out of the default HA shell over ssh with “exit”.

HA didn’t make much sense for me until I heard of appdaemon. Now it’s amazing for me.


I personally use NixOS for everything, so I totally get the want for versioned config as an advanced user. But I did the opposite and put HA on a raspberry pi. If I die or am incapacitated I want my wife and kids to still be able to manage the lights and other automations. I'd also probably just leave the pi with the house if I sold it, since it is an integral piece needed to fully utilize a lot of installed hardware in the house. I mean I wouldn't take out the sprinkler computer either.


Yes, forcing the OS on people is a bit much. Rpis are not super reliable due to sdcard wear, so i personally prefer to run it on a X86 home server, so the os is not an option then as I use it for other thigs. Currently I'm using a VM to run the os on that server, which seems excessive, comsumes 20gb as a vdi image. I believe a supervised docker install is an option now, but it's officially classed as unspoppported. Shame it's so convoluted to get running.


20gb is excessive? I run it in Proxmox myself, and give it 100gb. Not because it needs it, but because it _deserves_ it. Of all the silly things I host in my house, it's the most deserving of resources.


I'm not worried about the storage, but (almost) forced to run an OS is a bit much. I just want to run it on the same machine as other services and the VM is to me a clunky way to do that. Still overall like HA though.


You could always use a RPi but not boot from a SD card.


Personally I wrote my own home automation software. At the time, Home Assistant wasn't compatible with my hardware, now I just prefer rolling my own solution anyways. I do not recommend my software to others. (It's written in Visual Basic and has a ton of personal conveniences basically hardcoded, though I try to maintain the general assumption in design someone else may use it someday.)

Depending how sophisticated your needs are, if you write code, consider writing your own. With libraries handling most of your hardware integration, writing a home automation system is often primarily writing the glue between. (I didn't do this. I made mine much harder for myself, I speak directly to serial ports with hardware codes, it's also much buggier than other solutions.)


It’s understandable why they do this. Given the complexity of a home automation set up with countless error modes across devices, sensors and connectivity alone, reducing any potential problems on the software side at least is logical.


I have used HA on and off for years and have the same issues with it. I want to easily understand the config files it is running with, and be able to configure anything by editing these files, and I don't want it writing to the config (this is one of my biggest gripes — no decent separation of config and state). I want to tie it to other systems myself rather than have it try to automatically discover things. I still didn't find a suitable alternative.


Seems like there is a grafana add on too?

https://github.com/hassio-addons/addon-grafana

Yeah, if you want to have it 'just work', a dedicated Pi seems fine, though I'm considering moving it onto my NAS if I get a usb Zigbee stick (I have one sitting on the pi's gpio pins).

I know I ran the motioneye service on the nas (docker container) as the Pi was struggling a bit, and to have more room to write the files. If you are already familiar with docker, you can totally run the add ons yourself.

You can also write your own automations in python with HA https://appdaemon.readthedocs.io/en/latest/

And if you wanted, I think you can configure appdaemon to run without Home Assistant if you have something else running the MQTT service, so you could add the Zigbee2 add on (just a docker image https://www.zigbee2mqtt.io/) and interact with it directly.

Zigbee2Mqtt does a great job supporting lots of devices (IKEA stuff for example), so I think you might just want to get a zigbee stick and go nuts on the MQTT instance yourself. Shouldn't be too hard to log the MQTT events into your custom dashboards.

You might not even want AppDaemon if you want to just code up an event loop yourself...?

But I'm pretty happy with the gui/yaml home assistant experience, as I mostly want fairly simple and predictable automations, and the dashboard is good for the whole family to use as well.


I have Home Assistant OS running in a VM on an HP EliteDesk 600 G3 Mini running Proxmox. I don't really use this for automations directly, although I do have some alerts. Primarily I use this as a dashboard and as a common API for everything in the house (zwave, zigbee, hue, Lutron, Shelly, etc).

I honestly don't do a ton of automations. The one really important one controls a hot water recirculating pump with a Shelly One set up as a temperature sensor. This is a small ruby program that uses MQTT to set the state of the zwave switch controlling the pump switch and directly talks to the Shelly for temperature readings. It talks to the HA API for settings but has reasonable fallbacks if things fall over.


You can always SSH in and edit the config that way (that used to be the only way to do most configuration). If you want your automations to be in a proper programming language instead of rules defined in YAML, check out AppDaemon.


I use FHEM (https://fhem.de/) to automate my home.

Its written in Perl and a bit dated, but it's small and connects with everything I have. Plus it includes a MQTT server.


I didn't really like it last time I tried it either... I'm going to try ESPHome next: https://esphome.io/index.html


...which is another OSS project from the Home Assistant team :)


You may want to take a look to OpenHAB.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: