logo elektroda
logo elektroda
X
logo elektroda

OpenBeken IoT device simulator - first early alpha version release for testing

p.kaczmarek2  25 8304 Cool? (+14)
📢 Listen (AI):

TL;DR

  • OpenBeken IoT device simulator runs a virtual OBK device for scripting, MQTT setup, Home Assistant pairing, and simulated peripherals like buttons, relays, LED strips, metering modules, and potentiometers.
  • It lets you load and save JSON sketches plus BK7231 flash dumps, draw circuits, and interact with buttons, relays, bulbs, and RGB/RGBCW strips in Windows.
  • The simulator exposes the OBK HTTP panel on port 80 and supports features like LittleFS-hosted files, SendGET, MQTT, and Tasmota Device Groups.
  • MQTT and Home Assistant discovery work, and the simulated Windows device can talk to real Tasmota/Beken devices on your network.
  • This is a very early alpha, so many problems remain and the controls still need improvement.
Generated by the language model.
Connection diagram in OpenBeken IoT simulator with bulbs and LED strips.
OpenBeken IoT device simulator allows you to run a virtual OBK device to try out OBK scripting, MQTT setup and Home Assistant pairing. You can also sketch connections of your virtual WiFi module to connect peripherals like buttons, relays, LED strips and even power metering modules and potentiometers.

OBK simulator features
- load and save sketches (JSON format) along with a simulated BK7231 flash memory dump (bin format; contains config, LittleFS, etc)
- draw a circuit almost like you'd draw in Cadsoft Eagle
- place and use buttons (they are simulated on voltage levels, so all Click, Double Click, Hold Start, Hold Release etc OBK events are working)
- place relays/bulbs that you can control with buttons or OBK panel or scripts
- whole OBK HTTP panel works on windows (as a HTTP server on port 80), the Javascript Web App also works, you basically get OBK device on Windows
- MQTT is also working well, so you can pair your simulated machine with Home Assistant, experiment with HASS automation, test HA discovery
place single color, CW (CCT), RGB and RGBCW strips and simulate their behaviour
- use Tasmota Device Groups on Windows (fully functional, simulated OBK device can talk to real Tasmota/Beken devices on your network)
- use OBK LittleFS to host HTML/javascript files and write OBK scripts
- send GET packets with SendGET command (fully functional, your Windows OBK sim can send HTTP GET to any server)
- and more....

Basic OBK simulator usage
Start the simulator executable. A basic window with sketch should appear:
Screenshot of the OpenBeken IoT simulator with layout of components.
At the same time, you should get a working OBK page on your local host, the default port is 80, just like with most HTTP programs:
OpenBeken IoT simulator homepage with device status information and configuration buttons.
As you can see, it's like a normal OBK device web page. Everything is functional there.
Now, the basic OBK simulator is simple:
- in the schematic editor window, you can place relays, buttons and other peripherals, basically to create your virtual OBK device
- in the OBK simulator page, you can configure your device just like you would be configuring your physical device
It is important to note that the schematic editor window is interactive, so all buttons there, relays, etc, are really working.


Loading examples, creating new scenes, saving your work
OBK schematic editor features a simple menu bar with schematic management options:
OpenBeken Simulator window with File menu open.
Load, save, etc options should be self-explanatory. Your current scene can be easily saved and loaded, just make sure to save manually after making changes to device flash memory - by default, they are NOT saved. To manage virtual devices, use FILE menu:
- File->New (Empty) - will create an empty scene
- File->Save - saves changes to current sketch
- File->Save As - allows you to save current sketch to another file
- File->Open Recent - provides a list of recently viewed sketches for your convenience:
OpenBeken simulation window with file menu and circuit sketch.
There are also available OBK simulator sample for download in our repository:
https://github.com/openshwprojects/obkSimulator

Changing startup resolution of schematic editor
Just run your app with the command line parameters:

-w 800 -h 600

You can also create a bat file like:

openBeken_win32.exe -w 800 -h 600

and place it in the same directory as Simulator exe.
You will also most likely want to skip the self test, so the final bat content will be:

openBeken_win32.exe -runUnitTests 0 -w 800 -h 600

You can change the port of HTTP page, this will allow you to run multiple instances of the simulator on your PC:

openBeken_win32.exe -runUnitTests 0 -w 800 -h 600 -port 81


Basic operations within schematic editor
There is almost no GUI at all in the current alpha version of the OBK simulator, so you will need to use hotkeys. They are on the alphanumeric keyboard.
- Key 1 is Use Tool, which allows you to press buttons, move sliders
- Key 2 is Move Tool, which allows you to move objects
- Key 3 is Wire Tool, which allows you to draw wires. Press LMB to draw, and press RMB to change draw mode
- Key 4 is Delete Tool, which allows you to delete objects, labels and wires
- Key 5 is Copy Tool, it can be used to quickly make a duplicate of clicked object
- Key 6 is Info Tool, it prints debug information about object under mouse cursor
- Key 7 is Text Tool, which allows you to print text on simulator sketch
Currently active tool is displayed on GUI:
OpenBeken Simulator interface showing the number of objects and wires, along with the active tool.

Schematic editor interactions demo
Let's load a sample scene first - the one with buttons and relays:
Circuit diagram using elements such as bulbs, measurement modules, and LED strips.
Now, note down which pins are used for relays and for buttons and configure them in OBK itself. P10 and P11 are relays (bulb icon):
Table describing UART1 RXD and TXD pins and their serial interface functions.
PWM2 and PWM3 are buttons:
Technical documentation excerpt with information on PWM3 and PWM2 connectors.
This is how I configured them:
Screenshot of the configuration interface for the OpenBeken IoT simulator.
Now, with left mouse button, click the virtual buttons:
OpenBeken IoT module schematic with peripheral elements.
As you can see, the relay (bulb icon) state changes, but with a delay. It's actually expected. It's long known "feature", it's the same in Tasmota. You need to consult our FAQ to read more about it:
A section of the OpenBeken simulator instructions explaining settings for instant touch switch response.
So let's enable this flag and try again.
Screenshot of WinTest OBK user interface with various flag options.
Now it works even better:
Schematic diagram with various electronic components and connections on a grid.

More detailed controls description and examples
More details about the OBK simulator will be covered in the next topic. Check out our Smart Home Tutorials section for updates:
https://www.elektroda.com/rtvforum/forum517.html

Summary
This is a very early test build of simulator, so there may be many problems and issues which are yet to be solved. Futhermore, the controls will be also improved soon. Still, if you have any feedback, let me know. I will do my best to adjust simulator to suit your needs.
Attachments:
  • obkSimulator-20240331.zip (1.94 MB) You must be logged in to download this attachment.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 14409 posts with rating 12351 , helped 650 times. Been with us since 2014 year.

Comments

divadiow 31 Mar 2024 20:36

Wonderful thank you. I tried compiling this afternoon but it failed on stuff not being in c:\projects\... And I didn't pursue it yet. Will have a play with it. [Read more]

DeDaMrAz 31 Mar 2024 21:29

https://obrazki.elektroda.pl/9872099400_1711913329_thumb.jpg It works on my win11 without a hitch [Read more]

nielspiersma 01 Apr 2024 15:07

I would also like to confirm it starts fine on my company managed Windows 11 Enterprise edition. Now my likely stupid question, can I and how would I use it for downloading the templates from existing... [Read more]

p.kaczmarek2 01 Apr 2024 15:12

What do you mean by "downloading templates from existing devices"? I don't know.... The only reasonable way I can think of is that when you know which GPIO is used for which role, you can set it in... [Read more]

nielspiersma 01 Apr 2024 16:41

Okay. no probs. I am just focused on flashing the devices. Not really the whole template thing, may need to give my self some time for investigating Niels [Read more]

p.kaczmarek2 28 Apr 2024 23:51

I am adding WS2812B driver self-tests and soon I will include them in Simulator as well: https://obrazki.elektroda.pl/6025886800_1714333341_thumb.jpg Added after 1 [hours] 32 [minutes]: https://obrazki.elektroda.pl/5191854100_1714338890_thumb.jpg... [Read more]

p.kaczmarek2 01 May 2024 13:18

I am working now on per-pixel LED animations: https://obrazki.elektroda.pl/1815915000_1714562304_thumb.jpg [Read more]

p.kaczmarek2 20 Sep 2024 08:44

Simulator binaries should be now available in Releases, can anyone check if they are working? https://github.com/openshwprojects/OpenBK7231T_App/releases [Read more]

insmod 20 Sep 2024 09:02

Haven't fully tested, but it starts and main page is working ok. v1.17.712 [Read more]

p.kaczmarek2 20 Sep 2024 09:14

Next step is probably running self tests once on Github Actions to chęck for breaking changes in each commit [Read more]

p.kaczmarek2 21 Sep 2024 07:40

@insmod @divadiow now self tests are run on Github, github action will fail if any of self tests fails. For example, the following test checks WS2812 API: void Test_WS2812B() { // reset whole... [Read more]

divadiow 21 Sep 2024 09:20

excellent. Not that burning fw is a chore, but it's also nice to be able to just run an exe to check main app changes in a PR quickly. [Read more]

p.kaczmarek2 22 Sep 2024 21:43

Now virtual DHT11 has a "body", so there can be two or more of them: https://obrazki.elektroda.pl/6427926100_1727034184_bigthumb.jpg [Read more]

p.kaczmarek2 24 Sep 2024 22:51

Progress towards simulation of WiFi module power on and off... https://obrazki.elektroda.pl/7818867000_1727211044_bigthumb.jpg https://obrazki.elektroda.pl/9795029500_1727211081_bigthumb.... [Read more]

p.kaczmarek2 03 Dec 2024 10:14

I love this Simulator, I can test OpenWeatherMap integration on Windows, without flashing any device: https://obrazki.elektroda.pl/2633305700_1733217259_bigthumb.jpg [Read more]

p.kaczmarek2 22 Nov 2025 21:34

And now simulator has a crude but working MAX7219 driver: https://obrazki.elektroda.pl/7331461700_1763843656_bigthumb.jpg [Read more]

max4elektroda 14 Mar 2026 20:15

Just added some PRs I would like to be reviewed please @pkaczmarek2 : Since long time I struggled with using OBK simulator was only possible with Windows binary - meaning using wine on Linux. Finally... [Read more]

p.kaczmarek2 16 Mar 2026 09:46

Simulator fix merged, I also want to merge I2C emulation when ready. I am not sure about these named arguments, what is the memory footprint for that? I added Shutters drivers to obk core release today,... [Read more]

max4elektroda 16 Mar 2026 13:23

Thanks for merging and the first review. For the "tokenizer" I can lower footprint by giving up one "style", since for now you can use two possibilities: "SDA=PA1" or "-SDA PA1". I needed some extra... [Read more]

FAQ

TL;DR: With 7 editor hotkeys and a local web panel, the early OpenBeken simulator lets Windows users test OBK scripting, MQTT, and Home Assistant pairing before flashing hardware. One tester said, "it starts fine" on Windows 11 Enterprise. It solves fast validation, scene building, and LED-driver experimentation from one executable. [#21027130]

Why it matters: This simulator shortens OpenBeken setup, debugging, and driver-testing time by moving early validation from physical devices to a virtual OBK environment.

Option Strength Limitation Best use
Named tokenizer arguments Easier to remember driver parameters Adds firmware/parser complexity Driver commands with many optional arguments
Web-app autocomplete hints Better UX at 0 memory footprint Needs docs and usually network access General command discovery and syntax help

Key insight: The simulator is most valuable as a pre-hardware test bench: it runs the OBK HTTP page, MQTT, scenes, and virtual peripherals locally, then expanded into LED, sensor, and Linux-related improvements over 2024-2026.

Quick Facts

  • The simulator exposes the OBK HTTP panel on port 80 by default and can run additional instances on other ports, such as 81, from the command line. [#21027130]
  • Startup window size is configurable at launch with -w 800 -h 600, so the schematic editor can open at 800 × 600 px instead of the default size. [#21027130]
  • The alpha schematic editor relies on 7 alphanumeric hotkeys: Use, Move, Wire, Delete, Copy, Info, and Text. That keeps the GUI minimal but functional. [#21027130]
  • LED self-tests shown later validate virtual strips with a 128-byte DDP packet, pixel assertions, and a 6-pixel initialization example for SM16703P and PixelAnim. [#21233922]
  • Release testing progressed from forum-shared binaries to a reported working simulator build labeled v1.17.712, with GitHub self-tests added afterward to catch regressions automatically. [#21232919]

How do I get started with the OpenBeken IoT device simulator for testing OBK scripting, MQTT setup, and Home Assistant pairing on Windows?

Start the simulator executable on Windows and open the local OBK page in your browser. The thread says the HTTP panel works like a normal OBK device and uses port 80 by default. Then use the schematic window to place virtual parts and the web panel to configure them. This gives you OBK scripting, MQTT setup, and Home Assistant discovery testing without flashing hardware. [#21027130]

What steps are needed to create a virtual OBK device with buttons and relays in the simulator and make them work through the OBK web panel?

You need to place parts, map pins, and configure roles in OBK. 1. Load or build a scene with buttons and relay or bulb icons in the schematic editor. 2. Note the assigned pins, such as P10 and P11 for relays and PWM2 and PWM3 for buttons in the example. 3. Set those roles in the OBK web panel, then click the virtual buttons with the left mouse button. The relay state will follow the configured logic. [#21027130]

Why do virtual relay or bulb icons in the OpenBeken simulator change state with a delay after a button click, and which setting improves the response?

The delay is expected and matches a known behavior also seen in Tasmota. The author explicitly says the lag after a button click is a long-known “feature,” not a simulator-only bug. Enabling the referenced flag from the FAQ improves the response and makes the virtual relay react better in the demo. [#21027130]

How can I save and reload an OpenBeken simulator scene together with the simulated BK7231 flash memory and LittleFS data?

Use the File menu and save manually after any flash-memory changes. The simulator can load and save sketches as JSON and keep a simulated BK7231 flash dump as a BIN file containing config and LittleFS data. File > Save writes the current sketch, Save As writes a new file, and Open Recent lists previous sketches. Flash changes are not saved automatically. [#21027130]

Which keyboard hotkeys control the alpha-version OBK schematic editor, and what does each tool do?

The alpha editor uses keys 1 through 7 on the alphanumeric keyboard. Key 1 selects Use, 2 Move, 3 Wire, 4 Delete, 5 Copy, 6 Info, and 7 Text. Wire uses the left mouse button to draw, and the right mouse button changes draw mode. The active tool is shown in the GUI. [#21027130]

What is LittleFS in OpenBeken, and how is it used inside the simulator to host HTML, JavaScript, and OBK scripts?

"LittleFS is a small embedded filesystem that stores files inside device flash, keeping persistent web assets and scripts." In this simulator, the thread says LittleFS content is part of the simulated flash dump and can host HTML and JavaScript files plus OBK scripts. That lets a virtual OBK device serve web content and script logic on Windows like a real device. [#21027130]

What are Tasmota Device Groups, and how do they interact with a simulated OpenBeken device on a real network?

"Tasmota Device Groups are a network-control feature that lets compatible devices exchange state and commands directly across the same network." The simulator supports them on Windows, and the author says the simulated OBK device can talk to real Tasmota or Beken devices on your network. That makes the simulator useful for mixed virtual-and-physical testing before deployment. [#21027130]

How do I change the OpenBeken simulator startup resolution, skip self-tests, and run multiple instances on different HTTP ports?

Launch the executable with command-line parameters. Use -w 800 -h 600 to set a startup size of 800 × 600 px. Add -runUnitTests 0 to skip self-tests, and add -port 81 to move the web panel off port 80. That combination lets you open multiple simulator instances on one PC. [#21027130]

What is the best way to use the OpenBeken simulator for downloading or recreating templates from existing devices when I already know the GPIO roles?

Use it to recreate the template, not to automatically extract one from a live device. The author says the practical method is to enter the known GPIO roles into the simulator, open the simulator web app, and then copy the resulting JSON template. If you already know the syntax, you can also write the JSON by hand. [#21027910]

Why might compiling or running the OBK simulator outside a default Windows-style path like c:\projects fail, and what should I check first?

A build can fail if project paths or assumptions are hard-coded for a Windows-style layout. One tester said compilation failed on items not being in c:\projects\..., then stopped investigating. Check the build scripts, include paths, and any absolute-path assumptions first. If you only need testing, use the provided executable or later release binaries instead of compiling immediately. [#21027146]

How does the OpenBeken simulator help test WS2812B, SM16703P, PixelAnim, and per-pixel LED animations without flashing real hardware?

It provides a virtual LED test bench with self-tests, driver commands, and later animation work. Posts across 2024 show WS2812B driver self-tests, SM16703P pixel assertions, PixelAnim checks, and then per-pixel animation work. The author later said, “I love this Simulator,” because it lets him test integrations on Windows without flashing any device. That speeds driver validation and UI checking. [#21330476]

What does DDP packet parsing mean in the OpenBeken LED self-tests, and how is it used to validate virtual pixel data?

DDP packet parsing means feeding a simulated lighting-data packet into the LED code and verifying the resulting pixels. In the shown self-test, a 128-byte fake DDP packet is created, pixel data begins at offset 10, and the parser updates three virtual pixels. Assertions then check exact RGB results like 0xFF, 0x00, and 0xFF. That confirms the virtual LED pipeline works end to end. [#21233922]

Named tokenizer arguments versus web-app autocomplete hints in OpenBeken: which approach is better for driver commands and why?

The thread favors web-app autocomplete hints over new tokenizer syntax. The project maintainer said he was “almost 100% sure” they would use GitHub-fetched command metadata with autocomplete-like hints. His reason was better usability at 0 memory footprint, while named arguments increase firmware complexity and still need driver documentation for startDriver XYZ 1 2 3 4 syntax. [#21863846]

How can Linux support for the OpenBeken simulator be improved so the GUI, web server, and self-tests work properly without relying on Wine?

Fix the timing macros, start the simulator correctly, and detect Linux-specific behavior. A contributor said Linux tests were slow because wrong Sleep() defines caused second-long sleeps instead of millisecond delays. He also found the simulator was not started fully, so Main_Init() never ran, commands were not registered, and the web server stayed down. His PR aimed to make native Linux use possible instead of relying on Wine. [#21862523]

Which new virtual peripherals and drivers have been added or proposed for the OpenBeken simulator, such as DHT11 bodies, WiFi power control, MAX7219, GPS, and I2C sensor emulation?

The simulator expanded well beyond buttons and relays. Posts mention virtual DHT11 bodies, WiFi module power on and off simulation, a working MAX7219 driver, GPS-related NEO6M command work, and proposed I2C sensor emulation for BMP280 or BME280, AHT2x, SHT3x or SHT4x, CHT8305 or CHT831x, plus VEML7700. That shows a clear move toward broader sensor and display validation inside the simulator. [#21862523]
Generated by the language model.
%}