Pages

18/12/2021

Measuring central heating return temperature with ESPHome, Home Assistant, and a Inkbird IBS-TH1

I'm currently renting and the boiler in my flat is old and lacking smarts. Last year I had a Drayton Wiser Thermostat installed which I'd highly recommend to people doing smart home stuff. The native app is tolerable, but it's takes minimum effort to get it working with Home Assistant, a popular home automation platform. Home Assistant allows me to do things like automatically set away mode when the house is empty, and also gather some metrics like when the boiler is actually on ( Or at least, the thermostat is calling for heat ), and if someone has fiddled with the thermostat...

One of the Wisers strengths is an intelligent, PID controller like operation that switches the heating on and off fairly frequently to prevent overshoot, and it does a good job at keeping the temperature relatively stable. But I'm curious how the seemingly short cycles affect the temperature of the water in the system, so I'd like to collect some more metrics on the return temperature and eventually the flow and hot water pipes if it works out.

 

Inkbird IBS-TH1 Sensor

 

 

17/12/2021

M5Stack Atom Lite + esphomeflasher = "Error: Reading chip details failed: Timed out waiting for packet header"

I recently purchased a M5Stack Atom Lite ESP32 module to use with ESPHome. It wouldn't flash with the browser, so I downloaded the binary and attempted to upload it with esphomeflasher, but it failed with the error "Error: Reading chip details failed: Timed out waiting for packet header" on every attempt.
 

Fortunatly I found a work-around.


15/12/2021

Mikrotik RouterOS - "received unsupported protocol 0x2145"

I've recently been playing with L2TP tunnels between Cisco and Mikrotik gear in an LAC/LNS type configuration. The L2TP tunnel was coming up but any traffic across the tunnel would fail. Enabling l2tp logging on the Mikrotik router revealed the error "received unsupported protocol 0x2145"

Google didn't give any direct solutions but did give a few clues suggesting it might be related to "Protocol Field Compression" (PFC),  and reading RFC 1661 yielded a bit more information on how it should work.

Fortunately I was able to find a fix.

 
https://humornama.com/wp-content/uploads/2020/08/Leonardo-DiCaprio-laughing-meme-template-of-Django-Unchained-1024x1024.jpg
A Mikrotik bug? Never!

10/12/2021

Restoring a GPO 332 Bakelite Telephone

I've previously restored several old Bakelite GPO 300 series telephones and had a couple of people ask me to document how I go about it. I'm pretty bad at taking before / after photos as I tend to just dive in and dismantle the things before even considering taking a photo, so this time around I tried to get some photos before, during and after the restoration. I still got ahead of myself at times so the photos aren't quite in chronological order but I've tried to go back and fill in the gaps.

I aquired this phone from a seller on Facebook Market place along with a 232 Telephone and CB 935 Switchboard ( More info on those another day ). It was in reasonable condition but could do with some love to bring it back to its former glory.


The telephone, pre-restoration

 

 

Adjusting a GPO No. 12 Dial with a Digital Oscilloscope

In order for an exchange to detect the "pulses" a rotary dial generates, the timing needs to be within an acceptable range. There's two main parameters, the pulse speed, which should be 10 ± 0.5 pulses per second, and the break ratio, which should be between 63 - 67%. These will drift over time and will likely change after the dial has been cleaned, so adjusting the dial is best practise during restoration.

There are specialist pieces of equipment for testing dials, but you can get away with using a cheap digital oscilloscope that calculates the duty cycle and cycle time. In theory you could calculate both of these using an analog scope, but I won't go into that here.

I use a "DS213" oscilloscope which is a tiny handheld thing, but you should be able to use almost anything - we're only trying to measure 10Hz. If you don't have an oscilloscope, consider buying a cheap one or asking your local electronics / radio enthusiast, a Hackspace or an Amateur Radio Club. It might also be worth checking if your multimeter has basic oscilloscope functionality.

Before adjusting the dial you should give it a through clean, I've documented the process in another blog post.

DS213 oscilloscope

Cleaning a GPO No. 12 Dial

Rotary telephone dials are a thing of beauty. They're entirely mechanical but manage to accurately and consistently "pulse" a telephone line in order to signal the number the user wishes to call. The first time I restored one it happened by accident - I had no intention of fully dismantling it but I removed one too many screws and the spring lost it's tension, so I ended up stripping and re-building it. It's not actually that difficult, so don't be put off. I recently aquired a GPO 332 that needed some love, so I thought I'd document the restoration process. Restoring the dial is a significant section of the process, so I thought I'd split it into a seperate post.

Here's the dial in the condition I aquired it. Visually it's not the worst I've seen, but it wasn't running very well as the speed would vary dramatically and it would stick in places - making it a good candidate for a deep clean. 

 
Dial No. 12 in its uncleaned state.