{"title":"Simple IoT","subtitle":"Add remote sensor data, telemetry, configuration, and device management to your product. One application runs in the cloud and at the edge, synchronizing data in both directions.","link":[{"@attributes":{"rel":"self","type":"application\/atom+xml","href":"https:\/\/simpleiot.org\/atom.xml"}},{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org"}}],"generator":"Zola","updated":"2026-11-05T00:00:00+00:00","id":"https:\/\/simpleiot.org\/atom.xml","entry":[{"title":"Custom dashboard widgets from SVG files","published":"2026-11-05T00:00:00+00:00","updated":"2026-11-05T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/custom-widgets\/"}},"id":"https:\/\/simpleiot.org\/blog\/custom-widgets\/","content":"<p>The <a href=\"\/blog\/dashboards\/\">dashboards<\/a> introduced recently come with a set of\nbuilt-in components: gauges, switches, tanks, pumps, and so on. Simple IoT can\nnow also draw your own SVG files as dashboard widgets, so the graphics on a\ndashboard can be whatever your equipment needs.<\/p>\n<p>The <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/youtu.be\/nr9swaWLc68\">video demo<\/a> starts with a blank system and\nimports the custom widget demo from the source tree:<\/p>\n<pre class=\"giallo\" style=\"color: #CDD6F4; background-color: #1E1E2E;\" ><code data-lang=\"shellscript\"><span class=\"giallo-l\"><span style=\"color: #89B4FA;font-style: italic;\">siot<\/span><span style=\"color: #A6E3A1;\"> import<\/span><span style=\"color: #94E2D5;\"> &lt;<\/span><span style=\"color: #A6E3A1;\"> testdata\/custom-widget-demo.yaml<\/span><\/span><\/code><\/pre>\n<p>This adds a group of variables, signal generators, and dashboards. It also adds\na handful of file nodes, each holding an SVG drawing. Every widget on the demo\ndashboard is drawn by one of those files.<\/p>\n<h2 id=\"how-a-widget-binds-to-data\"><a class=\"heading-anchor\" href=\"#how-a-widget-binds-to-data\" aria-label=\"Permalink to this section\">How a widget binds to data<\/a><\/h2>\n<p>Setting one up takes two steps. Add a widget, pick the <strong>svg<\/strong> component, and\npoint it at the file node that holds the drawing. You can view and edit the SVG\ncontents in the browser, or upload a new file.<\/p>\n<p>Inside the SVG, <code>data-siot-*<\/code> attributes on elements declare what follows a node\nvalue. The demo\u2019s pump drawing declares two bindings, running and speed. When\nyou add the widget, SIOT lists every binding the drawing declares, and you bind\neach one to a node. The pump\u2019s running binding is bound to the same pump command\nvariable as the switches on the dashboard, so flipping a switch starts and stops\nthe pump graphic.<\/p>\n<p>There is not much more to it than that. The\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/user\/dashboards.html#custom-drawings\">dashboards guide<\/a>\nlists the attributes: text with decimals and units, rotation for dials, level\nfor vessels, toggle and set for clickable controls, and ports so links on a\ncanvas can attach to the drawing.<\/p>\n<h2 id=\"creating-a-new-widget-with-ai\"><a class=\"heading-anchor\" href=\"#creating-a-new-widget-with-ai\" aria-label=\"Permalink to this section\">Creating a new widget with AI<\/a><\/h2>\n<p>The SVG files are short and simple, but writing one by hand means working out\ncoordinates and element positions, which is tedious. The source tree includes\nseveral Claude Code skills, and the <code>siot-build<\/code> skill knows how to build\ndashboards and widgets.<\/p>\n<p>In the video, I ask Claude to create a blank canvas dashboard named Rover, and\nthen to add a widget for an autonomous off-road rover with four-wheel drive,\nturning wheels, and separate front and rear drive controls. A few minutes later\nthere is a rover on the dashboard.<\/p>\n<p><img src=\"https:\/\/simpleiot.org\/images\/blog\/custom-widget-rover.png\" alt=\"A dashboard with a rover widget: front and rear drive switches on the left, a top-down drawing of a four-wheel rover with a speed readout and FRONT and REAR buttons in the middle, and a speed gauge on the right\" \/><\/p>\n<p>The front and rear wheels can be started from the switches beside the widget, or\nfrom the buttons drawn inside it. Stop the wheels, and the speed drops to zero\nright away.<\/p>\n<p>The demos so far have been industrial control applications. This one is\ndifferent, perhaps monitoring an autonomous vehicle, and that is the point.\nSimple IoT is for rich, real-time interaction with any kind of equipment, and\ncustom widgets let you draw graphics that clearly show what the equipment is\ndoing.<\/p>\n<p>Thoughts, questions, feedback,\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/community.tmpdir.org\/c\/simple-iot\/5\">let me know<\/a>.<\/p>\n"},{"title":"Dashboards that sync like everything else","published":"2026-11-04T00:00:00+00:00","updated":"2026-11-04T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/dashboards\/"}},"id":"https:\/\/simpleiot.org\/blog\/dashboards\/","content":"<p>Simple IoT now has dashboards. This continues the SIOT tradition of rich,\nreal-time interaction with remote devices and extends it from sensor data and\nconfiguration to the dashboard and HMI views that operators actually look at.<\/p>\n<p>The <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/youtu.be\/5WxccstXRwM\">video demo<\/a> runs two instances, one local and\none on a cloud server, and starts by importing the demo data set from the source\ntree:<\/p>\n<pre class=\"giallo\" style=\"color: #CDD6F4; background-color: #1E1E2E;\" ><code data-lang=\"shellscript\"><span class=\"giallo-l\"><span style=\"color: #89B4FA;font-style: italic;\">siot<\/span><span style=\"color: #A6E3A1;\"> import<\/span><span style=\"color: #94E2D5;\"> &lt;<\/span><span style=\"color: #A6E3A1;\"> testdata\/dashboard-demo.yaml<\/span><\/span><\/code><\/pre>\n<p>This adds a small water system: five dashboards, a couple of rules, some signal\ngenerators to produce live data, and the variables the rules act on. The home\nscreen then shows an overview dashboard.<\/p>\n<p>There are two kinds of dashboards:<\/p>\n<ul>\n<li><strong>Grid:<\/strong> widgets arranged in columns. On a narrow screen like a phone the\ngrid reflows to a single column.<\/li>\n<li><strong>Canvas:<\/strong> a process mimic drawn on a fixed plane, with tank, pump, and valve\ncomponents and links between them.<\/li>\n<\/ul>\n<p>The way I like to lay things out is to build smaller canvases and then arrange\nthem on a grid. A phone shows everything in a usable column, and a large screen\nshows it all at once. The demo also includes a server dashboard that shows CPU,\nmemory, storage, and other host metrics.<\/p>\n<p><img src=\"https:\/\/simpleiot.org\/images\/blog\/dashboard-overview.png\" alt=\"The demo\u2019s Overview dashboard: a grid of four canvases for the supply pump, storage tank, heating loop, and alarms, each with switches, gauges, and process mimics\" \/><\/p>\n<p>The web UI now has two views: the traditional node tree, and a Dashboards tab\nthat lists every dashboard you can reach. Set a home dashboard on your user\nnode, and that is what you see when you sign in.<\/p>\n<h2 id=\"syncing-the-hmi\"><a class=\"heading-anchor\" href=\"#syncing-the-hmi\" aria-label=\"Permalink to this section\">Syncing the HMI<\/a><\/h2>\n<p>The interesting part comes when the local instance connects to the cloud. In the\ndemo, the local instance enrolls with the server using an enrollment token, the\nserver accepts it, and a minute later the two instances are connected. The demo\nsite now shows up on the server with the same tree, and the same dashboards.<\/p>\n<p>Make an operational change on the cloud, such as flipping a switch, and the\nlocal instance reflects it right away. Make it locally, and the cloud follows.\nThis is the same real-time sync SIOT already does for data, now covering the HMI\nas well.<\/p>\n<p>Layout syncs too. A typical scenario is configuring a system remotely while the\nlocal UI needs to show the same thing. Put the dashboard in edit mode on the\nserver, move a widget and make it bigger, and the edge instance redraws it as\nyou drag. Edit on the edge, and the server follows.<\/p>\n<p>The reason this works is that dashboards and their widgets are just more nodes\nand points in the tree, and SIOT is good at synchronizing trees. Look at the raw\ndata for a widget and you find a handful of properties: the node it is bound to,\nthe point it reads, its position, and a few options. There is no separate\ndashboard database or layout file to keep in sync.<\/p>\n<p>Binding a widget to a different source is a matter of picking another node. In\nthe demo, the line pressure widget reads a random walk signal generator. Clear\nthat and type to search, and it can read the motor temperature instead.<\/p>\n<p>The <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/user\/dashboards.html\">dashboards guide<\/a>\ncovers building a dashboard, canvas layouts, controls, relative bindings for\nmirroring one dashboard under many devices, nested dashboards, and kiosk mode.\nWe hope to do a lot more here.<\/p>\n<p>The widget design took inspiration from\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/github.com\/joyautomation\/nautilus\">Nautilus<\/a>, Joy Automation\u2019s\nopen-source toolkit for building control and supervisory systems in Go. Thanks\nto that project for showing what a modern, code-first HMI can look like.<\/p>\n<p>Thoughts, questions, feedback,\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/community.tmpdir.org\/c\/simple-iot\/5\">let me know<\/a>.<\/p>\n"},{"title":"Some dependencies make your life easier","published":"2026-11-03T00:00:00+00:00","updated":"2026-11-03T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/dependencies\/"}},"id":"https:\/\/simpleiot.org\/blog\/dependencies\/","content":"<p>Some dependencies cause pain when updated, and others quietly improve a system.\nI noticed this in the Simple IoT changelog after a recent Go dependency update.<\/p>\n<ul>\n<li><strong>Sync and the store recover more reliably from dropped connections.<\/strong> The\nNATS Go client 1.55.0 fixes deadlocks, leaks, and stalls in reconnect, drain,\nand ordered consumers, so a device on a flaky link reconnects and resumes\ncleanly.<\/li>\n<\/ul>\n<p>Handling all the edge conditions of a flaky network link is indeed one of the\nhard parts of IIoT systems, and it is nice when dependencies do some of this\nwork for us. The <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/nats.io\/\">NATS.io<\/a> dependencies in the Simple IoT\nsystem are stable and are always improving. I\u2019ve not encountered any problems\nand update without hesitation when there are new versions available.<\/p>\n<p>Simple IoT stands on the shoulders of giants to provide a reliable real-time\nsystem for device manufacturers who want rich, real-time interaction with remote\nsystems.<\/p>\n"},{"title":"Scaling the UI to large data sets","published":"2026-10-30T00:00:00+00:00","updated":"2026-10-30T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/scaling-ui-large-data-sets\/"}},"id":"https:\/\/simpleiot.org\/blog\/scaling-ui-large-data-sets\/","content":"<p>How do you show thousands of devices in a browser without loading them all?\nPagination loads a page at a time as you scroll. Search loads only the matches.\nSimple IoT takes a third approach and follows the structure of the data: the\nsystem is a tree of nodes, so the UI loads a node when you expand it and watches\nonly the nodes on screen.<\/p>\n<p>The <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/youtu.be\/nTNtVRTNRHQ\">video demo<\/a> shows this with two browser\nwindows open on one instance. It starts by importing\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/github.com\/simpleiot\/simpleiot\/blob\/master\/testdata\/large-tree.yaml\"><code>large-tree.yaml<\/code><\/a>,\na test data set of 1,457 nodes that reaches 50 levels deep:<\/p>\n<pre class=\"giallo\" style=\"color: #CDD6F4; background-color: #1E1E2E;\" ><code data-lang=\"shellscript\"><span class=\"giallo-l\"><span style=\"color: #89B4FA;font-style: italic;\">siot<\/span><span style=\"color: #A6E3A1;\"> import<\/span><span style=\"color: #94E2D5;\"> &lt;<\/span><span style=\"color: #A6E3A1;\"> testdata\/large-tree.yaml<\/span><\/span><\/code><\/pre>\n<p>The browser debugger in the right window shows the WebSocket messages arriving\nover NATS. When we edit a node in the left window, here is what the right window\nreceives:<\/p>\n<ul>\n<li><strong>Node on screen:<\/strong> a message arrives right away and the value updates.<\/li>\n<li><strong>Node collapsed or never expanded:<\/strong> no messages arrive.<\/li>\n<li><strong>Node expanded again:<\/strong> the UI fetches it and shows the latest value.<\/li>\n<\/ul>\n<p>Interest drives the data flow. Expanding a node says you want to see it, so the\nUI fetches that node\u2019s children and subscribes to the nodes on screen.\nCollapsing a node ends those subscriptions. The browser\u2019s work follows what you\nare viewing, so it stays small even as the tree grows.<\/p>\n<p><a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/nats.io\/\">NATS<\/a> subscriptions make this control simple. Each node has\nits own subject, so the UI chooses what data it sees by subscribing to the\nsubjects for the nodes on screen, and the server sends nothing else.<\/p>\n<p>The tree does this work for us. Every SIOT system already has this structure, so\nthe UI needs no separate paging or caching scheme. The\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/ref\/frontend.html\">frontend reference<\/a> covers\nthe details.<\/p>\n<p>Thoughts, questions, feedback,\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/community.tmpdir.org\/c\/simple-iot\/5\">let me know<\/a>.<\/p>\n"},{"title":"Rich, real-time interaction with remote devices","published":"2026-10-15T00:00:00+00:00","updated":"2026-10-15T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/rich-realtime-interaction\/"}},"id":"https:\/\/simpleiot.org\/blog\/rich-realtime-interaction\/","content":"<p>While recording the\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/simpleiot.org\/blog\/realtime-edge-to-browser\/\">last demo<\/a>, I had an\ninsight:<\/p>\n<p><strong><em>SIOT is for people who want rich, real-time interaction with remote\ndevices.<\/em><\/strong><\/p>\n<p>While we\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/ref\/bandwidth.html#ideas\">have a path to fairly low<\/a>\ndata usage, this is not the first priority. The first priority is that when we\nsee data in the portal, we know it is current. When we turn on a pump remotely,\nit turns on instantly. When a condition happens that causes a rule to activate,\nit happens immediately, not minutes later when the system gets around to running\nthat rule. These priorities drive the design and architecture of SIOT. I\u2019ve\nspent too much time with consumer IoT technologies watching spinners spin for\ntens of seconds while waiting for my garage door to close, only to be told\n\u201csomething went wrong.\u201d SIOT is something different, designed for industrial\nreliability and responsiveness. In that demo, a button press on a Raspberry Pi\ntravels to the cloud server, through a rule, and back to an LED in about 100 ms.<\/p>\n<p>This focus requires some tradeoffs. You probably can\u2019t get this responsiveness\nusing lambda functions in a hyperscale serverless cloud system. You can\u2019t easily\nscale it to a bazillion devices, or implement it with a 2 MB\/month device\nbandwidth budget. But the goal we are working toward is to support thousands of\ndevices and hundreds of users in real time with a relatively modest cloud server\nrunning SIOT.<\/p>\n<p>This is the vision. It\u2019s not for everyone or everything, but if you want a great\nuser experience for a connected industrial product, SIOT may be the technology\nfor you.<\/p>\n"},{"title":"Real-time edge-to-browser connectivity","published":"2026-10-13T00:00:00+00:00","updated":"2026-10-13T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/realtime-edge-to-browser\/"}},"id":"https:\/\/simpleiot.org\/blog\/realtime-edge-to-browser\/","content":"<p>Have you ever wanted to see the state of your remote devices in real time,\nwithout lag, spinners, or stale check-ins? Simple IoT now has real-time\nconnectivity from edge to browser based on <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/nats.io\/\">NATS<\/a>, which is a\nhigh-performance, lightweight, open-source messaging system. This allows for\nrich, efficient interaction with remote devices, where remote state updates\ninstantly and configuration changes take effect right away.<\/p>\n<p>In the demo below, we have SIOT running on a Raspberry Pi 5 connected to another\nSIOT instance running on a cloud server.<\/p>\n<p><img src=\"https:\/\/simpleiot.org\/images\/blog\/realtime-edge-to-browser-setup.svg\" alt=\"Demo setup: a Raspberry Pi 5 with a push button and LED syncs to the siot3 server, and a browser connects to both over NATS WebSocket\" \/><\/p>\n<p>The <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/youtu.be\/lqM4MPVNHsc\">video demo<\/a> walks through how this works.<\/p>\n<p>A rule on the server watches a push button on the Pi 5 and then turns on an LED\nwhen the button is pressed. This demonstrates a round trip of data from the Pi 5\nswitch, to the server, through the rules, and then back to the Pi 5 LED. The LED\nlights nearly instantaneously when the button is pressed. The round trip is\nbarely perceptible, roughly 100 ms.<\/p>\n<p>If the connection drops, NATS JetStream queues data at both ends, and\nfunctionality resumes nearly instantly once the connection returns.<\/p>\n<p>The NATS project is what makes this possible. NATS provides essential bits like\nJetStream that allows efficient synchronization between systems, and web client\nlibraries that push data efficiently to the browser in real time.<\/p>\n<p>SIOT models the entire system as a tree of nodes where each node is a set of\npoints. Telemetry, IoT data, and configuration are all just points and are\nhandled the same way. Write a point, and SIOT synchronizes it wherever it needs\nto go. This simplicity allows SIOT to efficiently synchronize data from a fleet\nof devices to your browser and makes it straightforward to extend with custom\nfunctionality for just about any application.<\/p>\n"},{"title":"GPIO, IIO, and Shelly device improvments","published":"2026-09-02T00:00:00+00:00","updated":"2026-09-02T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/hardware-io\/"}},"id":"https:\/\/simpleiot.org\/blog\/hardware-io\/","content":"<p>The <a href=\"\/blog\/mqtt\/\">MQTT post<\/a> covered the 0.25 release. Several things have\nlanded since then, mostly around reading real hardware.<\/p>\n<ul>\n<li><strong>Read a switch or drive a relay from a GPIO line.<\/strong> A <code>gpio<\/code> node reads or\ndrives one line on a Linux GPIO character device, so a rule can watch a float\nswitch and run a pump. Set the chip to <code>sim<\/code> to develop rules before the\nhardware exists. See the\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/user\/gpio.html\">GPIO client<\/a>.<\/li>\n<li><strong>Analog IO through the Linux IIO subsystem.<\/strong> An <code>iio<\/code> node reads ADCs, DACs,\nand the sensors the kernel presents the same way: accelerometers, pressure,\nhumidity, light. Name the device and its channels are detected and added as\nchildren, each publishing a reading in volts, amps, or degrees Celsius. See\nthe <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/user\/iio.html\">IIO documentation<\/a>.<\/li>\n<li><strong>Shelly devices are more discoverable and efficient.<\/strong> A Shelly Gen2 or later\ndevice answers with its own component list, so any such device works,\nincluding models released after this one. Status now arrives over a WebSocket\ninstead of polling, so a relay switched at the wall shows up right away. See\nthe <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/user\/shelly.html\">Shelly documentation<\/a>.<\/li>\n<li><strong>Mirroring a hardware node now creates a view of it<\/strong>, so only the instance\nwhere the node actually lives talks to the device, and a value set on the\nmirror travels back down to the hardware. See\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/ref\/data.html#primary-and-mirror-edges\">primary and mirror edges<\/a>.<\/li>\n<li><strong>User passwords are stored hashed.<\/strong> The store, sync streams, and exports\ncarry only a bcrypt hash. Existing passwords convert the next time each user\nsigns in.<\/li>\n<\/ul>\n<h2 id=\"upgrading\"><a class=\"heading-anchor\" href=\"#upgrading\" aria-label=\"Permalink to this section\">Upgrading<\/a><\/h2>\n<p>Node replies over NATS now use the binary point encoding instead of protobuf.\nThis is an incompatible wire change, so instances and devices that sync with\neach other need to be upgraded together. The\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/github.com\/simpleiot\/simpleiot\/blob\/master\/CHANGELOG.md\">changelog<\/a> has\nthe full list of changes.<\/p>\n"},{"title":"MQTT Support","published":"2026-08-20T00:00:00+00:00","updated":"2026-08-20T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/mqtt\/"}},"id":"https:\/\/simpleiot.org\/blog\/mqtt\/","content":"<p>Simple IoT now supports MQTT and is possibly the easiest way to get MQTT data\ninto Grafana. See also the <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/youtu.be\/ffo5BhcioWY\">MQTT demo<\/a> on the\nSimple IoT YouTube channel.<\/p>\n<p>There are three ways to configure MQTT:<\/p>\n<ol>\n<li>Detail each measurement (OK for a small number of measurements)<\/li>\n<li>Automatic nodes with a topic schema<\/li>\n<li>Sparkplug B<\/li>\n<\/ol>\n<p>(see the <a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/user\/mqtt.html\">MQTT docs<\/a> for more\ninformation)<\/p>\n<p>The second method is generally the most useful. Define a topic schema like:<\/p>\n<p><code>{site}\/{gateway}\/{device}<\/code><\/p>\n<p>And then when a message is received with the following topic:<\/p>\n<p><code>plant-07\/kepware-l3\/press\/tank_level<\/code><\/p>\n<p>SIOT will automatically create a tree of nodes, and then\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/user\/database.html#tag-inheritance\">assign the following tags<\/a>\nto the nodes and data:<\/p>\n<ul>\n<li><code>site:plant-07<\/code><\/li>\n<li><code>gateway:kepware-l3<\/code><\/li>\n<li><code>device:press<\/code><\/li>\n<li><code>key:tank_level<\/code><\/li>\n<\/ul>\n<p>These tags then travel with the data into the VictoriaMetrics time-series\ndatabase, which makes it easy to visualize in Grafana.<\/p>\n<p>The key point in all this is you only define the topic schema, and the rest\nhappens automatically. There is no mapping of tags or manual configuration for\nnew data that shows up.<\/p>\n"},{"title":"Sync is now stream replication","published":"2026-08-18T00:00:00+00:00","updated":"2026-08-18T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/sync-replication\/"}},"id":"https:\/\/simpleiot.org\/blog\/sync-replication\/","content":"<p>The <a href=\"\/blog\/jetstream-store\/\">previous post<\/a> covered moving the Simple IoT store\nto NATS JetStream. This post covers how we use streams to synchronize\noffline\/catch-up data. There is also a\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/www.youtube.com\/watch?v=THmQkxWp9fo\">demo of offline synchronization<\/a>\non the Simple IoT YouTube channel.<\/p>\n<p>Offline synchronization provides several key benefits:<\/p>\n<ul>\n<li>Nothing is lost during network disruptions, which are a fact of life in\ndistributed systems, especially edge systems.<\/li>\n<li>We can take down cloud\/upstream services (including databases) at any time and\nno data is lost. This drastically simplifies operations and maintenance if we\ndon\u2019t need always-on, highly available infrastructure.<\/li>\n<\/ul>\n<h2 id=\"the-old-way\"><a class=\"heading-anchor\" href=\"#the-old-way\" aria-label=\"Permalink to this section\">The old way<\/a><\/h2>\n<p>In the past, SIOT has synchronized cloud and edge instances using a Merkle-style\nhash tree: hash every node, compare hashes up the tree, and push the subtrees\nthat differ. It worked, but there was a lot of overhead in calculating the\nhashes and updating every upstream node every time a point changed.<\/p>\n<h2 id=\"the-new-way\"><a class=\"heading-anchor\" href=\"#the-new-way\" aria-label=\"Permalink to this section\">The new way<\/a><\/h2>\n<p>Since the SIOT store is now on JetStream, we already have history data\navailable. The only tricky parts are:<\/p>\n<ol>\n<li>How do we handle multiple writers (downstream and upstream)?<\/li>\n<li>Where do we draw the stream boundaries?<\/li>\n<\/ol>\n<p>I originally planned one stream per node, but ended up with streams at the\ndevice boundaries, which is simpler and has less overhead.<\/p>\n<p>Because both the downstream and upstream can write data, there needs to be a\nstream for each writer. Sync means each side holds a replica of the other\u2019s\nstream, driven by durable NATS consumers: a push pump copies the device\u2019s stream\nup, a pull pump copies the hub\u2019s configuration stream down. Current state on\neither side is the merge of the two, newest timestamp winning.<\/p>\n<p>Because no instance ever writes remote data into its own streams, points cannot\necho back and forth between instances. There is no loop to suppress, which\nremoves an entire class of sync bug by construction.<\/p>\n<p>A durable consumer remembers its position across disconnects, so a device that\nhas been offline for two weeks reconnects and receives exactly the backlog, in\norder, with original timestamps. No rescan, no comparison, no sync period to\nconfigure. Replication is continuous: a write on one side shows up on the other\nas fast as the connection carries it.<\/p>\n<h2 id=\"siot-drastically-simplifies-stream-based-replication\"><a class=\"heading-anchor\" href=\"#siot-drastically-simplifies-stream-based-replication\" aria-label=\"Permalink to this section\">SIOT drastically simplifies stream-based replication<\/a><\/h2>\n<p>With SIOT, the developer rarely has to be concerned with the low-level stream\ndetails. SIOT handles all of those details under the hood, and all the developer\nneeds to do is create nodes, points, and the clients that respond to and send\npoints. The rest happens automatically.<\/p>\n<p>Distributed systems are hard, especially systems where you can\u2019t assume the\nconnection is solid and all services will be running all the time. With SIOT, a\nlot of this complexity is eliminated. NATS JetStream provides the building\nblocks (streams, durable consumers, etc.), and SIOT manages them in a way that\nis transparent to the developer.<\/p>\n<p>The full design is in the\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/ref\/sync.html\">sync reference<\/a> and\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/adr\/7-jetstream-store.html\">ADR-7<\/a>.<\/p>\n"},{"title":"The store is now a stream","published":"2026-08-13T00:00:00+00:00","updated":"2026-08-13T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/jetstream-store\/"}},"id":"https:\/\/simpleiot.org\/blog\/jetstream-store\/","content":"<p>Simple IoT 0.23 replaces the SQLite store with\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.nats.io\/nats-concepts\/jetstream\">NATS JetStream<\/a>. This is the\nbiggest architectural change in the project\u2019s history, and it is the first of a\nseries of posts on what we\u2019ve been building this year. This one covers the store\nitself; the next covers what it does for synchronization.<\/p>\n<h2 id=\"two-shapes-of-the-same-data\"><a class=\"heading-anchor\" href=\"#two-shapes-of-the-same-data\" aria-label=\"Permalink to this section\">Two shapes of the same data<\/a><\/h2>\n<p>SIOT has always been a NATS application. Every component, whether a Modbus\nclient, a rule, or the UI, communicates by publishing points as messages. The\nstore\u2019s job was to catch those messages and keep them.<\/p>\n<p>For years it did that by translating each point into rows in SQLite (and before\nthat, Bolt and Genji). SQLite served us well, and I would still reach for it in\nplenty of applications. But it meant we maintained two shapes of the same data:\nthe message in flight and the row at rest, with translation code in between, and\na Merkle-style hash tree bolted on top so two instances could figure out how\ntheir rows differed.<\/p>\n<p>The real problem was never the database. It was that we were translating between\ntwo data models when one of them already did everything we needed.<\/p>\n<h2 id=\"points-are-already-messages\"><a class=\"heading-anchor\" href=\"#points-are-already-messages\" aria-label=\"Permalink to this section\">Points are already messages<\/a><\/h2>\n<p>A JetStream stream is an append-only log of messages with sequence numbers and\nper-subject indexing. That shape matches IoT data unusually well:<\/p>\n<ul>\n<li><strong>Persisting a point means capturing it.<\/strong> The same message that moves between\ncomponents lands in a stream. No translation layer, no second data model.<\/li>\n<li><strong>History is the natural byproduct.<\/strong> A stream retains every point written to\na subject, so time-series history lives in the same place as current state.\nThe current value of a point is simply the last message on its subject.<\/li>\n<li><strong>Sequence numbers replace the hash tree.<\/strong> Streams are ordered, so another\ninstance can replicate one and know exactly what it has and has not seen. More\non this in the next post.<\/li>\n<li><strong>It is already there.<\/strong> JetStream runs inside the NATS server every SIOT\ninstance ships, on cloud machines and small edge devices alike. There is no\nseparate database process to install or operate.<\/li>\n<\/ul>\n<p>Reads never touch JetStream directly. The store keeps the merged current state\nin in-memory caches, populated from the subject tips at startup, so queries stay\nfast.<\/p>\n<h2 id=\"retention-that-understands-configuration\"><a class=\"heading-anchor\" href=\"#retention-that-understands-configuration\" aria-label=\"Permalink to this section\">Retention that understands configuration<\/a><\/h2>\n<p>Retention is per subject: each point type on each node keeps its own most recent\n20,000 messages by default. Per-subject limits have a property that time- or\nsize-based retention cannot give you: configuration points, written a handful of\ntimes, are effectively kept forever, while a sensor reporting every minute wraps\nafter about two weeks. Current state is always preserved.<\/p>\n<p>The default works out to about four months of history for 10-minute data,\nbounded on disk even for a device nobody visits. A device with little flash can\nlower it with <code>SIOT_STORE_MAX_MSGS_PER_SUBJECT<\/code>.<\/p>\n<h2 id=\"compression-pays-exactly-where-it-matters\"><a class=\"heading-anchor\" href=\"#compression-pays-exactly-where-it-matters\" aria-label=\"Permalink to this section\">Compression pays exactly where it matters<\/a><\/h2>\n<p>Streams are compressed with S2 by default. Point data compresses unusually well,\nbecause the same type repeats in every message, keys come from a small set, and\ntimestamps march forward. In our testing, a store of 100,000 scraped points went\nfrom 33.4 MB to 11.7 MB. A small store gives up nothing, and compression starts\npaying exactly where disk begins to matter.<\/p>\n<h2 id=\"migrating\"><a class=\"heading-anchor\" href=\"#migrating\" aria-label=\"Permalink to this section\">Migrating<\/a><\/h2>\n<p>Existing SQLite databases migrate with <code>siot export<\/code> on v0.22.0 followed by\n<code>siot import<\/code> on 0.23. The full design analysis is recorded in\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/adr\/7-jetstream-store.html\">ADR-7<\/a>, and the\n<a rel=\"noopener noreferrer external\" target=\"_blank\" href=\"https:\/\/docs.simpleiot.org\/docs\/ref\/store.html\">store reference<\/a> covers\nretention, compression, and durability tuning in detail.<\/p>\n<p>This is the kind of simplification that feels right. Stay tuned for how\nsynchronization works, and how streams simplify so many things.<\/p>\n"},{"title":"Hello","published":"2020-06-23T00:00:00+00:00","updated":"2020-06-23T00:00:00+00:00","author":{"name":"Unknown"},"link":{"@attributes":{"rel":"alternate","type":"text\/html","href":"https:\/\/simpleiot.org\/blog\/hello\/"}},"id":"https:\/\/simpleiot.org\/blog\/hello\/","content":"<p>The Simple IoT project now has a web site. Stay tuned for more updates!<\/p>\n"}]}