EnergyNet Protocol Questions
The process of writing software tends to reveal any holes in your understanding of the thing you’re implementing. Building KENETH certainly revealed to me some places I didn’t understand EnergyNet. A number of these were purely my own fault, and were resolved by reading the spec more carefully, or understanding the underlying CBOR format better. But some of them I don’t seem to be able to answer on my own, so I thought I’d post them here. My hope is that I can clarify them for myself, and also in a more public manner for anyone who might come after me. ...
EnergyNet Message Decoder
I just posted a new KENETH-based tool for EnergyNet - a message encoder & decoder. This kind of tool can be pretty handy when working with binary protocols like EN. This tool is based on the CBOR.me diagnostic tool, which I used when setting up the serialization code for KENETH. The exact formatting of the tool is a bit idiosyncratic. I wanted to just handle EN messages, as that’s the more interesting part to look at. However, the message type is not encoded in the message itself, it’s part of the EN frame. So it’s not possible to look at the binary for an EN message and decode it. Well, it may be possible, but it’s certainly not easy, nor normal for EN parsing, so I didn’t deal with it here. ...
KENETH Web Demo
So far I’ve been developing KENETH purely with unit tests. Unit tests can get you a long way, and are essential in many ways, but a demo has a visceral appeal when you can make one. Fortuitously, Kotlin makes it easy to publish the same code to multiple platforms, including the browser. So I present the first proof-of-concept demo of KENETH running in your own browser. Obviously this is purely a software demo - it’s just two fake KENETH nodes talking to each other. The network is simulated with in-memory queues, and the power transfer is not even simulated that much - it’s just pure fiction. Still, this exercises all of the message-passing, serialization, and framing logic in a way that’s easier to understand than a unit test. In fact, it already helped point out a couple of bugs in my implementation! Which is not to say that this is all working perfectly. I’m sure there are logic bugs, and I’m pretty sure I haven’t implemented the EnergyNet spec properly. ...
Hello KENETH
Hello world! The immediate purpose of this blog is to support and talk about my side project, KENETH. So let’s get right to it! What’s The Frequency KENETH? KENETH is an open-source implementation of the EnergyNet Protocol - hence the name, which is short for “Kotlin EnergyNET Hub”. That begs the question, what the heck is EnergyNet? My quick, unofficial summary is that it’s an attempt to make electric power distribution work more like data networking. So instead of a top-down grid where power flows from giant generators down to consumers, and money flows the opposite direction, it’s a vision for a decentralized, peer-to-peer “energy mesh.” The goals and benefits of this include: ...