Home Assistant waters my plants

(finnian.io)

73 points | by finniananderson 4 days ago

5 comments

  • davemp 54 minutes ago
    Fun project. Though it’s kind of unreal how complicated it is to set up HA and I literally do this for a living, both embedded sw and backend web dev.

    Docker compose with a zwave management server, reverse proxies for TLS, vlan isolation for the server, macvlan for HA container so it does see the host network, etc, etc. All to turn on and off a lightbulb with the sun. All the while AI is telling me to configure things insecurely.

    I think when I get some more spare time, I’d like to write a statically linked program that handles a zwave controller and basic automation scripting. No IP networking needed for my lightbulbs. Then it wouldn’t feel risky to just make a system user and udev rule to give it permissions to the controller, and run with systemd.

    • briHass 23 minutes ago
      You're making it complicated with all the VLANs. HAOS in a VM (proxmox helper scripts for one-line install), and HA has plugins for all the other things.

      Just deny WAN access to the IoT junk you don't trust at the router, or for things like cameras, a separate switch for those. That usually makes sense, since they're one of the few devices that must be powered with PoE and doesn't require gig+ bandwidth. A cheap 100mbit PoE switch will handle a good number of cameras.

  • PetitPrince 2 hours ago
    > I think I need more Zigbee repeaters to get a reliable mesh network, but to date I haven’t found any consumer-grade devices certified for use in NZ.

    Since many devices are also Zigbee router (it's a mesh network after all), maybe some additional lightbulb for exterior would suffice ?

    • theshrike79 2 hours ago
      Pretty much all mains powered Zigbee devices also act as routers in the mesh.
      • calgoo 2 hours ago
        Exactly! I prefer the small power plugs that lets me control fans and other power systems as relays. Family has a habit if switching of light bulbs using light switches and i have not gotten the change approval to disable the physical switches in the house :)
        • yoavm 2 hours ago
          For me the best solution was to use smart switches (mainly dimmers) and dumb lightbulbs. People can use the switches like any other if they want, but I can still have my automations and remote control.
          • stavros 11 minutes ago
            Agreed, people get very frustrated if they have to remember to not use certain switches. Using smart switches fixes this.
        • liam_krewer 1 hour ago
          I can recommend Shelly for light switches over smart bulbs. It's a relay that fits inside the wall switch with zigbee to sit between the light and the switch.
          • rubzah 13 minutes ago
            That's what I am doing too, though I did have to drill out some wall to fit it, in some cases.

            There is another option that I don't think many people are aware of: You can put a battery powered relay downstream of the (dumb) switch, and have it broadcast events when power comes on and off, to control other smart devices, which just have to listen for the events (via a broker like HA).

        • navigate8310 1 hour ago
          I wouldn't recommend anyone to yank out physical controls for accessibility purposes.
        • squigz 1 hour ago
          It seems like quite the hassle to have to pull out one's phone every time one enters or leaves a room just to turn on lights?

          Let's hope you don't have to get to the bathroom quickly late at night...

          • PetitPrince 49 minutes ago
            As a another comment said, the smarter way to have a smart light is to replace the switch with a smart one or even better put a relay behind the existing dumb switch to smartify the switch. For me it's important to have a manual override; you shouldn't need an app for a thing as basic as turning the lights on.
          • ga_to 1 hour ago
            Disabling the physical light switch should usually only come after setting up a different way of controlling the light by hand, without a phone.

            Most likely there is some sort of motion or presence sensor that turns on the lights which then turn themselves off after some time or no more presence is detected. There are also small wireless switches that could be used in place of the actual wall switch.

            I have done so in my apartment for example. Since the bedroom light switch is for some reason outside of the room I taped it down and put a wireless switch in a more reasonable spot. Another example is the hallway light, which only turns on by motion sensing when the sun is starting to go down.

  • zerof1l 1 hour ago
    I wanted home assistant compatible plant watering solution that works on a solar panel and does not require being connected to the water line and is Zigbee compatible. Unfortunately, I could not find any. So I did a DIY solution: a big barrel which I manually fill with water, a 12V pump (usually sold for camper vans), some rechargeable batteries, 10W solar panel, a solar charging controller, and Tuya ZG-2002-RF switch.
    • mmsimanga 15 minutes ago
      I dabbled in hydroponics for some years. Due to my inability to get my Rasberry Pi and Arduino working I ended up using a 12V pump and one of those cheap $10 electric timers on Aliexpress. I estimated how much time it took for my hydroponics system to drain and that's what I set on the timer. Other people I followed had all sorts of sensors rigged up, which I would have done if I had the time and skill but I failed, so in the end it was just the timer. I too had single solar panel and battery and the system worked for over 7 years with no issues. I just replaced the pump once or twice.
    • atoav 1 hour ago
      An art student of mine once needed a way to electrically control precise small amounts of water. We solved that using:

        1. Water tank and gravity  
        
        2. Medical IV flow regulator¹  
        
        3. Servo hooked up to that IV flow regulator via a 3D-printed part  
        
      It worked very well. In medical applications off must be really off, so it was also quite safe in that regard as well. Her 3D-printed part had a little bit too much flex in it, but in principle this works quite well. If it is really, really safety critical I would still recommend a mechanical fallback that protects in case of power loss or when the servo fails open (e.g. bending the hose with the force of a spring if electricity is gone).

      ¹: see https://www.gvs.com/en/catalog/iv-flow-regulators

      • stinos 1 hour ago
        > If it is really, really safety critical

        Your suggestions should be fine for hardware failure but I'd be more concerned about software failure: what if a bug in your software makes it unresponsive and stuck in the state with the flow open? Maybe a watchdog or some other system running in parallel checking for a heartbeat or a max amount of time water can be flowing?

  • denkmoon 1 hour ago
    Cron waters my plants :)
    • H8crilA 1 hour ago
      HA is essentially a better cron. It unsurprisingly uses the cron syntax where appropriate.
      • denkmoon 17 minutes ago
        HA is monstrously complex. cron just works. The same can’t be said for my homebrew esp32 pump relay controller, but at least scheduling is never the problem.
  • longtermemory 3 days ago
    Nice! For the hardware, why didn't you considered using a Raspberry Pi?
    • H8crilA 1 hour ago
      I used to run HA on an RPi, but eventually migrated it to a similar NUC. The RPi eventually just wasn't powerful enough (peak compute needs), while the NUCs are still quite cheap. And you can run a surprising amount of Proxmox VMs and LXCs on barely a few cores and gigabytes of RAM.
      • davemp 51 minutes ago
        I use an RPi 4 w/ 4GB of RAM and a 1TB usb 3.2 SSD and it flies through all my workloads. Though I don’t do any video encoding things.
        • H8crilA 40 minutes ago
          The cool thing is that it's very easy to migrate it to better hardware. HA backup and restore system is highly reliable. For this reason I can definitely recommend an RPi to start with, and who knows perhaps it will be enough forever, but if not then moving is a matter of ~one evening.
      • mytailorisrich 40 minutes ago
        Wow, not sure how to interpret your experience that an RPi wasn't powerful enough to manage watering a few plants. I can only suspect the overall software setup is massively bloated.
        • briHass 19 minutes ago
          If you want to run EspHome inside HA, and you recompile the devices (every release of EH), you want a decent processor/disk. The ESP stuff is a surprisingly heavy compile for a puny microcontroller.