EST. 2026 — Notes from real server work SYSADMIN · SECURITY · AI · DIRECTADMIN Issue 01
THE SYSADMIN ALMANAC
Home / Tags / Modbus / RS485
Modbus / RS485

#Modbus / RS485

5 articles
Hardware / IoT
No kWh Meter? Estimate Daily Electricity Costs from Current
Hardware

No kWh Meter? Estimate Daily Electricity Costs from Current

Notes on converting CT current readings into energy usage and daily time-of-use electricity costs, from the three-phase power formula and the sampling interval built into it, through skipping outages and separating peak from off-peak with epoch arithmetic, to a daily summary table that made the web page seven times faster.

#energy#power-meter#electrical#modbus
10 min read·15 Oct
Reading an Unknown Modbus Device: Verify Before Interpreting
Hardware

Reading an Unknown Modbus Device: Verify Before Interpreting

My notes on tracking down an undocumented device on an RS485 bus, from scanning baud rates and addresses one combination at a time to proving which registers hold live values and which are dead, and the lesson that guessing a device's type from number patterns alone can lead to months of misinterpretation.

#modbus#rs485#serial#iot
11 min read·14 Oct
Moving JSON Time Series to Columns Without Changing the Dashboard
Linux

Moving JSON Time Series to Columns Without Changing the Dashboard

I stored entire device frames as JSON arrays at one row per second. After two weeks, the tables had grown to 183 MB at the endpoint and 625 MB on the server, with JSON_EXTRACT queries that could not use an index — here is how I moved the data into int columns and had the API rebuild a sparse array without changing a single line of the dashboard.

#mariadb#mysql#migration#performance
10 min read·11 Oct
Reading a DTSU666 3-Phase Meter with Raspberry Pi over Modbus RS485
Linux

Reading a DTSU666 3-Phase Meter with Raspberry Pi over Modbus RS485

Notes on connecting a DTSU666 Smart Power Sensor to a Raspberry Pi over RS485, reading 3-phase electrical measurements from multiple meters using Modbus RTU, decoding 32-bit floats correctly, and storing them in SQLite/MySQL before exporting through MQTT and a REST API, including a negative-value bug I ran into myself

#modbus#rs485#iot#dtsu666
11 min read·19 Jul
Reading Modbus RTU over an RS485 Gateway Without Phantom Values
Linux

Reading Modbus RTU over an RS485 Gateway Without Phantom Values

Connecting multiple Modbus RTU meters/sensors on an RS485 bus through a serial-to-Ethernet gateway can produce phantom values, incorrect readings, or devices that do not actually exist — because a transparent gateway uses RTU-over-TCP, which requires assembling frames and calculating CRC yourself, and validating every reply. This article covers the rules I learned from doing it.

#modbus#rs485#iot#python
9 min read·15 Jul