Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Coordinated with Fredrik

Coordinated with Fredrik artwork

Slaying the Broken Charger Dragon

Feb 28, 202633 minAudio
ShareXLinkedInFacebookWhatsAppEmail

You know the feeling. You’re low on range. The map says there’s a charger around the corner. You pull up - relief. And then… black screen. Or “out of order.” Or worse: it looks fine, but nothing happens. That moment - that tiny spike of anxiety - is the real enemy of EV adoption. In this episode of Coordinated with Fredrik, we go deep into the engineering side of that problem. Not surface-level EV talk. Not market hype. We unpack the actual backend architecture required to build a charging network that doesn’t break - and more importantly, one that scales. This was a special deep dive made for David and the team at Sourceful Energy. The mission: How do you build a truly robust charging network using OCPP - but do it in a modern, open-source, event-driven way that fits a NATS-based architecture? Why OCPP 2.0.1 Is the Only Serious Choice Today We trace the evolution of OCPP from the early SOAP-based days (heavy XML over fragile 2G connections) to the WebSocket revolution of 1.6 - and then to the modern architecture of 2.0.1. Here’s the punchline: * 1.6 works, but it’s messy and vendor-fragmented. * 2.0.1 is structured, hierarchical, and event-driven. * It has native certificate handling. * It supports granular device modeling. * It enables accurate transaction handling. * It’s built for ISO 15118 and plug-and-charge. * And it cleanly prepares you for OCPP 2.1 and bidirectional charging (V2X). If you’re building from scratch in 2026, there’s no serious argument for staying on legacy 1.6 unless hardware forces your hand. The Architecture Question: Don’t Build a CSMS From Scratch The temptation is obvious: “We’re engineers. Let’s build it ourselves.” That’s a trap. Implementing the full OCPP spec - properly - is a multi-year effort. Edge cases, retries, timeouts, certificate handling, WebSocket state management… it’s a black hole. Instead, we explore the open-source landscape: * The old monolithic Java servers. * Client-side firmware stacks. * And finally: a modern, modular TypeScript-based backend designed for 1.6 and 2.0.1 side by side. The key architectural insight: Use a modular OCPP engine as the edge gateway. Inject a custom NATS adapter. Publish clean, validated events into your own internal event-driven system. Let OCPP parsing and compliance live at the edge. Let your business logic live in your own microservices. That separation is everything. NATS + OCPP 2.0.1 = Clean Topic Hierarchies OCPP 2.0.1’s hierarchical device model maps beautifully to NATS subject structures. Instead of a generic firehose of messages, you can structure topics like: ocpp.v2.station-42.evse1.connector.temperature ocpp.v2.station-42.transactionevent ocpp.v2.station-42.status Now your billing service only subscribes to transaction events. Your analytics service subscribes to metering data. Your ops dashboard listens to error codes. Fully decoupled. Clean. Scalable. This is how you avoid turning your backend into a spaghetti monolith. Reliability Is Not a Feature - It’s the Product Up to 25% of public chargers can be non-functional at any given time. That’s not a UX issue. That’s a systemic architectural failure. A huge reason: vague error reporting. If your charger only reports “Other error,” your operations team has no choice but to roll a truck. That’s expensive. And slow. In the episode, we talk about: * Mandating standardized granular error codes. * Using compliance tools to verify hardware implementations. * Making reliability a contractual requirement in procurement. Because here’s the uncomfortable truth: The world’s best backend can’t fix bad firmware. Architecture and hardware procurement strategy must align. The Bigger Play: From Charger to Grid Asset We close the episode with something bigger. OCPP 2.1 introduced proper bidirectional charging (V2X). That means EVs stop being passive loads and start becoming active grid assets. If your backend is: * Event-driven * Granular * Secure * High-throughput You’re not just running a charging network. You’re laying the foundation for a virtual power plant. And that only works if the software pipes are designed correctly from day one. If you’re building infrastructure - not just apps - this episode is for you. This wasn’t about theory. It was about architecture decisions that determine whether your network becomes resilient, scalable, and future-proof - or collapses under its own complexity. Thanks for tuning in to Coordinated with Fredrik. More deep dives coming. This is a public episode. If you would like to discuss this with other subscribers or get access to bonus episodes, visit frahlg.substack.com

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

SPEAKER_01You know that feeling, right? You are driving an EV. You're getting low on range. The map says there's a charger right around the corner. Oh, yeah. You pull up, relief washing over you, and the screen is just black. Or it says out of order. Or, I mean, worse, it looks completely fine. You plug in, and absolutely nothing happens.

SPEAKER_00The dreaded broken charger anxiety. It's honestly the single biggest hurdle to EV adoption right now.

SPEAKER_01Exactly. And for most of us, that is just a momentary annoyance. But for David, who is listening right now over at Sourceful Energy, that is the enemy. That is the engineering dragon that he has to slay.

SPEAKER_00It really is. And it's not just about fixing a broken plug. You know, it's about architecting a back end system that just doesn't break in the first place.

SPEAKER_01Right. So today we are doing a special deep dive tailored specifically for David and his team. We are not just talking about EV charging in some broad general sense. We are looking at the actual back end engineering challenge of building a network that works. It not just works, but scales because scaling is where things usually fall apart. Totally. The mission for this deep dive is highly specific. How does Sourceful Energy build our truly robust charging network by integrating OCPP, the open charge point protocol? But here is the kicker.

SPEAKER_01And this is what makes David's situation so interesting. He wants to move way beyond the basic, messy implementations we see everywhere today.

SPEAKER_00Right. He wants to leverage open source.

SPEAKER_01Exactly. So he's not reinventing the wheel, but he has a very specific architectural constraint. He needs this entire thing to run on a NATS backend and align perfectly with his own internal data model. Which is very smart, but I mean, it's a somewhat complex constraint to have.

SPEAKER_00It completely changes how you look at the available software out there. It's not just plug and play anymore. It's plug and architect.

SPEAKER_01It does. So here is our roadmap for the next hour or so. We are going to start with the history of OCPP to understand why the protocol is the way it is. Because let's be honest, you really can't hack the future if you don't understand the legacy code of the past.

SPEAKER_00No, you definitely cannot. Then we're going to look at the massive battle between the old standard OTPP 1.6

SPEAKER_01and the new contender 2.0.1. And why that choice effectively dictates your entire firmware strategy and your data fidelity. After that, we're going to survey the open source landscape. We've got the old Gar like Steve versus the new players like Citrine US. And finally, we are going to get deep into the weeds of the solution, a technical breakdown of Citrine US, how its modular architecture works, and exactly how David can inject that NATS adapter to make it fit Sourceful's vision. We are going to get into dependency injection,

message bus topology, error handling.

SPEAKER_00It's going to be a technical ride. But, you know, if you're actually building a network, this is the exact stuff that matters.

SPEAKER_01So let's dive in. To understand where we're going, we really have to look back at the Wild West of EV charging. Take us back to 2009. What did the world actually look like? Because I imagine it wasn't just plug it in and go.

SPEAKER_002009 was, well, it was chaotic. You had the very first Nissan lease appearing, maybe a few Tesla Roadsters kicking around. But from an engineering standpoint, if you were a charge point operator or a CPO, you were in a massive bind.

SPEAKER_01Because everything was proprietary.

SPEAKER_00Completely locked down. If you bought a charger from Vendor A, you had to use Vendor A's backend software. You were buying a bundle. There was no mixing and matching whatsoever. Yeah. So if Vendore went out of business or honestly, if their software was just terrible, you were stuck with a parking lot full of very expensive bricks.

SPEAKER_01That sounds like an absolute nightmare for scalability. You couldn't bid out hardware because you were essentially married to the software. It's like buying a laptop but being told you can only use the manufacturer's specific web browser.

SPEAKER_00That is exactly what it was like. And this is where the Dutch come in.

SPEAKER_01Yeah.

SPEAKER_00So basically, a group called Elad and El, which was formed by the Dutch distribution system operators. They had this massive goal to roll out thousands of public chargers across the Netherlands, but they flat out refused to be locked into a single vendor. Very smart. They wanted interoperability. They wanted to buy hardware from Siemens, ABB, or whoever gave them the best price and run it all on one central system that they controlled.

SPEAKER_01So they needed a common language, a universal protocol.

SPEAKER_00Precisely. And that language became the Open Charge Point Protocol, or OCPP. They released versions 1.0 and 1.2 around 2010.

SPEAKER_01Now, for the backend engineers listening, let's talk about the actual tech stack back then, because 2010 feels like an absolute lifetime ago in software years. We certainly weren't using WebSockets and efficient binaries.

SPEAKER_00No, no, not at all. The early versions all the way up through OCPP 1.5 in 2012 were based entirely on SOAP.

SPEAKER_01SOAP, Simple Object Access Protocol.

SPEAKER_00Yes. Which, as literally any engineer knows, is rarely simple.

SPEAKER_01It's all heavy XML envelopes, right?

SPEAKER_00Exactly. Imagine you want to send a tiny message saying, I am alive or status okay. In a modern protocol, that might be a few bytes of data. In SOP, you're wrapping that tiny message in a massive XML envelope with headers, bodies, namespaces, schema definitions. It was designed like enterprise banking software from the late 90s.

SPEAKER_01But why does that matter for a charger? I mean, banking software works fine.

SPEAKER_00It matters heavily because of the network. Back in 2010, these chargers were sitting in random parking lots connecting via 2G or maybe early 3G cellular modems. Bandwidth was incredibly expensive and highly unreliable. You were burning through kilobytes of data just to say hello. On a fleet of thousands of chargers, that data cost absolutely destroys your margins.

SPEAKER_01And isn't SOAP usually stateless? Like it doesn't hold a connection open?

SPEAKER_00That was the other killer. It relied entirely on polling. The charger wasn't always on in the sense of a persistent connection. The cloud backend often couldn't just reach out and touch the charger when it wanted to.

SPEAKER_01So you had to wait for the charger to check in.

SPEAKER_00Right. You had to wait. The charger wakes up and asks, do you have a command for me? And the server says, no. Five minutes later, do you have a command for me? No.

SPEAKER_01That is the ultimate are we there yet architecture.

SPEAKER_00It really is. It floods the cellular network with useless traffic. Plus, from a strict security standpoint, if you wanted the server to actually push a command in real time, you often had to open inbound ports on the charger's cellular modem.

SPEAKER_01Which is a huge security nightmare. You never want to open inbound ports on an IoT device sitting in a public parking lot.

SPEAKER_00Exactly. Someone scan the network is going to find that open port eventually. So while 1.5 technically worked, it was heavy, it was expensive, and it was clunky, the real revolution happened in 2015 with OCPP 1.6.

SPEAKER_01Ah, the famous 1.6. This is the version that basically refused to die.

SPEAKER_00It is the Windows XP of charging protocols. It is everywhere. And the reason it succeeded wasn't just the new features, it was the transport layer. They introduced OCPPJ, that's JSON, over WebSockets.

SPEAKER_01Okay, let's unpack why that matters. Why was switching to WebSockets such a massive deal for the industry?

SPEAKER_00So it's a pipe that just stays open. Correct. The server can push a command like start charging or reboot instantly. No polling. No, are we there yet? It just works.

SPEAKER_00That is why 1.6 became the de facto standard across the globe. It reduced data costs and improved responsiveness dramatically.

SPEAKER_01And to keep this from becoming a proprietary mess again, they formed the Open Charge Alliance or OCA, right?

SPEAKER_00Correct. That happened in 2014. They took official stewardship of the protocol to ensure it remained patent free and vendor neutral.

SPEAKER_01Okay, so 1.6 J is the dominant force. It's what most charges run today. But David at Sourceful Energy isn't looking to build a network for 2015. He is building for 2026 and beyond. And the word on the street is that 1.6 is, well, it's showing its age.

SPEAKER_00Showing its age is a very polite way to put it. For a modern back-end engineer like David, 1.6 is a massive headache.

SPEAKER_01But hold on. If it works, why fix it? If 1.6 is the global standard, isn't there a huge risk in moving away from it? You might cut yourself off from hardware availability.

SPEAKER_00That is the classic dilemma. But the problem with 1.6 is that it's almost too flexible. It's messy. Let's look at the integration problem. 1.6 was written when Jason was the new cool kid, and the specification itself was a bit loose. It allowed for a lot of custom data transfer messages.

SPEAKER_01Data transfer? That sounds like a giant catch-all bucket.

SPEAKER_00It is exactly a catch-all. Vendors started creating their own proprietary extensions disguised as standard OCPP. Let's say you want to see the temperature of the actual charging cable. 1.6 doesn't have a standard field for that.

SPEAKER_01Oh, I see.

SPEAKER_00Right. So vendor A creates a data transfer message and calls it vendor temp. Vendor B creates one and calls it vendor B cable heat.

SPEAKER_01So we are right back to the vendor lock-in problem. If David writes his back end to listen specifically for vendor attempt, and then he goes and buys a bunch of vendor B chargers, his whole system breaks.

SPEAKER_00Exactly. You end up writing these massive spaghetti code adapters for every single hardware manufacturer. It's not scalable. It becomes a maintenance nightmare.

SPEAKER_01And I assume security was an issue with 1.6, too.

SPEAKER_00Huge issue. 1.6 didn't have robust security baked in initially. It was added much later as a retrofit. They call them the security white papers. It works technically, but it feels bolted on. It's not native to the core message structure.

SPEAKER_01Enter the challenger, OCPP 2.0.1. The modern standard. So David is looking at this architecture. Why should he commit to 2.0.1? What is the killer feature that actually makes the migration worth the pain of adopting a newer standard?

SPEAKER_00There are three killer features, actually. The device model, transaction handling, and security. And for David, specifically regarding his NATS integration requirement, the device model is the absolute game changer.

SPEAKER_01Let's start right there. In 1.6, the charger is essentially just a flat list of keys and values.

SPEAKER_00Right. It's a completely flat structure, just a key like heartbeat interval and a value of 60.

SPEAKER_01But in 2.0.1, I keep hearing about this hierarchical device model. Walk us through that. How is it different? Think of it like a file system or a modern object-oriented code structure.

SPEAKER_00You have the charging station as the root object. Inside that, you have EVSEs. That stands for electric vehicle supply equipment, basically the physical charging port. And inside the EVSE, you have the connector.

SPEAKER_01Okay, so it nests.

SPEAKER_00Yes, but it goes much deeper. You have controllers, fans, sensors, network interfaces, all nested logically.

SPEAKER_01Why does that hierarchy matter to a back-end or firmware engineer?

SPEAKER_00Granularity. In 1.6, if you got a temperature alert, you often didn't know what was actually hot. Was it CPU, the power module, the gun itself? In 2.0.1, the variable is perfectly scoped. You query charging station controller CPU temperature, or you query EVSE connector temperature.

SPEAKER_01Okay, I see exactly where this is going. If David is building a NATS backend, this structure seems like it would map perfectly to a topic hierarchy in a message bus.

SPEAKER_00Exactly. And this is the first big aha moment for the sourceful architecture. If you're using NATS, you don't just want one big firehose subject called op logs, you want a taxonomy. With 2.0.1, David can structure his NATS subjects to perfectly mirror the device model.

SPEAKER_01So something like sourceful.v2.stationid.component.variable.

SPEAKER_00Precisely. Imagine a NAT subject like s.station-42.esss1.connector.temperature.

SPEAKER_01That is incredibly powerful because then using NAT's wildcards, you can subscribe to very specific cross sections of your fleet.

SPEAKER_00Right. If the operations team wants to see a heat map of all connectors on the entire East Coast, they don't need to run a massive SQL query against a centralized database. They just spin up a microservice that subscribes to ist-east.connector.temperature. The NATS message bus does all the filtering for them. You simply cannot do that cleanly with 1.6 because the data isn't structured that way at the source.

SPEAKER_01That ties perfectly back to our broken charger hook from the beginning. If you can see a specific fan failing before the whole power module overheats, you can fix it before a user pulls up and gets stranded. Predictive maintenance becomes a reality because you aren't just getting a generic

SPEAKER_00fault code, you are getting fan speed low on a specific addressable component.

SPEAKER_01Killer feature number two, transactions. I have heard this is where the money is literally lost or found in this industry.

SPEAKER_00It is. In 1.6, a transaction was super simple. You start transaction and stop transaction. But in the real world, charging an EV is messy. What if the cable is plugged in, but the user hasn't swiped their RFID card or opened the app yet? Is that a transaction?

SPEAKER_01I have seen this happen. You plug in, the car literally locks the cable into the port, but no power flows. Then you stand there fiddling with the app for five minutes trying to get a signal.

SPEAKER_00Right. In 1.6, that state is totally ambiguous. Did the transaction start when the cable locked? When do you actually start billing the customer? 2.0.1 completely replaces that old model with transaction event. It becomes entirely event driven.

SPEAKER_01How does that work in practice?

SPEAKER_00You get a chronological series of events. First, a transaction event comes in with a trigger reason of cable plugged in. The status is clearly marked as idle. Then, a minute later, you get another transaction event with a trigger reason of authorized. The status shifts to charging. So you can definitively distinguish between I plugged my car in and I actually paid

SPEAKER_01and electricity is actively flowing.

SPEAKER_00Yes. That eliminates all those billing logic nightmares where a user gets charged for just plugging in without receiving any power. For sourceful energy, this means highly accurate billing and drastically fewer angry customer support tickets.

SPEAKER_01And finally, security and ISO 15118.

SPEAKER_00This is the big future-proofing piece. 2.0.1 was billed from the ground up with ISO 150118 in mind. That is the plug-and-charge standard. It has native support for managing certificates.

SPEAKER_01Plug-and-charge is the ultimate dream, right? You pull up, plug in... The car talks to the charger, handles the crypto, authenticates your account, and it just works. No apps, no swiping credit cards.

SPEAKER_00Exactly.

SPEAKER_01But doing that requires a lot of public key infrastructure, or PKI.

SPEAKER_00It does. You are dealing with root certificates, leaf certificates, V2G certificates. OCPP 1.6 heavily struggles with this. It requires injecting custom messages to push those certificates around. 2.0.1 has native messages specifically designed to install, update, and delete these certificates securely over the air. It also natively supports secure firmware updates. Meaning you can cryptographically sign the firmware file so the physical charger

SPEAKER_01verifies it before installing.

SPEAKER_00Exactly. So you can't get hacked by a man in the middle attack pushing a malicious update that turns your expensive charger into a Bitcoin miner, which is a real threat. And I noticed in the research that OCPP 2.1 was just officially released in January 2025.

SPEAKER_01Does that make 2.0.1 obsolete already? Because David does not want to build on a deprecated standard.

SPEAKER_00No. And that is a very important point to clarify. OCPB 2.1 is fully backward compatible with 2.0.1 application logic. It mostly just adds bidirectional charging V2X, which we will talk about later. But if David builds for 2.0.1 today, he is completely ready for 2.1 tomorrow. The underlying foundation is exactly the same.

SPEAKER_01Okay, so the verdict is clear. If you are building a new network today from scratch, you go 2.0.1. It handles data better, money better, and security better.

SPEAKER_00Absolutely. No question.

SPEAKER_01But now comes the actual build question. David needs a back end. He could sit down and write the whole thing from scratch.

SPEAKER_00Which would be a mistake. A massive, expensive mistake.

SPEAKER_01Why? I mean, Sourceful is an engineering company. They have great developers. Why not own the code end to end?

SPEAKER_00Because implementing the full OCPP specification is a monumental task. It is thousands of pages of edge cases, retry logic, timeout handling, and complex security handshakes. It literally takes years to get right. If you build it yourself, you will spend all your engineering hours debugging WebSocket handshakes and zero time building the actual product features that make Sourceful special.

SPEAKER_01So we look at the open source ecosystem instead. Buy versus build essentially becomes adopt versus build. And we have a few main contenders here. Let's talk about the old guard first. Steve.

SPEAKER_00Ah, Steve. It actually stands for Stekdosenverwaltum, which is German for socket administration.

SPEAKER_01Sure in engineering, usually a pretty good sign.

SPEAKER_00It is. It's written in Java. It's been around since 2013. It is incredibly mature and very stable. If you just want to run a basic OCPP 1.6 network and not touch the code too much, Steve is great. It has a UI. It has a database. It just works out of the box.

SPEAKER_01I sense a pretty big butt coming.

SPEAKER_00But it is a monolith. It is an older tech stack. It handles the WebSocket connection, the business logic, the database interactions, and the UI all in one giant heavy application. It is incredibly hard to rip apart and integrate into a modern microservices architecture like the ones Sourceful is trying to build.

SPEAKER_01And David Strictly wants Nats, trying to retrofit a massive legacy Java monolith to speak natively to a Nats event bus.

SPEAKER_00It's painful. Very painful. And Steve's support for 2.0.1 is not its primary focus right now. It is really a 1.6 champion.

SPEAKER_01Okay, so Steve is out for this specific mission. Then we have something called Everest. I see this name popping up constantly in the LF energy spaces. Everest is fantastic, but we have to be very clear on what it actually is.

SPEAKER_00Everest is mostly a client-side library. It is written in C++A. It is designed to run inside the physical charger itself, not in the cloud backend.

SPEAKER_01Ah, so Everest is the firmware. It's the brain of the hardware, not the management system.

SPEAKER_00Exactly. However, for David, Everest is still a critical tool in his arsenal.

SPEAKER_01Why is that?

SPEAKER_00Testing. You can run Everest on a standard laptop or a server, and it acts exactly like a virtual charger. So while David's team is building his backend, he can spin up 100 instances of Everest in a Docker container to hammer his system with realistic traffic without needing to buy 100 physical charging stations.

SPEAKER_01That is huge. Virtualizing the hardware layer for stress testing.

SPEAKER_00It's essential. If you aren't simulating thousands of chargers connecting simultaneously, you simply aren't testing real-world scalability.

SPEAKER_01Okay, so Steve is the old server, Everest is the client. That brings us to the modern contender, Citrini OS.

SPEAKER_00Citrini OS. This is the one that really ticks all the boxes for Sourceful Energy.

SPEAKER_01Let's look at its pedigree. It is a Linux Foundation energy project, right?

SPEAKER_00Yes, LF Energy. That means it has real governance. It is not just one guy in a basement pushing commits. It was originally authored by a company called S44, but now it is fully community-driven and enterprise-backed.

SPEAKER_01And what about the tech stack?

SPEAKER_00TypeScript and Node.js.

SPEAKER_01Which is pretty standard for modern web backends today, way easier to hire for than C++ or legacy Java.

SPEAKER_00Exactly. It's approachable. It's fast. And unlike Steve, it was designed specifically for this messy transition period from 1.6 to 2.0.1. It handles both protocols natively. But the real reason we are highlighting Citrine OS for David is the internal architecture. In the intro, we explicitly mentioned David needs to integrate with a NATS backend.

SPEAKER_01How does Citrine OS actually handle data flow?

SPEAKER_00This is where we get highly technical. CitrineOS is not a monolith. It relies on a very modern modular architecture based on dependency injection.

SPEAKER_01Okay, hold on. You make it sound incredibly easy, just write an adapter. But anyone who has touched an open source project knows that modular usually just means spaghetti codes separated into different folders. How decoupled is CitrineOS really?

SPEAKER_00That is a very fair skepticism. But look at the actual code base. So TriniOS completely separates the web socket handling, the raw socket part that talks to the chargers, from the message routing and business logic. There's an abstract interface, let's call it iMessage Sender, or the generic broker interface. The core logic just calls publish. It literally doesn't know or care if that publish command is going to RabbitMQ, Kafka, or just a simple console log.

SPEAKER_01So the core application logic is totally blind to the transport layer.

SPEAKER_00Exactly. Out of the box, Citrine US officially supports RabbitMQ, Kafka, and Google PubSub. But because it follows this strict interface pattern, for David, writing an ads adapter isn't hacking the core engine. It's simply creating a new class that satisfies that standard interface and then injecting it at startup.

SPEAKER_01Okay, that is different. That is actual rigorous architectural hygiene. So David just writes in Nat's broker class, implements the publish and subscribe methods, and tells the Citrine config file to use that.

SPEAKER_00Precisely. And this is where the strategy gets incredibly interesting. Citrine OS effectively becomes the edge gateway. It sanitizes the messy, chaotic world of chargers, handling the raw JSON parsing, the schema validation, the complex security handshakes, and then it publishes clean, validated, standardized events directly onto the NATS bus.

SPEAKER_01So let's visualize the actual data flow here. A physical charger connects to Citrine OS over web sockets. Citrine OS validates the incoming JSON message. Then what?

SPEAKER_00Then Citrine US publishes it to NATS. And this brings us right back to that 2.0.1 hierarchy we talked about earlier. David should ensure he structures his NAT subjects to perfectly mirror the 2.0.1 data model.

SPEAKER_01So the NAT subject isn't just new message. It is ocp.v2.uswest-station-01.esedge1.status.

SPEAKER_00Exactly. And because NATS is incredibly fast and natively supports subject wildcarding, David's internal sourceful microservices can subscribe to exactly what they need and nothing else.

SPEAKER_01Give me a concrete example of an internal service doing that.

SPEAKER_00Let's say you have a dedicated billing service. It doesn't care about CPU temperature or fans bees. It only cares about financial transactions. So that service subscribes to OCPP.v2.transactionevent. It completely ignores all the telemetry noise.

SPEAKER_01And simultaneously you have an analytics service doing the opposite. Right. The analytics service subscribes to ocpp.v2.metervalues or status notification.

SPEAKER_00Gets all the telemetry. The two services are completely decoupled. They don't even know the other exists. They just listen to the central bus.

SPEAKER_01That is elegant. It turns the classic monolith problem into a true event-driven microservices stream.

SPEAKER_00It is the textbook definition of a robust, scalable architecture. And since NATS handles insanely high throughput with very low latency, you can process thousands of concurrent messages per second without Citrinios breaking a sweat.

SPEAKER_01Now, there is another layer to this constraint, data persistence. We mentioned in the outline that David really wants to align all this data with Sourceful's internal data models. He doesn't want his database schema to be rigidly dictated by whatever the OCPP spec version happens to be.

SPEAKER_00which is a very common trap in this industry. Many older CSMS platforms, charging station management systems, store the data in their SQL tables exactly as the protocol defines it. So if OCPT 1.6 calls a specific field charge pointed and then 2.0.1 decides to rename it to StationEd, you literally end up having to build two different database tables.

SPEAKER_01Or you end up with one massive bloated table with 50 columns, half of which are just null because they only apply to the other protocol version.

SPEAKER_00It is a DBA's nightmare. And every single time the protocol updates, like this new 2.1 release, you have to run complex database migrations that risk taking down your whole system.

SPEAKER_01So how does Citrine OS handle this schema problem?

SPEAKER_00The Citrine OS team, specifically in their technical steering committee updates from around August 2025, discuss this exact issue at length. They are actively moving towards what they call generic data objects.

SPEAKER_01What does that actually mean in practice for a developer?

SPEAKER_00It means the persistence layer. The database module stores a normalized generic concept of a charger or a transaction. it takes the incoming payload and maps the highly specific protocol-dependent fields into this generic internal model before it ever touches the database.

SPEAKER_01So the database is completely agnostic to the protocol version.

SPEAKER_00Correct. The database itself doesn't know if the original message came from a 10-year-old 1.6 charger or a brand-new 2.0.1 charger. It just knows Station 5 reported a status. This aligns perfectly with Sourceful's goal. David can take those Citrine generic objects and map them effortlessly to his own internal data warehouse schemas.

SPEAKER_01So if OCPP 2.2 comes out next year, he just updates the mapping layer in the TypeScript code, but his core database schema stays exactly the same.

SPEAKER_00Exactly. He doesn't have to rewrite his data warehouse, his reporting tools, or his billing pipelines. This sounds like Citrine OS was built by people who have actually run massive

SPEAKER_01charging networks and felt the real pain of doing it the old way.

SPEAKER_00That is exactly S44's background. They built massive custom backends for major commercial networks for years before finally open sourcing this foundational layer. They know exactly where the bodies are buried.

SPEAKER_01Let's talk about extensibility. Because no network is just plain vanilla OCPP. Suppose Sourceful wants to add a custom feature that isn't anywhere in the spec. Maybe a custom loyalty program integration where plugging in the car immediately triggers a push notification to the driver's phone with a coffee coupon.

SPEAKER_00Ideally, you really don't want to fork the main code base to do that. Once you hard fork an open source project, you own all the technical debt and you completely lose the ability to easily pull down upstream bug fixes or security patches.

SPEAKER_01So how does Citrine handle custom business logic without forking? It uses TypeScript decorators, things like at-ass handler or at-ass message endpoint. Translate that for the non-coders listening. Think of a decorator as a little sticky note you put directly on a function that

SPEAKER_00says, hey, whenever a message of exactly type X comes in from the network, route it here to my custom code. It makes it incredibly easy to add new modules. You can write a standalone loyalty module, slap a decorator on it, and the internal message routing within Citrine will automatically push the relevant events to your new code. So you can seamlessly extend the platform's functionality without creating this

SPEAKER_01Frankenstein code base that you can never update again.

SPEAKER_00Exactly. You keep the core clean and your custom logic lives in its own contained space. OK, so we have the modern protocol 2.0.1 and the engine Citrini OS paired with Nats.

SPEAKER_01Now let's talk about the real world result of all this. Reliability. We started this entire deep dive talking about the broken charger epidemic.

SPEAKER_00Right. Let's hit the actual stats on that. Recent studies show that up to 25 percent of public chargers in the U.S. are non-functional at any given time.

SPEAKER_01That is completely unacceptable. Imagine if 25% of gas pumps just didn't work. There would be actual riots.

SPEAKER_00The industry refers to it as a black hole of data, the availability gap. And a massive portion of it stems from the fact that traditional chargers just spit out a log that says... Other error.

SPEAKER_01Other error. Those are arguably the two most frustrating words in all of engineering.

SPEAKER_00It is entirely useless.

SPEAKER_01Yeah.

SPEAKER_00Did the physical cable snap? Did the internal software crash? Is the ground fault interrupter tripped inside the cabinet? You have no idea. So you are forced to roll a truck.

SPEAKER_01And truck rolls are incredibly expensive. You are paying for a specialized van, a trained technician, gas, and the massive opportunity cost of them driving out there just to find out it was a software glitch.

SPEAKER_00Exactly. So how does 2.0.1 and this modern granular stack fix that? It starts with much better error codes. There is an industry initiative called the ChargeX Consortium. It's a group of national labs and major industry players. They developed what are called MRECs, Minimum Required Error Codes. What makes these MRECs different from the standard generic errors we've had? They are highly standardized and extremely specific. Instead of a generic error, the charger must send connector lock failure. Instead of a vague fault, you get high temperature or ground failure.

SPEAKER_01Okay, so practically speaking, if David implements this standard, his operations dashboard doesn't just show a vague red dot on a map. It shows a red dot with a clear label, connector lock jammed.

SPEAKER_00And that completely changes the operational response. If the error is lock jammed, you send a mechanic with a screwdriver to physically fix the latch. If the error is input voltage low, you don't send anyone. You call the local utility company because the grid itself is sagging. If it's software error, you just reboot it remotely via your NATS bus.

SPEAKER_01You stop rolling expensive trucks for basic software glitches. That is exactly how you move from 75% uptime to 99% uptime. Exactly.

SPEAKER_00But here is the massive catch for David. The software backend can support it all day long, but the physical hardware has to actually send it.

SPEAKER_01Right. If the charger firmware just sends other error for literally everything, Citrine OS can't magically invent the missing data.

SPEAKER_00So the critical action item for David and Sourceful Energy is this. Don't just focus on installing the software backend. You have to aggressively mandate these codes from your hardware partners. Sourceful needs to put it explicitly in their procurement contracts. Your chargers must report ChargeX MRECs using the vendor error code field if you are on 1.6 or the tech code field in 2.0.1 or we will not buy them.

SPEAKER_01That is a very powerful takeaway. The software architecture actively drives the physical hardware procurement strategy.

SPEAKER_00100%. If the hardware doesn't send the granular data, the world's best backend can't visualize it.

SPEAKER_01We also mentioned testing briefly in the outline. The concept of don't guess, verify.

SPEAKER_00This is critical. You absolutely cannot trust that a hardware vendor has implemented the complex OCPP protocol correctly. Everyone interprets the written specifications slightly differently.

SPEAKER_01The famous dialects of OCPP.

SPEAKER_00Right. Ideally, there shouldn't be dialects in a standard protocol, but in reality, there are. David needs to mandate the use of the OCTT. That is the OCA compliance test tool.

SPEAKER_01And how does Citrinios fare with that tool? CitrineOS already passes the core and advanced security profiles in the OCTT.

SPEAKER_00That gives David an incredible baseline to work from. If a new charger fails to talk to his CitrineOS gateway and CitrineOS is already officially certified, then he knows the problem is highly likely on the charger's firmware side. It gives him immediate leverage with his hardware vendors. Instead of his team wasting weeks chasing ghosts in their own Node.js code,

SPEAKER_01he can point directly to the certification and say, no, fix your firmware.

SPEAKER_00Exactly. It saves countless engineering hours. Well, this has been a massive, incredibly detailed download of information. Let's try to summarize the master strategy for David and Sourceful Energy. We have covered the history, the protocols, the deep architecture, and the reliability metrics. Sure. I think it effectively comes down to four core pillars.

SPEAKER_01Let's lay them out. Pillar one.

SPEAKER_00The protocol. Adopt OCPP 2.0.1 immediately. Do not be afraid of the migration. It gives you the hierarchical device model for granular monitoring, which directly supports your required NATS topics. It gives you event-driven transactions for totally accurate billing and robust natively built security with certificates.

SPEAKER_01Pillar two.

SPEAKER_00The Engine. Use Citrine EOS. It is open source, it is modern TypeScript, and it is highly modular. Do not attempt to build a CMS entirely from scratch. It is a massive black hole of developer time.

SPEAKER_01Pillar 3.

SPEAKER_00The Integration. Build a custom NATS adapter for Citrine EOS. Implement that standard broker interface. Use a highly structured topic hierarchy like ocpp.v2.station.component so you can fully leverage NAS wildcarding for your microservices and do not tight couple your database schema to the protocol. Leverage those generic data objects.

SPEAKER_01And finally, pillar four.

SPEAKER_00The reliability. Contractually mandate MREC error codes from every single hardware vendor you buy from and use the OCTT to actively verify their compliance. Turn that black hole of data into actionable operational insights to drastically reduce your truck rolls. That sounds like an incredibly solid roadmap for building a network that doesn't

SPEAKER_01just work, but completely dominates the market.

SPEAKER_00It is the roadmap for a true professional utility grade network.

SPEAKER_01Before we wrap up, I want to leave the listener and specifically David with one final somewhat provocative thought. We touched on it just briefly earlier, but it is the ultimate what's next question for this industry.

SPEAKER_00The grid asset question.

SPEAKER_01Right. OCPP 2.1 was released officially just a month ago in January 2025, and it introduces full support for bidirectional charging V2X.

SPEAKER_00This completely changes the entire paradigm. Until now, a charger was basically just a load on the grid. It drew power and that was it. With V2X, the car's massive battery becomes an active asset for the grid itself. So if Sourceful heavily invests in building this robust Nats and Citrine back end right now. They're physically laying the digital pipes for bidirectional energy trading. If your back-end architecture can handle the granular high-speed device data of 2.0.1, and if your message bus is fast enough,

SPEAKER_00which Nats absolutely is, you aren't really just running a charging network anymore. You are essentially running a virtual power plant.

SPEAKER_01That is the future. The EV literally pays for its own parking spot by balancing the local grid during peak hours. And that future is only possible if you get the software foundation perfectly right today.

SPEAKER_00If you are stuck on legacy pulling loops and heavy SOP XML, you simply cannot participate in that high-speed energy market.

SPEAKER_01David, good luck with the build.

SPEAKER_00Yeah. You have got the tools, you have the architecture, and you have the strategy.

SPEAKER_01Now go make it happen.

SPEAKER_00Really cannot wait to see it go live.

SPEAKER_01Thanks for listening to this deep dive into the architecture. We will catch you on the next one.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Counting Years

    Nov 22, 202642 minAudio

    Coordinated with Fredrik, Episode 127. Forty-two minutes on how a company gets its price: what a multiple counts, why the same krona can be worth seven years in one company and twenty-seven in another, how a rise in...

    Credit the people on this episode

  2. Shoulder Check

    Oct 31, 202650 minAudio

    Fifty minutes on two runs a day apart: the rest of Vancouver, and the road from ten Helium gateways to physics first. An interview with Lily. On Thursday I answered her questions in English; on Friday I went back to...

    Credit the people on this episode

  3. We Live Where We Are

    Oct 27, 202637 minAudio

    Thirty-seven minutes on two runs a day apart: the two years after the money came in, and home. An interview with Lily. I answered her questions in Swedish while running; the English voice you hear is my cloned voice...

    Credit the people on this episode

  4. Momentum

    Oct 24, 202639 minAudio

    Thirty-nine minutes on the two years before a term sheet arrived on my birthday, and what it took to turn it into money. An interview with Lily. I answered her questions in Swedish on a fifteen-kilometre run; the...

    Credit the people on this episode

  5. EP123: The Drive. Somebody Has to Say Yes

    Oct 15, 202634 minAudio

    This episode started in a car. A clear October day, low sun, the drive from Kalmar to Stockholm. I could have flown, and it would have been faster. But the hours in the car are a different kind of time. The car keeps...

    Credit the people on this episode