1 year in, where do I go next? (brain dump, sorry)

Hello Community,

Over a year in and still building my smart home, I have had a major disaster (I mean learning experience, I back up regularly though not automated),and am loving this, it has WAF, my current setup is,

Hassio on a Raspberry Pi 3b+ 128gb SSD, using maria DB, Node Red, HACS, AdGuard, mqtt broker
Google Home Hub through Nabu Casa
Nest (grrrrr) not integrated since HA broke
Chromecast’s galore
2 x Sony Bravia TV’s
Sonoff tasmotised RF hub with RF wall switches, PIR’s (sonoff and digoo), Smoke alarm, leak sensors, window sensor
Xaomi Aquara zigbee (OOH the zigbee) hub with PIR’s and door sensors,
Broadlink RM pro and mini and some cheap RF plugs
Magic home light strip controllers and a bulb
Tasmotised Tuya converted bulbs
Yeelight bulbs and lamps
Lots of tasmotised sonoff basics
A few sonoff TH units
A few sonoff pow r2
Gosund tasmotised power monitor plugs
Xaomi plant sensors
A Loop energy monitor (mistake)
Eufy cameras though not integrated
I also have an emby server
A spare Pi 3b+

So quite a build up going on, a lot of this stuff I had before home assistant, and none of it did what I wanted it to do which led me here.

The questions,

The Pi 3b+, I don’t believe is really up to this task, my system randomly falls over and I don’t know why, and has got really laggy and for this reason I still can’t fully trust this to do things like an alarm or thermostat. I do want to keep it simple if possible, no headaches, the options seem to be the raspberry pi 4 4gb, or an NUC which seems to be a popular option. I personally am leaning towards a Pi 4. I know this gets asked a lot but things move fast so it will always be a relevant question.

RF, is there a way to make this more responsive, my switches don’t make it through to home assistant every time, though do seem to get picked up on the sonoff.

Do I stick with the Aquara?

Do I go for a Shelly EM? (whole house monitor)

Best alternative to nest

Naive question, why isn’t there a windows installer for this? Is it actually difficult to run in a virtual m/c?

The future (not a question) is going to be fun, I think I will wait until the sonoff zigbee stuff starts surfacing and look into that. Make an alarm, energy usage record, more and more lights, see what I can do with node MCU. I have a bucket of old android phones and tablets to kiosk,

and much more…

Drivel Over. :roll_eyes:

1 Like

Can’t tell much, I recently bought a RbPi 4 8G, it is quite responsive.
The aquara zigbee stuff works well with zigbee2mqtt
And for Rf, I have 2 sonoff rf bridges and 2 rflinks. Can’t complain about the responsiveness.

Oh, and I would not want to run my home on Windows. What if Windows has installed an update, decided you waited long enough to reboot and reboots on its own ?

1 Like

Answering the Pi, Shelly EM and Nest questions:

Whilst your 3B+ might be overwhelmed by the task, it’d be good to understand why to avoid spending money only to find the new device has the same problems. Is it pegged to 100% CPU, out of memory, constantly busy with I/O?

My system is lot less “populated” than yours, admittedly, but has no problems on an old 1GB Banana Pi M1 with a SATA HDD. Re-starting and upgrading are slow, but there’s no sluggishness in response when running.

Shelly EM looks like it’d work well. I have a 1PM running my immersion that integrates well and gives good power stats for that one device. As a more DIY alternative, I built an ESPHome-based power meter (like this but with 3d-printed components to justify my printer purchase) to count the Wh flashes of the electricity meter, giving me this:

image

as well as a per-day bar graph using the custom-mini card:

image

Similar DIY approach for the heating: I built an ESPHome solution with a Wemos D1 Mini and two relays to run my Y-plan heating / hot water setup, with another D1 Mini in the hall doing the job of the room thermostat. The HA Climate entity provides the front-end with automations for day/night setting, switching off when house is unoccupied, choosing between gas & electric immersion based on the electricity cost (I’m on Octopus Agile).

These builds give me a lot of flexibility, I understand exactly how they work with no proprietary oddness to work around, they’re much cheaper than commercial alternatives if you don’t count development time, and there’s no reliance on third-party servers or Internet access — although I have my HA instance available on the Internet, so I can still control the system from anywhere.

1 Like

You’re going to push the limits of your pi with all that going on. I was in exactly the same boat, swapped the raspberry pi out for an old mac mini 2014 with an upgraded SSD and haven’t one issue since.

2 Likes

Many people have old laptop with decent specs laying around. Many times that may be improvment over RasPi

2 Likes

On the Nest thing, did you migrate to Google when they took over, or did you retain your old Nest logon? I did the latter and still have control over the thermostat via Kumo Apps on the Wireless Tag platform. It’s a bit clunky - HA has to fire the Kumo Apps via IFTTT webhooks - but I can, for example, set the thermostat to “away” whenever I leave the house much more reliably than by using the Nest mobile link.

For what it’s worth, I’m using a Pi4 and logging to a Synology NAS - trouble free so far. In fact the Pi seems to be using barely 15% of it’s capacity.

The sonoff zigbee hub and end devices are now available:
https://www.itead.cc/sonoff-zbbridge.html
I am thinking of getting some of these as well.

I am not familiar with that hub

  • is it a generalised zigbee hub or does it only work with itead devices?

  • how does it connect to HA? Is there an integration yet?

No HA integration yet, from what I have read Tuya zigbee devices don’t pair with it. And although they are working on it, it seems to be difficult to port it to tasmota.

Maybe the custom integration with original sonoff firmware works, I don’t know.

1 Like

I run my HA on the 4gb RPi 4 and it has plenty of oomf! It hosts a zigbee2mqtt network with around 30 devices (mainly Xiaomi sensors and switches but also some hue/tradfri/innr bulbs). I’d definitely ditch the Xiaomi hub, don’t trust any cloud connected services from China. Replace the RF stuff with ZigBee or WiFi, RF stuff is old an unreliable for two way stuff. I still have a couple of sensors reporting over RF via an rfxtrx gateway, but I’m almost done replacing these now.

2 Likes

Hi, Nice install…

On the subject of ‘is the Pi 3B+ up to the job ?’

Short answer, Absolutely.

Throwing more compute at the problem will just be masking issues with the setup…, I have a similar, (possibly larger) setup running on a Pi 3B+ and the load average really never gets above 0.6 (the load average would have to be over 5.0 to be considered busy…). I was previously running all this on a Pi B from 2013, also no issues (just upgraded to use the Pi B for another project).

Target the things that are going to slow you down in your setup. Anything that writes to the database and/or the disk directly. I would look at the recorder: section in your config first, and basically exclude everything (and I do mean everything), then just include the things you really want/need to see the state history for. Eg. Particularly ‘chatty’ sensors can generate 1-100K events per day that fill up your DB and slow everything down (eg. I have over 60 lights, but only record less than 10 light groups)

You can take all this with a pinch of salt…, I only have my own experience to go on after 18 months or so of playing with HA, but I think we often forget just how much compute power these low cost devices actually give us. A Pi 3B+ can perform 5,300,000,000 floating point operations per second (It would take 168 years to count to 5.3B). The computer that put man on the moon peaked at 3,600 flops.

Optimise first, upgrade later…

1 Like

Just my input on the recorder component, I run my hassio on a Pi 3b+. It was going well for a while until the recorder filled up my SD card. I moved the logging to my Synology nas with mariaDB and all was well until the database got to over 7gb and 1.3m entries. The pi was struggling.

I had to clear the database then only had “include” in my config with 7 days of history. Putting include automatically excludes everything else. Only use “exclude” if you want to exclude entities from included groups. Hopefully that makes sense. It took me a while to get my Pi working responsively again and the recorder was the issue.

1 Like

My setup is hass running on ubuntu on a nuc. Just plain python. Yeelights, 20 or so xiaomi sensors. Broadlink switches and automated blinds. 6 cameras. 12 esphome devices (diy humidifier, diy sousvide, wd2812 leds etc), samsung and philips tvs, google minis and google casts, air conditioner units, roborock s50 with live mapping.

This is going to be a little off topic but after fiddling with home automation and nearly automating all my daily tasks, I went straight to fpv drone racing. I will still update and add more automations from time to time, but will not be spending too much time here. The new versions and updates of HA does not stir me up as much as before anymore. Just like the new ios updates don’t.

Its very new. No integration that I am aware off with home assistant yet. I assume it only works with itead devices. I wont be using the hub but just the end devices and use them with deconz or zigbee2mqtt

One assumes that it isn’t really zigbee then.

The smart plug and the smart switch are already said to be compatible with zigbee2mqtt, which is good news. Hopefully the others will be too. | Zigbee2MQTT

Haven’t read this yet More Zigbee Learning (or not) - Scargill's Tech Blog

Thanks for the feedback all, I seem to have settled my HA by removing the speedtest integration, and the lag (which I failed to mention was front end) is sorted now I have turned adguard off (I need to look into this one).

I have also figured out that the RF issues are caused by the switches, I received 2 RF touch switches from banggood, and I seem to be getting 2 codes back from each button, and one code is common to all buttons, so I assume this is telling me about the battery possibly. I have no problem with RF PIR, and probably prefer them to the zigbee ones as they are a quick on/off. The Digoo ones are quite nice and they report battery back but I haven’t figured them out completely, but door/window sensors need to be zigbee, I only have 3 aquara sensors at the moment so transferring over to zigbee2mqtt shouldn’t be an ordeal.What dongle do you guys use?

As for DB, I have started trimming back recorder functions and will keep tweaking (am on mariaDB). I do have a few power monitors set to 1s tele period for automation purposes which may put a strain on it.

Maybe I should get on discord to talk about some of this stuff.

Cheers

I have everything but the code you put in the integrations page, There is badnest to look at but I would prefer to use a proper integration for it. I will be patient for now, It’s summer.

As long as you’re booting the Rpi 4 from SSD (and not using MicroSD which tends to fail quite often during intense I/O sessions) it should serve you well.

Otherwise, in terms of raw power, the cheapest NUCs or old laptops are going to beat the Rpi 4. Considering the spare power of such a device, you can run additional dockers/HA addons (depending on your installation method).

A laptop (even one with a broken screen) would have the advantage that it can run for some time of its own battery during a power failure without requiring an UPS.

Also, a X86 powered device would not be significantly more expensive since for the Rpi you might consider (optionally) a case and a fan.

Wow, 7Gb DB…, even with your cut down config your still recording 7 days worth of data… Do you ever look at it ? I Occasionally use the Logbook if something is not behaving the way I thing it should, and the history can be useful, but I never ‘need’ to look more than 12/24 hours back. I contemplated using MariaDB, but just thought I was over complicating the issue, so used this one magic line in the recorder:

recorder:
  db_url: 'sqlite:///:memory:'

I only keep 1 days worth of logs which uses 10% of the 1Gb RAM on the Pi 3. The Logbook page still takes 5’ish seconds to load (which I still think is very slow), and the history page comes up in 1-2 seconds. I record some alarms, device trackers, light groups (not individual lights), battery levels and host performance metrics (about 50 entitys/sensors), everything else gets excluded.

Even with SQLLite DB you can still use a custom component for logbook cache (install it from HACS) GitHub - amelchio/logbook_cache: Custom component to speed up Home Assistant logbook viewing. On my system, with a 3.5 GB MySQL database, it is loading the Logbook instantly (takes a little longer at startup).

If you’re looking to avoid troubles on the long term you might try booting the Rpi3 from an external drive instead of the MicroSD (which is prone to failures due to intense I/O).