{"id":16432421,"url":"https://github.com/ntrp/iot-simulator","last_synced_at":"2026-06-11T02:31:41.878Z","repository":{"id":44445623,"uuid":"512011863","full_name":"ntrp/iot-simulator","owner":"ntrp","description":"Pluggable IoT simulator","archived":false,"fork":false,"pushed_at":"2025-07-19T23:00:41.000Z","size":84,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-19T23:55:56.008Z","etag":null,"topics":["iot","plugin","rust","settings","simulation","simulator"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntrp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2022-07-08T19:55:52.000Z","updated_at":"2025-07-19T21:52:05.000Z","dependencies_parsed_at":"2023-12-15T06:26:27.982Z","dependency_job_id":"8ce538a0-89f9-48ba-82c2-9c1a1c185749","html_url":"https://github.com/ntrp/iot-simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ntrp/iot-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntrp%2Fiot-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntrp%2Fiot-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntrp%2Fiot-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntrp%2Fiot-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntrp","download_url":"https://codeload.github.com/ntrp/iot-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntrp%2Fiot-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34180147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["iot","plugin","rust","settings","simulation","simulator"],"created_at":"2024-10-11T08:43:24.986Z","updated_at":"2026-06-11T02:31:41.863Z","avatar_url":"https://github.com/ntrp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IoT Simulator\n\nThis project is a highly extensible IoT simulator written in Rust. It allows you to define a hierarchy of devices and sensors, and simulate the data they generate over a period of time. The simulator is designed to be modular, with a plugin-based architecture for both data generation and output.\n\n## Features\n\n*   **Hierarchical Device Structure:** Define a tree-like structure of devices and sensors to accurately model your IoT deployments.\n*   **Pluggable Data Generators:** Create your own data generators to simulate any type of sensor data. The simulator comes with two examples:\n    *   `const`: A simple generator that produces a constant value.\n    *   `sma`: A simple moving average generator.\n*   **Pluggable Outputs:** Send your simulated data to any destination. The simulator comes with a `stdout` output plugin that prints the data to the console.\n*   **Configuration via RON:** The simulation is defined in a [RON (Rusty Object Notation)](https://github.com/ron-rs/ron) file, which is easy to read and write.\n\n## How to Use\n\n### 1. Configure the Simulation\n\nThe simulation is defined in a RON file. Here is an example:\n\n```ron\nSimulation(\n    name: \"Oven Simulation\",\n    description: \"A simple simulation about an oven with multiple devices\",\n    start_at: Offset(\"-PT10s\"),\n    end_at: Never(),\n    devices: [\n        Device(\n            name: \"oven\",\n            sensors: [\n                Sensor(\n                    name: \"temperature\",\n                    sampling_rate: 1000,\n                    value_generator: GeneratorConfig(\n                        generator_id: \"sma\",\n                        params: {\n                            \"min\": \"10.0\",\n                            \"max\": \"20.0\",\n                            \"precision\": \"2\",\n                            \"buffer_size\": \"10\"\n                        }\n                    )\n                ),\n                Sensor(\n                    name: \"lumens\",\n                    sampling_rate: 5000,\n                    value_generator: GeneratorConfig(\n                        generator_id: \"const\",\n                        params: {\n                            \"val\": \"10\",\n                        }\n                    ),\n                ),\n            ],\n            devices: [\n                Device(\n                    name: \"fan\",\n                    sensors: [\n                        Sensor(\n                            name: \"speed\",\n                            sampling_rate: 3000,\n                            value_generator: GeneratorConfig(\n                                generator_id: \"sma\",\n                                params: {\n                                    \"min\": \"500\",\n                                    \"max\": \"600\",\n                                    \"precision\": \"1\",\n                                    \"buffer_size\": \"10\"\n                                }\n                            ),\n                        ),\n                    ]\n                )\n            ]\n        )\n    ],\n    output_plugins: [\n      OutputConfig(\n        output_id: \"stdout\",\n        params: {\n          \"pretty\": \"true\"\n        }\n      )\n    ]\n)\n```\n\n### 2. Configure the Plugins\n\nThe simulator needs to know where to find the plugin libraries. This is configured in a `settings.toml` file:\n\n```toml\n[[generator_plugins]]\nid = \"const\"\ngenerator_type = \"Stateless\"\npath = \"./target/debug/libiot_simulator_generator_const.dylib\"\n\n[[generator_plugins]]\nid = \"sma\"\ngenerator_type = \"Stateful\"\npath = \"./target/debug/libiot_simulator_generator_sma.dylib\"\n\n[[output_plugins]]\nid = \"stdout\"\npath = \"./target/debug/libiot_simulator_output_stdout.dylib\"\n```\n\n### 3. Run the Simulation\n\nOnce you have created the configuration files, you can run the simulation using the command-line interface:\n\n```bash\ncargo run -- -c settings.toml -s test.ron\n```\n\nThis will start the simulation and print the generated data to the console.\n\nThere are already prepared config files in the testing folder so the demo can be run with:\n```bash\ncargo run -- -s ./testing/test.ron -c ./testing/settings.toml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntrp%2Fiot-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntrp%2Fiot-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntrp%2Fiot-simulator/lists"}