Energy monitoring and creating a code black hole...
I want to improve my energy monitoring system, which is currently based on a Chinese Tuya device, which uses a CT clamp, and is interrogated every 30 seconds by a Python script on an RPi. This device talks to the Tuya cloud, and accessing it locally on the LAN requires a Tuya developer account and lots of shenanigans. it is also about 3% out, which is boring. Ideally I'd just get someone to fit a wireless-enabled inline device which actually measures the current, rather than using a CT clamp. However, these don't seem to exist, so I'd need An inline device like an Eastern SDM120M, which does ModBus, sadly over RS485, which is a PitA Another device to use ModBus to interrogate the SDM120, and do something with the data The OpenEnergyMonitoring (OEM) approach is to use a RPi in conjunction with a RS485-USB converter plugged into the RPi's USB ports. I have obtained a PZEM-016 CT-based power monitor, which is apparently 1% accurate, which also has ModBus over RS485, and I