AirGradient ONE Review

On my journey of building a smart home with Home Assistant, one thing I've been really interested but haven't made much progress on is air quality monitoring. I have some simple temperature sensors deployed to nearly every room and that's interesting, but I'm interested to know about particulates, VOCs, etc especially when fire season hits in the summer.

I tried the Aqara TVOC sensor and it was pretty disappointing. VOCs by themselves aren't enough and the sensor was pretty flaky at least with Zigbee2MQTT. It would just completely stop reporting data until I reset it, which I did a number of times. Eventually I gave up.

I had known about the AirGradient for a while, but after seeing it in action on Smart Home Solver's channel, I finally decided it was the right product for me.

Overall I'm quite happy with it. It's only been about a week, but it definitely feels like it's going to fit my needs. I was blown away by how high the CO2 levels were in the house. I'd really like to get an outdoor model as well so I can compare inside and outside, to see how well my filters are working.

Pros:

  • Excellent Home Assistant integration, with 100% local control
  • Option for DIY or pre-assembled (I went with the pre-assembled)
  • Updates very frequently. Just breathe on it a little bit and the CO2 sensor responds immediately.
  • The display is small, but perfectly usable
  • More air quality sensors than I was expecting including CO2, PM0.3, PM1, PM10, PM2.5, VOC, and NOx
  • LEDs go from green to yellow to red for a quick read on overall air quality. The LEDs are pretty bright at night. They can be disabled easily enough though.

Cons:

  • Higher price than I was hoping for
  • Shipping from Thailand was $25 and took 2 weeks
  • Set up instructions were a little confusing. I had to search around a bit in order to find the default password. I was surprised there wasn't a quick start guide included in the box.

Home Assistant speech to text with Asterisk and DeepSpeech

I live outside city limits, so we don't have a municipal garbage service. Instead we get to choose from a handful of private trash collection companies. The one we chose is fine as far as garbage collection goes, but their website is stuck in the dark ages. Their contact email is an AOL.com address, if that tells you something. When I want to find out if garbage collection has been delayed due to a holiday, I have to call their phone number and listen to a voice message. It's terribly inconvenient and a lot more difficult to integrate with my Home Assistant installation.

tags: 

Viseron EdgeTPU Device Not Found

I've been messing around with object detection using software such as Viseron, Frigate, or DOODS. I finally managed to get my hands on a Coral.ai device via Mouser and set it up, but sadly Viseron wasn't automatically discovering it. The error came through like this:

[2021-06-15 21:59:51] [viseron.mqtt ] [INFO ] - Initializing MQTT connection
[2021-06-15 21:59:51] [viseron.detector ] [DEBUG ] - Initializing object detector edgetpu
[2021-06-15 22:00:16] [viseron.detector.edgetpu] [ERROR ] - EdgeTPU not found. Detection will run on CPU
[2021-06-15 22:00:16] [viseron.detector.edgetpu] [DEBUG ] - Error when trying to load EdgeTPU: Failed to load delegate from libedgetpu.so.1

The other noticeable symptom was that the CPU was going crazy at over 300%, and that's just for a single 720p camera!

The fix ended up being pretty simple. Make sure in your Docker startup you have "-v /dev/bus/usb:/dev/bus/usb" and "--privileged". That part was pretty well documented. I also had to set the permissions of the Coral device node to 0666 before the Viseron process could open it.

/etc/udev/rules.d/99-edgetpu-accelerator.rules

SUBSYSTEM=="usb",ATTRS{idVendor}=="1a6e",GROUP="plugdev",MODE="0666"
SUBSYSTEM=="usb",ATTRS{idVendor}=="18d1",GROUP="plugdev",MODE="0666"

And now CPU load is only about 2%, which is much better.

Screen Mirroring From Android

This is probably old hat by now, but I finally had need to set up screen mirroring from my Android to a Mac so I set out on a quest to find a good solution. I didn't have to look very long, thankfully. I ended up going with scrcpy, which is available for Mac, Windows, and Linux. Documentation is good, installation is easy, and it does just what I need without any extra crap.

Breaking broken websites that break copy and paste

Sites that block copy and/or paste drive me nuts. Most especially are the ones where they want you to type in your password or email address multiple times. Look man, I use a password manager for a really good reason and I don't need your 2 bit website to try and convince me otherwise.

Luckily in Firefox there's a way to disable that nonsense. Just set dom.event.clipboardevents.enabled=false and problem solved.

Locking Cron Jobs

Some cron jobs have the potential for running longer than their allotted interval, and you don't want to end up running multiple copies, especially where that creates additional load meaning the jobs take even longer to complete. That's a sure-fire recipe for disaster.

Historically I've always coded this into a shell script to use "ps" and exit if a copy of the job is already running. That works, but it's a pain to reimplement it every time. Somehow I missed that there is a tool built exactly for this specific function, named flock.

As a simple example:

flock -xn /tmp/lockfile -c /path/to/script

Hat tip to https://bencane.com/2015/09/22/preventing-duplicate-cron-job-executions/.

Random Greetings in Home Assistant

There's a server in my office and it has an audio card in it, so I figured why not have Home Assistant speak things to me. I started simple with just a basic greeting when the lights came on, and a goodbye when the lights went off. But then I decided to up the ante and have Home Assistant pick a greeting randomly from a list. Spice things up a bit.

Deploying Pi-hole

During the process of managing my Home Assistant server, I discovered a neat little tool named Pi-hole and decided to give it a whirl. It's a DNS server which uses blacklists to block ads and various flavors of crapware. So far it's been working really well, without any negative side effects that I've noticed.

Among the things I've discovered by browsing the reports:

  1. Google Chrome sends out a handful of DNS requests for random domains every time it starts up, to try and detect DNS hijacking
  2. My son's phone goes bonkers at midnight and requests a few thousand Google ads. I'm thinking maybe there's a bad app installed on there. That alone counts for 80% of the blocked requests.
  3. There are a lot of apps that phone home to the mother ship. I knew it happened, but I'm blown away by the actual scale of it. It's ridiculous. Not just the advertising, but the privacy leaks.
  4. Just from DNS, there is a lot you can infer about site a person is visiting. TLS won't help you there.

My next step is deciding whether to deploy this via VPN on my phone. I like the idea, but not sure if I want the hassle of it.

Naming Screen Sessions

Screen has a built-in limit of 40 windows. When I first exceeded that, I just recompiled it with a limit of 100. But just recently I hit that limit as well. I considered bumping it to 200, but that's just getting out of hand.

Pages

Subscribe to zmonkey.org RSS Subscribe to zmonkey.org - All comments