Repository navigation
Releases
v0.7.0 - close the six gaps FTW's site test patched around (#8)
In this version:
- fix(ocpp): send Basic auth from user:password in the OCPP URL
A Central System that requires OCPP 1.6 security profile 1 (FTW does)
refused the simulated charger: it dialled without credentials, and the
WebSocket dialer rejects user:password inside the URL. Move them to an
Authorization header and keep the password out of the logs.
- fix(ocpp): deliver StartTransaction once the charger is online
A car plugged in before the charger had reached its Central System
started a local session whose StartTransaction was lost: sendRequest
failed and nothing kept the message. Queue StartTransaction and
StopTransaction while there is no connection and send them, in order,
after the next BootNotification is accepted.
- feat(ocpp): profile_delay_s answers Accepted at once and applies later
A cloud charger such as Easee accepts a charging profile at once and
changes its output a minute or two later. The simulated charger applied
every profile at once, so nothing could test how a Central System
copes with that. POST /api/simulators/{id}/config {"profile_delay_s": 60}
now holds accepted SetChargingProfile and ClearChargingProfile changes
for that long, in order. Invalid profiles are still refused at once.
- fix(ocpp): a 1-phase profile loads L1, not a third of each phase
The simulated charger always spread its draw evenly over three phases,
also under a profile with numberPhases 1, so a site meter never saw the
one-phase load a real car puts on L1. A charger that can switch phases
(ConnectorSwitch3to1PhaseSupported) now draws a 1-phase profile on L1
only, at most its rated current per phase, and reports it per phase:
phasePowers and per-phase currents in its state and MeterValues. The
site meter takes a charger's draw per phase instead of through the
site's phase factors.
- fix(sungrow): write register defaults in engineering units
Register defaults are written through each register's scale, but the
Sungrow ones were raw register values: an SH10RT came up rated 100 kW
(5000, 0.1 kW) with 500 kW charge and discharge limits (33046/33047,
0.01 kW). Use 10 kW and 5 kW, in the register set, the global defaults
and the sungrow-hybrid and residential-5kw profiles.
- feat(sungrow): ems_control makes the battery follow the EMS registers
The Sungrow model stored an EMS's writes to 13049-13051 and never
applied them, so an EMS under test commanded a battery that did not
move. With POST /api/simulators/{id}/config {"ems_control": true} the
battery does what a real SH does: in forced mode (13049 = 2) it follows
13050 (170 charge, 187 discharge, 204 stop) and 13051 watts; in any
other mode it runs self-consumption against the site meter. It answers
after ems_response_ms (default 2000), stays within 33046/33047 and the
SoC limits 13057/13058, and writes the power-flow flags (13000) the Lua
driver signs the power by. Off by default: the dashboard sets the
battery by writing the registers directly.
- feat(profiles): each model names its driver and carries its timing
A profile now says which srcfl/device-drivers driver it emulates
(driver_id, the file stem: sungrow, sdm630, pixii, ocpp...) and carries
the model's timing in a model block, so field evidence for a driver can
later set it. command_response_s replaces the two settings this branch
added (ems_response_ms, profile_delay_s): it is how long the device
takes to act on an accepted command, the battery after an EMS write or
the charger after a charging profile. sungrow-hybrid says 2 s; applying
a profile sets it, and POST /api/simulators/{id}/config overrides it.
- fix: zero battery limits, phases in composite schedules, stop ids after a queue
Codex's review of #8:
- A Sungrow limit register holding 0 now allows no power that way; before,
0 turned the clamp off. - GetCompositeSchedule reports the phases the charger draws on: 16 A on one
phase, not 5.3 A on three. A change of phases starts a new period. - A session that starts and ends offline is stopped under the transaction id
the Central System gives its queued start.
-
minor: headless runs from a house spec, with a timeline and a record (#10)
-
fix(ocpp): one heartbeat and meter loop per connection, DropConnection
Each connection to a Central System started another heartbeat, MeterValues
and simulation loop, and nothing ended them but Stop. After one reconnect
a charger sent every heartbeat and MeterValues twice and integrated its
energy twice a second. Heartbeats and MeterValues now end with their
connection; the simulation runs once for the charger's life, connected
or not, since a car charges through a network outage.
Two hooks for scripted runs: DropConnection(d) closes the connection as a
lost network does and keeps the charger away for d, with the session going
on; SetFrameLog reports every OCPP-J frame the charger reads or writes.
- feat(ocpp): the car's own limits (SetCar)
A car takes at most its own current per phase and charges on its own
phases: a one-phase car under a three-phase order draws on L1 only, and a
car that takes 10 A draws 10 A of a 16 A offer. The charger's offer
(effectivePowerW) is unchanged; its draw follows the car.
- feat(run): headless runs from a house spec, with a timeline and a record
simulator run -spec house.json -port-base N -out DIR builds one house:
devices by the device-drivers driver they emulate (a hybrid whose battery
follows its EMS writes, OCPP chargers with their car), the site meter
behind a fuse per phase, and the house load. It serves them on ports from
the base, applies a timeline of events (loads, pv, soc, plug, car,
offline, online, reconnect, mark, stop), and takes the same events over
POST /api/run/event while it runs. It records a sample a second of what
flows through each fuse, the fuse's damage and each device's state to
plant.jsonl, every OCPP frame per charger, ports.json and result.json.
Self-update endpoints are off in a run.
The site loop read Running without the simulator's lock while a stop
wrote it; it now takes the lock.
- fix(run): an outage asked for during a retry keeps its length; "meter" is reserved
Codex's review of #10:
- A reconnect event while the charger was already waiting to retry only
moved a deadline nobody read; the retry dialled after the usual delay.
Each dial now waits out DropConnection's deadline first. - A device called "meter" lost its ports.json entry to the site meter.
The spec now refuses that id.
- test(run): draw port bases below the ephemeral range
freeBase took a base from the kernel's next ephemeral port and skipped
those over 65000. macOS hands ephemeral ports out in turn, so once its
cursor sat near the top every try was skipped and every run test failed
with "no free port range".
- feat(run): the fuse cabinet's air and a warm start
With the thermal fuse on main (#9), a run's spec can set the cabinet's
air (site.fuse_ambient_c, default 25 Β°C) and start the fuses warm
(site.fuse_preheat_a, a current per phase they have carried long enough
to settle), as a house is in the evening. A fuse size the profile does
not model is refused before the run touches the simulator's settings.
The site loop now reads its tick before it starts: a run sets the tick
before it builds its site, and the next run could set it again while the
last loop was still reading it (the race detector caught it once runs
followed each other within milliseconds).
-
minor: faults and seeded random timelines for headless runs (#11)
-
feat(run): faults and seeded random timelines
Faults for an EMS under test, as events in a headless run and over
/api/run/event: a Modbus device that keeps its connections and answers
nothing (silence), a site meter whose readings stand still (meter_late),
one reading whose total disagrees with its phases (meter_glitch), phase
currents that carry a sign (signed_currents), and a charger's own cap
per phase (load_balancer). New model parameters, overridable per device:
startup_delay_s (the car draws that long after an offer rises from zero)
and load_balancer_a for an OCPP charger, signed_phase_currents for a
meter.
A spec's random block draws a timeline from a seed within the house's
bounds (house load per phase under the fuse less 2 A), picks the open
timing of each device, and writes timeline.json, a spec that replays it.
- fix(run): each session waits out the startup delay; faults keep the latest; a late meter keeps its energy
Codex's review of #11:
- offerSince now resets when a connector leaves its session, so every
session waits out startup_delay_s, not only the first. - An earlier silence's or outage's timer no longer ends a later one: each
device counts its faults and a timer acts only for the latest. - Energy that flows during meter_late shows on the counters when the
readings move again; before, it was lost.
- feat(ocpp): a charger wired on one phase
wired_phases: 1 in a run spec (SetWiredPhases) wires a charger on L1. It
gives an order's current there whatever numberPhases says, and max_kw is
its rating as wired, so a 16 A order on a 3.68 kW charger draws 16 A on
L1. Before, the order became 16 A x 3 x 230 W, was capped to 3.68 kW and
spread over three phases, and a one-phase car took 5.3 A of it.
FTW's site test needs it for a charger wired on one phase, under Charge
now and planned charging.
Co-authored-by: Claude Opus 5.5 [email protected]
Co-authored-by: Claude Opus 5.5 [email protected]
Co-authored-by: Claude Opus 5.5 [email protected]
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simu...v0.6.0 - the fuse as a thermal model, within IEC 60269 and following ABB's gG curves, as an importable package (fuse/) (#9)
In this version:
- feat(fuse): the fuse model as an importable package
The IEC 60269 curves and the per-phase damage rule lived in package main,
so FTW's fast closed-loop simulation (go/internal/sitesim) kept its own
port of the gG curve. They move to package fuse at the module root, with
no dependencies: Lookup, All, Profile.TripSeconds and Profile.Step on a
Phase. The site loop now calls it; its JSON and behaviour are unchanged.
- feat(fuse): a thermal model calibrated to IEC 60269 gates
The fuse was a damage counter: 1/t of its life per second above the
rating, recovered linearly over a fixed cooldown. A fuse that had carried
its rating for an hour blew no sooner than a cold one, and 1.13 Γ blew
within the hour where IEC 60269-1 lets a gG carry 1.25 Γ for it.
Now each phase is three thermal bodies in a ladder (element, fuse body
and sand, holder and cabinet) heated by IΒ² and melting at tin's 232 Β°C,
with the ambient as a parameter. Each gG band (16, 20, 25, 32, 35, 40, 50,
63 A) is fitted to IEC 60269-1's gates and pre-arcing IΒ²t at 0.01 s and
keeps the conventional currents; aM to its gates. gM, gR and gS are gG
with scaled times and say they are not calibrated. Steps are exact, so
the result does not depend on the step size. The site keeps each phase's
heat between ticks and clears it with the fuse.
- fix(fuse): follow ABB's gG curves within IEC's tube; explicit ambient; refuse bad input
- The 1.4-2 Γ region, where home overloads land, rested on three free
choices (UMin, the holder's share and time constant) that no source
pinned. All six thermal parameters are now fitted per band to ABB's
pre-arcing curves for OFAF gG size 000 (1SCC317001C0201 p. 14,
digitized from the PDF's vector paths), keeping every IEC 60269-1 gate,
IΒ²t window and conventional current: rms 0.08-0.095 decades, at most
0.17. A temperature-dependent element resistance made the fit worse and
is left out. - Ambient 0 meant unset, so a 0 Β°C cabinet became 25 Β°C. Phase.AmbientC
is now a pointer; nil is the default. - A NaN current, step or ambient, an infinite step, an ambient at the
melting point or a rating without a band left NaN in the state or blew
a fuse that never melts. Step now refuses them, leaves the state and
says why in Status.Invalid; an infinite current blows the fuse. - 10 A has other conventional currents (1.5/1.9 In) than the 16-63 A
band it borrowed. gG now models 16-63 A only; the simulator refuses
other sizes, and a saved 10 A site reports the refusal. - Preheat puts a phase at the steady state of a held current, for
scenarios that start mid-evening. - dt = 0 is documented as a time-to-melt probe; the step-size test checks
the exactness to 1e-9; the Tau wording and the modes are corrected.
- fix(fuse): the whole ABB curve, overflowing currents, a blown fuse stays blown
The re-review of 5710bba (#9):
- F1: the 0.08-0.17 decades held only at the eleven fitted points.
Against all 48 vertices of each ABB curve the model is rms 0.13-0.20
decades off, at most 0.22-0.46: too slow at 1.6-1.95 Γ, too fast at
2.0-2.5 Γ, where the body stage takes over at UMin/β(Re + Rb) =
2.02-2.09 Γ In. That is the three-body ladder's shape; the comment says
so and a test holds every vertex within 0.5 decades. The fit now uses
the curves' exact start points, so 20 A's start no longer falls below
its asymptote. - F2: an infinite current reported an infinite ratio, which JSON cannot
carry, and a current whose square overflows left NaN in the state. Both
now blow the fuse with a finite ratio. - F3: a size is checked with its profile: gG and the profiles scaled from
it at their bands, aM and manual at any size. The dashboard shows a
phase's refusal and keeps a saved size in the size list. - F4: Preheat refuses a blown fuse instead of reviving it.
Co-authored-by: Claude Opus 5.5 [email protected]
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.5.0 - Prepare project for open source release
In this version:
- Add MIT LICENSE and community health files: CONTRIBUTING, SECURITY,
CODE_OF_CONDUCT, issue/PR templates, and THIRD_PARTY_LICENSES attribution - Remove embedded GitHub update token; the desktop updater now uses the
unauthenticated public-release API, so no token ships in release binaries - Replace the Satoshi font (not redistributable) with Manrope (SIL Open
Font License), with the license bundled alongside the font files - Rename the "weed_factory" load scenario to "always_on"
- Update contact domain from srcful.io to sourceful-labs.com
- Add README badges and a manufacturer trademark disclaimer
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.4.20 - Update Ambibox MQTT to hide car-related topics when EV unplugged
In this version:
SessionState is only advertised when EV is connected (PAUSED, STOPPED,
ERROR, CHARGE_LOOP). Car-related MQTT topics (soc, power, current,
sessionState, chargeProtocol) are cleared with empty payloads on unplug
and excluded from periodic publishing. Added error toggle for simulating
charger error state. UI controls are grayed out when unplugged and
state cards hide car-specific info.
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.4.19 - Retain serialNumber on Ambibox MQTT evCharger topic
In this version:
Publish device/evCharger/0/serialNumber with the MQTT retain flag so
new subscribers receive it immediately on connect.
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.4.18 - Use app-icon.png for macOS app icon
In this version:
The build was using the wrong icon (appicon.png). Switch both the
Makefile and CI workflow to use static/app-icon.png instead.
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.4.17 - Update app icon for simulator
In this version:
- Replaced the existing app icon with a new version to enhance visual representation.
- Ensured the new icon is properly integrated into the simulator's static assets.
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.4.16 - Update mDNS advertisement to include local IP address
In this version:
- Modified the Advertise function to accept an IP address parameter, defaulting to "127.0.0.1" if not provided.
- Updated simulator server to use the local IP address during mDNS advertisement for improved device discovery.
- Adjusted related tests to reflect the new IP parameter, ensuring consistent behavior across advertisement scenarios.
- Removed the localIP function as its functionality is now integrated into the Advertise method.
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.4.15 - Update CSS and HTML structure for dashboard components
In this version:
- Refactored CSS styles for site dashboard items to improve layout and alignment.
- Enhanced HTML structure by replacing deprecated elements with updated classes for better semantic clarity.
- Removed unused CSS rules related to dashboard information and load scenarios.
- Improved responsiveness and visual consistency across dashboard components.
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed
v0.4.14 - Update mDNS advertisement handling in simulator
In this version:
- Introduced a new registration mechanism for mDNS advertisements, replacing the previous server-based approach with process management.
- Updated the Advertiser struct to track running mDNS registration processes.
- Enhanced testability by allowing the registration function to be overridden in tests.
- Refactored collision detection and advertisement logic to improve reliability and maintainability.
- Adjusted logging to include IP address information during advertisement.
Downloads
| Platform | File | Requirements |
|---|---|---|
| macOS | device-simulator_darwin_amd64.zip |
macOS 10.15+ |
| Linux | device-simulator_linux_amd64.tar.gz |
GTK3, WebKit2GTK |
| Windows | device-simulator_windows_amd64.zip |
WebView2 |
Installation
macOS
- Unzip and drag
Device Simulator.appto Applications - Double-click to run (app is signed and notarized)
Linux
tar -xzf device-simulator_linux_amd64.tar.gz
sudo apt install libgtk-3-0 libwebkit2gtk-4.0-37 # Debian/Ubuntu
./linux/device-simulator.shWindows
- Unzip and run
Device-Simulator.batordevice-simulator.exe --desktop - WebView2 will auto-install if needed