Using OpenEMS with Claude

Claude, our AI assistant, can now work with OpenEMS, NFE's SCADA. It can tell you how a site is doing, pull history and energy figures, read component settings, and prepare setting changes. It does this through the "nfe-openems" skill, signed in with your own OpenEMS (Keycloak) login. This page explains what it can do, the one-time setup, and the limits to know about.

What Claude can do in OpenEMS

Two things to know first

1. Changes can't reach the gateways through the Backend yet. Our gateways connect straight to the Backend's Edge Manager. OpenEMS 2026 expects them to come in through its BackendEdge relay, so anything the Backend sends down to a gateway fails. That covers setting changes, channel writes and the live system log, in Claude and in the OpenEMS UI alike. Reading works: status, live values, history, energy, exports and the Backend's copy of each configuration. Until the deployment is fixed, changes are made on the gateway itself (its local UI or REST API over ZeroTier) by the engineer responsible, and recorded here in the Library. When asked for a change, Claude shows the exact plan and says this.

2. Inside OpenEMS, everyone is the same user. You sign in with your own Keycloak account, so access can be given and taken away person by person. But the Backend keeps its gateway list in a simple file (Metadata.File), and every login becomes one built-in user, admin, with full rights on every gateway. OpenEMS therefore can't tell who changed what. Claude keeps a log of every change it makes on your computer (~/.config/nfe-openems/changes.log), and you should post a short note in the site's Element thread or Library page: who, what, why, and before → after.

One-time setup

You need three things:

  1. Claude on your own computer. The skill works in the Claude desktop app (Code tab) or in Claude Code, on macOS, Linux or Windows (with WSL). Your login stays on your computer.
  2. The skill. It's already set up for everyone in our Claude organisation, so there's nothing to install. If it doesn't show up for you, download nfe-openems.skill from the attachments on this page (paperclip icon, top right). Open it and click Save skill, or unzip it into ~/.claude/skills/.
  3. Your own OpenEMS login. It's the one you use at https://openems.nearlyfreeenergy.com. If you don't have one, ask a Keycloak admin to create a user for you in the openems realm. Please don't use the shared admin login for day-to-day work: then nobody can tell who did what.

Then sign in:

  1. In a Claude chat, ask something like "Using OpenEMS, is Sezibwa online?" The first time, Claude creates ~/.config/nfe-openems/credentials.env, with the username and password left blank.
  2. Choose how you want to sign in:
    • Type your password each day (more private). Claude opens a sign-in prompt in its Terminal panel, or asks you to run one in your own terminal. You type your username and password there; Claude never sees them. The sign-in lasts 12 hours.
    • Save your password in the file (more convenient). Open the file (on a Mac: Finder → Go → Go to Folder… → ~/.config/nfe-openems, then open credentials.env with TextEdit). Paste your username after OPENEMS_USERNAME= and your password after OPENEMS_PASSWORD=, with no spaces or quotes, and save. Claude then signs in again by itself when the 12 hours are up.
  3. Tell Claude "done". It confirms who you're signed in as, and until when.

Keeping your login safe

How Claude handles changes

Tips for good results

Troubleshooting

What you see What to do
"not signed in" (exit 2) The 12-hour sign-in ran out and no password is saved. Sign in again in the terminal, or save your password in the file.
"sign-in refused" Wrong username or password, or your Keycloak user is disabled. Try them at https://openems.nearlyfreeenergy.com.
"this Backend cannot pass requests down to its Edges" The known limit described above. Make the change on the gateway itself and record it.
A value shows null The gateway is offline, the value isn't sent to the Backend, or there's no such channel. Ask Claude to find the right channel.
Energy totals come back empty Expected for the _sum and battery counters at our sites. Ask for the energy worked out from power instead.
"no stored history" Nothing was recorded for that gateway or period, for example an old test rig that hasn't connected since.

For admins

Last reviewed: 2 November 2026 by Aaron Tushabe (skill set up for the whole organisation)


Revision #1
Created 2026-11-02 21:09:12 UTC by aaron.tushabe
Updated 2026-11-02 21:09:12 UTC by aaron.tushabe