{"id":16243921,"url":"https://github.com/openshwprojects/obksimulator","last_synced_at":"2025-03-19T17:33:06.771Z","repository":{"id":64164391,"uuid":"573840242","full_name":"openshwprojects/obkSimulator","owner":"openshwprojects","description":"OpenBeken simulator that allows you to draw a virtual IoT device schematic and run it on Windows. Most of OpenBeken features are emulated, including pins, buttons, energy metering, ADC and potentiometers, event handlers, change handlers, LittleFS scripting and of course MQTT runs as well. That way you can pair Windows with HASS!","archived":false,"fork":false,"pushed_at":"2024-11-01T13:32:16.000Z","size":12456,"stargazers_count":11,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-28T20:25:47.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openshwprojects.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-03T15:47:56.000Z","updated_at":"2024-11-27T03:47:42.000Z","dependencies_parsed_at":"2024-10-27T21:44:07.062Z","dependency_job_id":null,"html_url":"https://github.com/openshwprojects/obkSimulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshwprojects%2FobkSimulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshwprojects%2FobkSimulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshwprojects%2FobkSimulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshwprojects%2FobkSimulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openshwprojects","download_url":"https://codeload.github.com/openshwprojects/obkSimulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244010927,"owners_count":20383333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T14:16:54.000Z","updated_at":"2025-03-19T17:33:02.920Z","avatar_url":"https://github.com/openshwprojects.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro\n\nOpenBeken simulator. Written in SDL and OpenGL, currently works on Windows, but should be easy to port.\n\nRelease topic: https://www.elektroda.com/rtvforum/topic4046056.html\n\nOpenBeken simulator allows you to draw a simple sketch (simplified schematic) of an IoT device and run OpenBeken on Windows on that simulated device.\nYou can place buttons, LEDs, relays, trimmers, power metering chips, interact with them (press buttons etc) and check how OpenBeken would behave on such device.\nThis allows you to develop OpenBK configurations and scripts easily, even without getting a real device.\n\nFeatures:\n- load and save sketches (JSON format) along with a simulated BK7231 flash memory dump (bin format; contains config, LittleFS, etc)\n- draw a circuit like you'd draw in Cadsoft Eagle\n- place and use buttons (they are simulated on voltage levels, so all Click, Double Click, Hold Start, Hold Release etc OBK events are working)\n- place relays/bulbs that you can control with buttons or OBK panel or scripts\n- 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\n- MQTT is also working well, so you can pair your simulated machine with Home Assistant, experiment with HASS automation, test HA discovery\n- place single color, CW (CCT), RGB and RGBCW strips and simulate their behaviour \n- use Tasmota Device Groups on Windows (fully functional, simulated OBK device can talk to real Tasmota/Beken devices on your network)\n- send GET packets with SendGET command (fully functional, your Windows OBK sim can send HTTP GET to any server)\n- and more....\n\n# Basic usage\n\nRun the simulator executable. An SDL Window will open with your device simplified sketch (WiFi module and some peripherals), also an OpenBeken HTTP server will run on port 80 on your local machine, so you can access your virtual OBK device by entering \"localhost\" or your local IP in the web browser. Note that you need to have port 80 not in use for that purpose, so stop services like Apache/Xampp, etc, before running OBK sim.\n\nNow you can do two things:\n- you can play around with Web interface, scripts, etc, just like on any other physical device\n- you can change the simulated hardware in the Simulator window, add objects (relays, bulbs, LEDs, buttons), connect them with wires and script them anyway you want in Web panel, interact with buttons by clicking them\n\nYour 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:\n- File-\u003eNew (Empty) will create an empty  scene\n- File-\u003eLoad allows you to load an existing simulation (device schematic sketch + device flash dump with setting in flash)\n- File-\u003eSave saves changes to current sketch\n- File-\u003eSave As allows you to save current sketch to another file\n- File-\u003eOpen Recent provides a list of recently viewed sketches\n\nBasic tools are available under the hotkeys on alphanumeric keyboards. \n- Key 1 is Use Tool, which allows you to press buttons, move sliders\n- Key 2 is Move Tool, which allows you to move objects\n- Key 3 is Wire Tool, which allows you to draw wires. Press LMB to draw, and press RMB to change draw mode\n- Key 4 is Delete Tool, which allows you to delete objects, labels and wires\n- Key 5 is Copy Tool, it can be used to quickly make a duplicate of clicked object\n- Key 6 is Info Tool, it prints debug information about object under mouse cursor\n- Key 7 is Text Tool, which allows you to print text on simulator sketch\n\n# Command line arguments\n\nOpenBeken simulator supports the following command line arguments:\n- port - this allows you to change the HTTP port so multiple instances can run on single PC\n- w and -h - this allows you to change the starting resolution of the window\n- runUnitTests - this allows you to disable the long self test process that is at the startup of the simulator\n\nKeep in mind that you need to prefix each argument with -, so to set port to 81 you should write: -port 81 , etc.\n  \n# Compiling\n\nGet main repository here: \nhttps://github.com/openshwprojects/OpenBK7231T_App/tree/main\nNext, assuming you have a path like W:\\GIT\\OpenBK7231T\\apps\\OpenBK7231T_App, copy content of simulator dir from this repo there, so you get paths like W:\\GIT\\OpenBK7231T\\apps\\OpenBK7231T_App\\libs_for_simulator\nThen open MSVC project (from the OpenBK7231T_App repo), select win build config\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshwprojects%2Fobksimulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenshwprojects%2Fobksimulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshwprojects%2Fobksimulator/lists"}