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

#IoT

12 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
Too Many Alerts Mean No Alerts: Tuning a Bot People Will Read
Linux

Too Many Alerts Mean No Alerts: Tuning a Bot People Will Read

In one day, 28 events became 56 messages, and 57 percent of all events were repeat alerts every 30 minutes. This article covers recipient tiers, merging overlapping cycles, state that survives restarts, and why you must not add keepalive to a chat app session.

#monitoring#alerting#bot#logging
9 min read·5 Oct
Decoding a Bluetooth Label Printer Protocol from btsnoop
Linux

Decoding a Bluetooth Label Printer Protocol from btsnoop

My Bluetooth label printer only had a mobile app and no way to connect it to my own system, so I enabled HCI snoop logging on my own phone, peeled away HCI/ACL/L2CAP/RFCOMM one layer at a time with a short Python parser, and compared the results with open-source libraries until I could read the commands and print directly from a script.

#bluetooth#ble#python#reverse-engineering
9 min read·25 Aug
Read Device Uptime Without SNMP/SSH/API Using TCP Timestamps
Network

Read Device Uptime Without SNMP/SSH/API Using TCP Timestamps

Many IP cameras, door controllers, and embedded devices have no SNMP, SSH, or API for querying uptime. But if they return TCP timestamps, I can read their boot time remotely without logging in even once.

#networking#monitoring#linux#python
7 min read·20 Aug
Factory to Cloud Behind NAT: Push Snapshots and a Command Queue
Network

Factory to Cloud Behind NAT: Push Snapshots and a Command Queue

The production machine sits in a LAN behind NAT with no public IP, but the owner wants to view data on a cloud website and make edits from a phone that reach the internal machine — possible without opening ports or setting up a VPN, using push snapshots + an edit command queue + idempotent acks

#automation#networking#nat#api
10 min read·9 Aug
Inferring Cold Room Defrost Timing from Temperature Slopes
Linux

Inferring Cold Room Defrost Timing from Temperature Slopes

A cold room used to dehydrate glass noodles has no humidity sensors, but frost on the coil always flattens the temperature drop slope (dT/dt). This article uses the lumped-capacitance equation and time constant τ to detect frost and trigger demand defrost with working Python code, along with calculations for R404A COP and water removed per cycle.

#refrigeration#iot#monitoring#python
10 min read·22 Jul
reCamera + Gimbal: RISC-V Cross-Compilation, CAN, and Node-RED
Linux

reCamera + Gimbal: RISC-V Cross-Compilation, CAN, and Node-RED

reCamera is an AI camera on a RISC-V chip mounted on two brushless axes, with rotation controlled over CAN bus at a resolution of 0.01 degrees. This article covers cross-compiling C for riscv64 musl, uploading to the device with scp, the CAN frame structure for motor control, reading back the 15-bit encoder, finding motor zero using current, a Node-RED dashboard + PID + auto-track, and STP files for 3D-printing the housing.

#recamera#iot#automation#python
10 min read·21 Jul
Read a Toledo RS-232 Scale over Bluetooth with PowerShell
Linux

Read a Toledo RS-232 Scale over Bluetooth with PowerShell

Connect a TWT-01 digital scale with only an RS-232 port to a PC through a BT578 Bluetooth adapter, then read its weight in real time with PowerShell — from Bluetooth pairing and finding the COM port by MAC address to decoding 18-byte Toledo Continuous frames and the null-byte and scale auto-sleep pitfalls I encountered in practice.

#serial#windows#automation#iot
8 min read·20 Jul
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