Today I bought a dehumidifier. I have a quite solid smart home already and Sonoff humidity/temperature sensor was reporting crazy numbers. Now with the dehumidifier (Tesla Smart Dehumidifier XL) it looks the Sonoff SNZB-02 sensor is ~10% off the reality. Haha.
Naturally, I would say the dehumidifier will have a better sensor, but who knows. Anyway. Since it's "smart" I went on a journey to reverse-engineer it to have it in Home app along with my other devices. Btw Proximan is an insanely awesome tool for network interception...
...it supports SSL proxying, and it's super powerful – you can easily proxy iPhone through it. It has even a companion iOS app, everything in a slick design. Really, one must love quality software like this. Well after a few minutes I discovered it's actually Tuya-powered.
From that moment it was quite easy, there's an official plugin to get it working within Homebridge (❤️) – just the support for the dehumidifier was missing, so I hacked it together: github.com/tuya/tuya-homebridge/pull/328. Really ugly piece of code, but it works. 🫡
The funny part was testing. Homebridge has actually awesome feature – isolated child bridges. So I enabled it for the plugin and via VSCode/SSH remote session I was editing it directly in the node_modules, restarting the isolated process without killing my whole HB instance.
Really, throw a stone who never touched code in node_modules as a part of the development flow. 😆
To close this thread; I really enjoy moments like this, being able to whisper to machines and make your life better feels cool and it's fun.