[HN Gopher] Home Assistant Presence Simulation
       ___________________________________________________________________
        
       Home Assistant Presence Simulation
        
       Author : edward
       Score  : 86 points
       Date   : 2024-08-28 13:01 UTC (2 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | enobrev wrote:
       | Simulated presence in our home: Motion-triggered lights and a cat
        
         | starxidas wrote:
         | Sure, but cats sleep around 35 hours a day.
        
           | drdaeman wrote:
           | Fortunately, presence simulation is only needed at dusk/night
           | - when cats have their zoomies.
        
         | nurettin wrote:
         | I need some of those cat-sensitive motion triggers.
        
           | reaperducer wrote:
           | Old school hardware stores have them. They screw in between
           | the lightbulb and the lamp.
        
       | bobchadwick wrote:
       | I used this last week! I was out of town and a friend texted me
       | letting me know the lights in my house were on. I got such a
       | sense of joy in knowing that it was working as intended.
        
       | dharbin wrote:
       | Can it automate a cutout of Michael Jordan attached to a model
       | train set?
        
         | jeroenhd wrote:
         | You jest, but with an ESP32 flashed with ESPHome and a few
         | dollars of electronics to regulate the power, I think
         | controlling model trains would actually be quite doable. Your
         | biggest challenge is probably dealing with network/scripting
         | latency for events that need to happen in quick succession,
         | like when dealing with switches.
         | 
         | Or, if you consider Lego DUPLO trains to be model trains,
         | there's this: https://community.home-assistant.io/t/lego-duplo-
         | train-contr...
         | 
         | Edit: there's also this https://github.com/aaron9589/esphome-
         | for-model-railroading for the more serious model railroad
         | enthusiast, though I'm not 100% sure if that actually controls
         | the trains themselves (or just the switches and lights)
        
           | shimon wrote:
           | In many cases, a simple off-the-shelf smart plug would
           | suffice.
        
             | ewoodrich wrote:
             | That's why I try as hard as I can to find either truly
             | "dumb" devices with mechanical switches vs momentary
             | buttons or devices that remember their last state after A/C
             | power is restored. Hard to figure out the second option
             | though without trying it unless a review happens to mention
             | it specifically.
        
           | sofixa wrote:
           | Awesome. The Home Assistant and related (ESPHome, Voice
           | Assistant, Music Assistanc) communities are amazing and there
           | is just a crazy amount of projects one can just pick up and
           | use.
        
         | moandcompany wrote:
         | It could also automate ordering pizza delivery and the tipping
         | process to "Keep the change, ya filthy animal"
        
           | paradox460 wrote:
           | There's a dominoes pizza integration in home assistant
        
         | paradox460 wrote:
         | There are dcc systems that run on Arduino or raspberry pi, and
         | expose an API interface. Could control one via home assistant
        
       | bloopernova wrote:
       | Slightly related, please forgive the offtopicness: has anyone
       | implemented a DIY UWB location base + beacon/tag?
       | 
       | I ask because my neurodivergent wife loses things, and often Tile
       | either doesn't work or isn't load enough. I read that UWB
       | promises 10cm2 or 10cm3 accuracy, which would be ideal for
       | finding lost stuff.
       | 
       | I've seen a couple of commercial offerings, but they didn't have
       | pricing.
        
         | __sy__ wrote:
         | I don't know if it will count as DIY, but take a look at LEGIC
         | and their devkit for this. We (seam) work with them and I
         | recall seeing a couple of startups doing demo's of their UWB
         | solution at their LEGIC Connect conference.
        
         | Rebelgecko wrote:
         | I used some Decawave kits ~a decade ago and they worked pretty
         | well... however if you want to DIY something as usable as
         | Airtags I think the main struggle would be getting the package
         | compact and with low power consumption (unless you want to
         | track large things and are fine with a chonky battery)
        
         | jitl wrote:
         | The generic stuff in the "Find My" ecosystem works quite well.
         | It's not DIY, but most things have UWB finding that works
         | whole-house for me.
        
       | Fokamul wrote:
       | Hm I'm not sure if this helps. Because thieves will first knock
       | on doors, even for tens of minutes. Ring etc. Normally people
       | will open and thief will say some BS and go away.
       | 
       | Cameras with backup power and backup internet connection is your
       | first priority.
        
         | Geezus_42 wrote:
         | Funny because I never answer my door when anyone knocks. If
         | you're knocking on my door it's because I don't know you, which
         | means I probably don't want to talk to you. Anyone who knows me
         | knows to call or text before they come by.
        
           | baq wrote:
           | I have kids, neighbors have kids, door is knocked on all the
           | time.
        
             | reaperducer wrote:
             | You don't even have to have kids.
             | 
             | When I was at my last house, I didn't have kids, and people
             | would knock on my door every day. It was because my block
             | was full of neighbors who were friendly and nice to one
             | another, and not shut in their houses like hermits.
             | 
             | The way many people in the suburbs live these days, they'd
             | might as well live in windowless metal shipping containers.
        
               | barbazoo wrote:
               | You're so right. If you life in a neighborhood that even
               | vaguely resembles some kind of community then you're
               | really really lucky!
        
           | sofixa wrote:
           | What if it's like, a utility company trying to warn you
           | they'll cut off power/water/whatever in a few minutes because
           | of emergency works?
        
             | cortesoft wrote:
             | Then you will find out when your power goes out?
        
       | joshstrange wrote:
       | Just a note to anyone interested in trying out Home Assistant:
       | 
       | It's amazing _but_ do NOT use a raspberry pi to run it. Save
       | yourself a ton of headaches and buy a mini pc (there was a list
       | of used mini pcs posted here yesterday from ebay). Also I
       | recommend using HAOS (or whatever the "we install and run the
       | whole OS" option is called) so that you can use things like
       | plugins without messing around with docker. I love docker but
       | trust me, life is easier on HAOS.
       | 
       | I liked HA but felt like it wasn't really "stable". I used a Pi 3
       | for a while, then a Pi 4 decked out (highest ram, NVME storage,
       | super nice case, etc) and still felt like it was unstable. I
       | chalked this up to HA but then rolled the dice on a Beelink mini
       | pc and it has been rock solid ever since. Also don't be misled by
       | the lower price of the Pi, I paid more for my Pi 4 setup than the
       | Beelink (or about the same).
       | 
       | I blamed everything from the Zigbee/Z-wave dongles, to HAOS, to
       | HA itself, etc but in the end it was RPi. The 4 was the last Pi
       | I'll ever buy.
       | 
       | EDIT: I was in a hurry and didn't add my normal disclaimer when I
       | talk about the RPi's:
       | 
       | Yes I know some of you have a Pi 1 that been running you entire
       | life since it first came out and you think I'm full of crap. I've
       | owned every Pi 1-4 and never been truly happy with them. I bought
       | them "raw" and sourced all the parts myself, I bought high-end
       | (at least in price) kits with everything included, I bought all
       | official accessories (like power), they always were just that
       | little bit unstable.
       | 
       | It would work great for days/weeks then randomly not be reachable
       | (wired or wireless). I spent just shy of $200 for my last
       | "builds" which included a NVME drive (240G, lest you think this
       | is where the cost was), RPi case, RPi NVME hat, RPi 4 8gb model,
       | SD card, power, etc and the result was still instability. I don't
       | know what to tell you. Maybe I'm a moron but my experience with
       | them has not been great. That said I want to love them and I
       | loved my RPi 1B even with all it's warts, a $35 "credit card
       | sized" computer was awesome. Maybe I just don't want to tinker as
       | much anymore and value stability.
        
         | vaindil wrote:
         | Counterpoint: I've been running HAOS on an RPi 2 and 3 for
         | several years without a single issue, and I do use a z-wave
         | dongle but no Zigbee. I only do basic stuff with it (a few
         | automations for my z-wave thermostat and switches, AdGuard
         | Home), but it's been rock solid for me.
         | 
         | I only had issues once, when I tried to run the Unifi Network
         | Application addon. A RPi is not strong enough for that, but I
         | just uninstalled it and moved on.
        
         | gedy wrote:
         | I mostly agree, but found that HA isn't too bad on Pi if you
         | don't continuously update the versions even if it suggests. I
         | had a lot of trouble keeping a stable system until I just
         | ignored them until I really needed to install on new system,
         | etc.
        
         | domrdy wrote:
         | Or a 2012 MacMini, $~90 on ebay. Quiet, small form factor, runs
         | Linux.
        
         | rockbruno wrote:
         | I've been running it for a year on a RPi 2, via WiFi, from a SD
         | card *and* a Zigbee dongle, which is basically what everyone
         | seems to say you should not do, and never had a single issue
         | with it. I don't think these issues have anything to do with HA
         | itself but rather the extensions people install on it.
        
           | chime wrote:
           | I think it also has to do with how many devices you have on
           | it and how often they update state. I have 300+ IP devices
           | and have to run it on a mini PC because RPi was too slow. No
           | custom plugins or extensions, just a few basic integrations.
        
         | punnerud wrote:
         | The problem is often that people use small MicroSD (8-16GB)
         | that don't support the number of writes to SQLite3 that HA
         | does.
         | 
         | Have been using Western Digital purple 64GB MicroSD for years
         | without problems (support the same number of writes as SSD)
        
         | kayodelycaon wrote:
         | I've been using a raspberry pi 4 for 2 years with no issues.
         | You need a good, clean power source or you can have all kinds
         | of issues. Having good ventilation won't hurt. You also need a
         | good sdcard that can handle a large volume of writes.
        
         | delichon wrote:
         | I'm about to buy a Pi 5 for a Pi-hole. Does the same advice
         | apply to that?
        
           | import wrote:
           | You can get a mini pc for the same price and it would be more
           | comfortable.
        
           | SirYandi wrote:
           | Pi5 is plenty, even overkill for a pihole. I run a pihole on
           | my old pi2 and it's absolutely fine
        
         | arkmm wrote:
         | I've been running off a Raspberry Pi for years and it's been
         | very stable. The main things for me were to use a good SD card,
         | to use Ethernet instead of Wifi, and to also reboot the Pi
         | daily via an automation.
        
           | amscanne wrote:
           | It's not stable if you need to reboot daily.
        
             | abraae wrote:
             | Knowing you can survive reboots is positive for stability.
        
         | password4321 wrote:
         | Low Cost Mini PCs https://news.ycombinator.com/item?id=41389931
        
         | kkfx wrote:
         | I've pip-install it in my homeserver (a small celeron with
         | enough ram and storage) BUT I have a note to all HA users and
         | devs: why the hell keep insisting on the WebUI for configuring,
         | it's NOT reproducible nor simple.
         | 
         | Oh, of course, for a casual user it's simple, unfortunately no
         | casual users know about HA or how to physically integrate HA in
         | a smart home, so the idea of making a generic end-user system
         | it's a failure in principle, no matter the implementation.
         | Aside nothing is forever so even if for some it's easier to go
         | for a WebUI, when it will break, because it will (and with HA
         | I've experienced issues various time, an update at a time) you
         | need to waste big time instead of simply adapting a damn simple
         | config.
         | 
         | Hell, even NixOS with it's damn nix language is enormously
         | simpler than the YAML hell + WebUI of HA. And yes, NixOS is far
         | more stable and simple than playing with an entire distro just
         | to run a Pythonic app.
        
           | xd1936 wrote:
           | what?
        
         | import wrote:
         | I ran it on RPI 3 and 4 with SSD for years and had zero issues.
         | Now moved to the mini pc but RPI still hosting other stuff and
         | works rock solid.
        
         | sockaddr wrote:
         | I've also found pis to be unreliable in the long term. Even
         | buying good SD cards doesn't help. It's always something.
         | Broken storage, brown out (I'm using the recommended power
         | supply), sudden lack of communication over the eth port, etc.
         | 
         | I've found that just getting an old toughbook is much more
         | reliable for projects that don't require miniaturization.
        
         | Cheer2171 wrote:
         | Counterpoint: my Pi 4 4gb booting a USB3 SSD drive has been
         | working fine for years. The SD cards are what kill Pis
        
         | scubbo wrote:
         | Another "Been using RPi 4 for HAOS solidly for multiple years"
         | anecdote chiming in here. Typically the SD cards are the
         | unreliable bit, not the Pi itself.
        
           | m463 wrote:
           | You can boot and run a pi from a USB ssd, and now pi5 has
           | easier nvme.
           | 
           | But yeah, then you're competing with a minipc. The pi5 now
           | has niceties like a power button and you can battery backup
           | the clock with a wired coin cell, but then it is more time
           | and expense to get to what minipcs had basically forever.
        
         | drumttocs8 wrote:
         | Recommend just running it on a VM in proxmox or similar
        
         | asveikau wrote:
         | HAOS is _absolutely terrible_ when it faces filesystem
         | corruption. I faced this a few times when my HAOS image
         | crashed. You can 't even get it to fsck on boot when it
         | happens. I think that's one big reason people on RPIs have
         | issues. The FS is on an SD card, SD cards are flakey, and
         | there's no good rescue path when the FS has issues.
         | 
         | I guess USB power is also historically not great on RPI. I
         | haven't played with them in a few years but I remember needing
         | powered hubs. That might explain issues with Zigbee and Z-wave
         | dongles. Note also the '700 series' z-wave dongles have a lot
         | of issues. You can update the firmware to fix some. Mine's been
         | flakey and I'm on the latest firmware from ~2 weeks ago that's
         | supposed to fix all of that.
         | 
         | I was running HAOS on VirtualBox, with the disk image on ZFS. I
         | switched to running docker out of the same ZFS filesystem and
         | it's much faster and more reliable, notably I don't get random
         | filesystem corruption. Anecdote. YMMV.
        
           | Modified3019 wrote:
           | I'm not familiar with virtualbox, do you have any idea why
           | HAOS on VB+ZFS was corrupting vs Docker+ZFS?
        
         | ziml77 wrote:
         | I had problems when running HA on an RPi as well. It was never
         | very snappy or stable in its connection with the Z-Wave
         | network. I don't know if it was too much power being drawn by
         | the dongle or what, but switching over to a mini ThinkStation
         | that I got for cheap on Ebay solved the problem. Not only
         | perfectly stable with the connection to the Z-Wave network but
         | also just overall more responsive.
        
         | Sleaker wrote:
         | Had rpi3b with HA for nearly 4 years now without any problems
         | at all, not sure where your issues come from but I feel like
         | mine is cake.
        
         | NiekvdMaas wrote:
         | Or buy an officially supporter Home Assistant Green for $99:
         | https://www.home-assistant.io/green/
        
       | jitl wrote:
       | I use a normal automation to turn on the lights every day at
       | sundown, and to turn off the lights every night at ($BEDTIME +
       | 1hr), just as part of daily life. I don't need anything tricky to
       | simulate that pattern when I'm traveling; I just don't disable
       | the automation. I wonder how many people using HomeAssitant for
       | their lights are manually turning lights on and off all the time.
       | I would think most people would set up a daily or weekday +
       | weeknight schedule and be done with it.
        
         | closewith wrote:
         | We have some automations, but mostly use homebridge and Apple
         | Home scenes controlled by presence, smart switches, Siri, and
         | the app. I'd imagine that's 10x-100x more common than pure time
         | based automations based on the HA fora.
        
       | deadbunny wrote:
       | This has been on my list of things to do for a while, saves me a
       | job. Thanks for sharing.
        
       ___________________________________________________________________
       (page generated 2024-08-30 23:00 UTC)