technical

88 posts

technical

Installing Valetudo on Xiaomi Roborock S5 Robovac - The easy way!

In December I wrote a convoluted post on obtaining the token from a Xiaomi robovac. I'm pleased to detail a much simpler way in this post. We are going to install Valetudo which is a standalone binary that runs on rooted Vacuums of the Xiaomi ecosystem and aims to enable the user to operate the robot vacuum without any Cloud Connection whatsoever. Reset the Robovac to Factory Settings First, reset the Robovac to factory settings. * Press and hold the recharge button for 3-5 seconds - do no

traefik

Traefik v2 and external services like Home Assistant and Blue Iris

I recently made the switch from the nginx reverse proxy life to Traefik. I've written a couple of other posts recently about the process: * Running Unifi controller behind Traefik * Running InvoiceNinja behind Traefik Today's post is going to cover the final piece of the jigsaw I needed to solve before I could dump nginx, the file provider. In otherwords - how do I use Traefik to route traffic for services that aren't containers or published via another service discovery backend? In the case

terraform

How to use count with modules in Terraform 0.13

The upcoming 0.13 release of Terraform adds many new features. In my opinion none are more exciting than finally being able using count when calling a module. At last this means that we can define a reusable chunk of code, in the form of a module, and use the fantastic count feature of Terraform as if we were inside a resource. Modules In it's most basic form a module is a block of re-usable code. Confusingly, a module in Terraform is technically any set of templates in a folder. However, in

3d printing

Fix bad TPU prints

I have a confession. This week a roll of TPU filament purchased from Rigid Ink in March 2018 was discovered lurking in a box and it was time to print some antenna holders for an FPV drone. The trouble with filament that's been left in storage, however carefully, is that due to the hygroscopic nature of certain filaments they basically become waterlogged. TPU is particularly badly affected by this. The roll I had was still factory sealed with a dessicant packet inside the spool and yet it was cl

technical

SSH Tips and why ProxyJump is awesome

What would we do without SSH? I must use it hundreds of times a day for all sorts of tasks. Connect and control any server anywhere in the world? Yes please! In this article I will outline a few tips and tricks I've accrued over the years to make SSH even better. SSH Keys Keys are an absolute fundamental for using SSH. They mean you don't need to use passwords to login to your remote systems and are much more secure. The gold standard for many years has been the rsa key type but more recentl

openshift

Configure Unbound DNS for Openshift 4

A little while ago I wrote a post over on openshift.com about installing Openshift 4 on VMware. Some of you reading it have asked me how I configured the DNS in my particular set up so this post aims to outline that for you. My current firewall software of choice is opnsense, a fork of the popular pfsense project. Both of these projects share a lot of DNA, including their usage of the DNS server unbound. Note this post was written to compliment the openshift.com blog post and was tested agains

pihole

Using Pihole with pfsense or opnsense

Pihole is a network wide ad blocker. Using DHCP we can tell every device on your network to automatically and transparently use Pihole for DNS. But what if you have custom DNS entries in your firewall? I use OPNsense but this process largely transposes to PFsense as well. When your laptop makes a DNS request, it is sent to Pihole. Pihole performs a lookup and if it can't find the requested address, forwards that request on to the next DNS server in the chain. If OPNsense has that DNS record in

terraform

Store Terraform secrets in YAML files with yamldecode

In May of 2019 Hashicorp released Terraform 0.12. This release completely changed the way in which variable interpolation was performed and whilst some backwards compatibility was kept, there were some breaking changes. Most notably, the way in which functions and interpolations were called with no more "${}" required. Here's the problem statement. I want to use Terraform to create VMs on Digitalocean using the token that doctl stores in ~/.config/doctl/config.yaml. Using that same logic it mad

unifi

How to adopt a Unifi AP with a remote controller

A fresh out of the box Unifi Access Point has no idea what to do with itself. It starts scanning the local LAN for any controllers to 'announce' that it is here and needs configuration. But what about when your controller isn't on the LAN? Mine is running on a DigitalOcean droplet, for example. We need to tell the AP where the controller resides in order for the announcement to be successful. It's actually a relatively straightforward thing to solve but requires a few steps which I'll outline b

home assistant

Home Assistant External Reverse Proxy Setup with nginx

I run nginx as my reverse proxy of choice from the folks over at linuxserver.io with automated Let's Encrypt functionality. It plugs neatly into the 20 or so containers I run on my primary server VM and the thought of migrating over the in-built Home Assistant plus reconfiguring all my configs made me go weak at the fingertips. My fully Ansiblised home infrastructure is open sourced at github.com/ironicbadger/infra including all my reverse proxy configs I was running into an issue for a while

home assistant

Backing up Home Assistant

HASSIO is probably the easiest way to run Home Assistant. It's a pre-packaged appliance aimed at a few key devices such as Raspberry Pi and so on. Being an appliance has pros and cons. The primary con is that installing software and advanced system configuration is not possible, though this is conversely also the primary advantage! You spend time with Home Assistant not administrating the system. Bad things happen and backups are your last line of defense in the event of hardware failure, theft

home assistant

Getting a Xiaomi API Token for a Roborock S5 to link with Home Assistant

On Black Friday the Roborock S5 was discounted heavily enough that I bought one. I gave the Home Assistant Xiaomi Mi Robot Vacuum integration a look over before I did and browsed some reddit posts suggesting it was supported. Approximately 6 hours of frustration later, I finally got my API token. Here's how... Being no stranger to API keys, Personal Access Tokens and what have you I didn't really think that getting the token required for Home Assistant to connect with the Robot Vacuum could pos