Skip to main content

6 posts tagged with "homekit"

View All Tags

Adventures in CheapML

· 3 min read
Nick Lange
Someone at 5L Labs

For exactly zero-users,

I've spent some time firming up the Home Network Kill Switch project due to some breaking changes in Pi-hole v6 and Ubiquiti Control 9.4.19. Its a home project that uses iOS HomeKit buttons, backed by a Ubiquiti and Pi-hole setup, to simplify parental controls. I suspect others might appreciate a one-tap solution for managing network access, especially one that's easy enough for less technical family members to use.

Why I Built This

The UniFi app is powerful, but I found it took too many clicks to quickly block the internet or specific services like YouTube. This project creates simple "on/off" switches in Apple HomeKit, saving me from needing to open the app or connect to a VPN for simple tasks. For those using Home Assistant, integration should also be straightforward.

What It Does

I built a small FastAPI application that works with HomeKit (via MQTT and Node-RED) to:

  • Enable or disable predefined firewall rules on your Ubiquiti network.
  • Block or unblock specific devices by their MAC address.
  • Allow non-technical users to create schedules and automations for these actions directly in the Home app.

Where to Get It

You can find all the specifics on the GitHub repo: https://github.com/5L-Labs/overlord-network-kill-switch

To get started quickly with Podman:

podman run -d --replace --name=overlord-dns -p 19000:19000 --env-file=./etc/envfile ghcr.io/5l-labs/overlord-network-kill-switch:2.5

What was hard about this?

Testing, Testing, Testing. Time management - this took far longer than planned for the limited time I had.

  • Not DOSing the Ubiquiti Controller while trying to validate code paths
  • Ensuring Pi-hole v6 API calls were working as expected
  • Adding in edge-case / race-condition checks
  • Making it proper, releasable that someone else might use it

Did AI Help?

No, not really. It did do some scaffolding and documentation, but the core logic was still human led. I do plan to use Jules to keep ripping out dead code paths.

Recent Changes

  • Pi-hole v6 API Integration: The project now uses the new pihole6api library to interact with the Pi-hole v6 API. This allows for more reliable and efficient management of blocklists.
  • Ubiquiti Control 9.4.19 Support: The project has been updated to support the latest version of Ubiquiti Control.

How It Works (The "Background")

I use the firewall rules on my Ubiquiti gear to enforce blocks on devices (like school-issued laptops) that are configured to bypass my local Pi-hole DNS. This setup allows for creating network-level blocks for common services, providing a more robust solution for locked-down devices. It was a fun project, and it gives my family an easier way to manage internet access as my kids get older.

Adventures in CheapML for IoT

· One min read
Nick Lange
Someone at 5L Labs

I have probably bit off more than I can chew with this project.

What is hard (or time consuming) about this?

  • Generating the testing/training data set. I ended up using a VLM to do the initial labelling, with manual overrides possible
  • As I'm trying to run this with limited resources on a (RPI 4 with 4GB RAM) that means starting the ML models from scratch.
  • Trying to leave something that is generalizable enough for other cameras in the house - or just give up and pay the $20/mo for Frigate/Scrypted Cloud.

New Things

  • PyTorch -> ONNX -> TFLite -> Latest
  • TFLite -
  • ONNX Runtime -

Adventures in CheapML

· One min read
Nick Lange
Someone at 5L Labs

With Scrypted / Thingino up and stable, the next goal is to replace my janky garage door sensor with a camera-based sensor. With some luck, I can extend this to every camera in the house cheaper and more accurately than Frigate, but let's not get ahead of ourselves.

  1. What I have:

    • Wyze Cam v3
    • Scrypted
    • Thingino
    • HomeKit
    • RPI 4 that isn't melting
  2. What I need:

    • A way to detect when the garage door is open or closed
    • A way to update MQTT with the state of the garage door
    • A way to update MQTT with the state of the car

So far: I've vibe coded up a script to use OVNIF Snapshot protocol to take a snapshot of the camera every 60 seconds.

Almost bricking a v3 Wyze Cam (and back again...)

· One min read
Nick Lange
Someone at 5L Labs
  • Wyze integrates and resells IoT cameras and devices for low capital cost, and has been under investor pressure to generate more monthly recurring revenue (missing source)
  • In addition, your data goes to the Wyze Cloud Infra on AWS where mistakes have happened.
    • I'm not judging, but I am if you are walking around naked (or worse) in from of a wyze product.
  • I'm not opposed to regularly paying Wyze for continuing to identify and bring promising solutions to the US from Shenzhen, BUT
    • I'm already paying Apple and Google - do I really need to pay wyze?
  • Scrypted and Frigate started as open source Private IoT Camera management software - streaming on the local lan via ovnif
  • They both work with the Wyze API, but Wyze recently change their firmware to force

NAT AT THE ROUTER FOOL (didn't work... why?)

https://github.com/themactep/thingino-firmware/wiki/Ingenic-USB-Cloner https://www.youtube.com/watch?v=GqStXVXOPWg

https://www.youtube.com/watch?v=jm4wze_HY78 https://www.youtube.com/watch?v=SJgadXkdwzw - Flashing Wyze CAm v3

Wyzely saying goodbye to Wyze!

· One min read
Nick Lange
Someone at 5L Labs

Getting more private from Wyze:

  • Battery Cam Protocol
  • Non-Recent Cameras

Outstanding Details

  • Outstanding documentation Items
  • Add more details about the network architecture
  • Include diagrams and screenshots of the setup

My Private Home

· One min read
Nick Lange
Someone at 5L Labs

This post will evolve to cover the basics of setting up a private home network between multiple locations using wireshark and ensuring that traffic follows the right path.

All routers are currently ubiquity, although they may be replaced with other more private brands should their be any issues with phone-home discovered.

Outstanding Details

  • Outstanding documentation Items
  • Add more details about the network architecture
  • Include diagrams and screenshots of the setup