Posts

Node-Red configurable trigger times

Image
I've recently moved from fixed trigger times for certain (mostly lighting) events to user-configurable. This provides me an easy way to configure via a Home Assistant dashboard. This is achieved by the use of some helpers and a simple node-red subflow: The subflow code can be downloaded here  for import into your node-red instance. The subflow outputs one of the following values: Morning Day Evening Night Unknown (if no matching timeframe is found) Based on matching the helper values in a cascade of time_range nodes in the subflow. To use it you'll need to create "time" helpers with the following entity ids: input_datetime.morning_start input_datetime.morning_end input_datetime.day_start input_datetime.day_end input_datetime.evening_start input_datetime.evening_end input_datetime.night_start input_datetime.night_end which can then be added to a dashboard for easy editing.

Location / presence detection

 One of the things that caused me the most frustration over the time I've been using home automation is person location detection. I've tried various solutions including the built-in Home Assistant tracking, OwnTracks and others until I found Life360 . I've been using it to track mine and my wife's locations for a few months now and it's been super reliable, accurate and has allowed me to have automations that know when we're at home or work etc. This has been useful for an number of things, such as disabling some of the home security elements when we're home during the day, or reminding us that we left windows/doors open when we leave the house. If you're struggling to find a good location solution I strongly suggest checking it out:  https://www.life360.com/

More overrides

Image
Now that we've had person detection enabled for a couple of months one of the things that we realised was needed was a way to turn off the voice announcements when someone was detected at the front door. For example when we're going in and out to the cars etc. So, today I've added another override helper so that we can disable these announcements via a lovelace button. I also moved all the override buttons (this new one and the existing lighting overrides) to their own dedicated dashboard page to keep them all in one, easy to access place.

Nothing to see here

 Not much progress going on with my home automation recently. Only thing of note is that I've migrated most of my Amazon smart plugs over to Innr Zigbee. This removes more devices from my 2.4g wifi network, plus the Amazon smart plugs never did seem to get a great signal even though I've got a rock solid UniFi wifi network around the house.

Lighting mood override feature

Image
I've not been able to spend too much time on my home automation the last couple of weeks due to work commitments but have just sat down for 30 minutes and added a much needed feature to my lighting setup. Prior to now, I've had most of my lighting triggered on motion all controlled through Node Red flows. This works really well and, depending on time of day, it selects different moods (I use Philips Hue bulbs and sensors but have the motion sensors connected to a Conbee II to get an almost instant reaction time compared to using the Hue API). Anyway, back to the feature. I'll use my office as an example. Most of the time it's using subdued lighting to give effect rather than high light levels. This is great when I'm working or gaming but sometimes I just need the lights to be bright (a recent example was when transplanting my main PC into a new case). My solution is to have a boolean toggle to override the lighting to a separate "bright" mood. The motion d

Motion / person detection with Frigate

 Just a quick update on my progress migrating from MotionEye to Frigate for my IP camera motion detection / camera feeds. Setting up Frigate was super easy. I had it processing the camera feeds and detecting people in just a few minutes offloading all of the heavy ML pieces to the Google Coral USB. The bit that I've just spent a couple of hours toying with is changing my Home Assistant Lovelace dashboards over to using the Frigate camera feeds. Setting it all up was easy, installed the Frigate HA integration which created all of the HA devices etc, updated my Lovelace cards to show the camera feeds and it all appeared to work. The bit I'm pulling my hair out over at the moment is that the live camera feeds really lag on my phone and PC (phone connected via WiFi, PC on a wired LAN connection). My gut feel atm is that it's because of the image sizes (2 of my cameras are 2k resolution) so I'm going to see if there's a way to downscale them for the dashboards. I'll

Google Coral USB Edge TPU

 My Google Coral Edge TPU arrived today which I'm hoping will make person detection on my CCTV fast and simple, and reduce the number of false positives I get currently. Here's a quick unboxing video. And if you're thinking to yourself "What the heck is that??" then here's a little blurb: The Coral USB Accelerator adds an Edge TPU coprocessor to your system. It includes a USB socket you can connect to a host computer to perform accelerated ML inferencing. The on-board Edge TPU is a small ASIC designed by Google that provides high performance ML inferencing with a low power cost. For example, it can execute state-of-the-art mobile vision models such as MobileNet v2 at almost 400 FPS, in a power-efficient manner. In simple terms (that I can almost understand) it takes Machine Learning (ML) tasks and runs them much faster than the HA Blue can do on its own. This means my little HA Blue can do things like detect people and vehicles in a CCTV video feed quickly an