{"id":19946991,"url":"https://github.com/entityfx/mqs-simulator","last_synced_at":"2026-05-14T19:05:33.640Z","repository":{"id":210955151,"uuid":"727858585","full_name":"EntityFX/mqs-simulator","owner":"EntityFX","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-06T19:32:52.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T14:17:49.048Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/EntityFX.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":"2023-12-05T18:10:45.000Z","updated_at":"2023-12-05T18:13:24.000Z","dependencies_parsed_at":"2024-11-13T00:46:19.682Z","dependency_job_id":null,"html_url":"https://github.com/EntityFX/mqs-simulator","commit_stats":null,"previous_names":["entityfx/mqs-simulator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EntityFX/mqs-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntityFX%2Fmqs-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntityFX%2Fmqs-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntityFX%2Fmqs-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntityFX%2Fmqs-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EntityFX","download_url":"https://codeload.github.com/EntityFX/mqs-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EntityFX%2Fmqs-simulator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33039261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","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":[],"created_at":"2024-11-13T00:33:50.783Z","updated_at":"2026-05-14T19:05:33.622Z","avatar_url":"https://github.com/EntityFX.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# IoT Simulator\n\nThis simulator can be used to simulate JSOn telemetry with specified properties and send telemetry data by specified protocol (Http, Mqtt, Azure Iot Hub, Azure Iot Center, Azure SignalR). All telemetry properties can be defined in configuration file `appsettings.json`.\n\n## Build\n\n```\ncd EntityFX.IotPlatform.Simulator\ndotnet build -c Release\n```\n\n## Usage\n\n```\ncd EntityFX.IotPlatform.Simulator\ndotnet run\n```\n\nor\n\n```\ncd EntityFX.IotPlatform.Simulator\\bin\\Release\\net5.0\ndotnet run EntityFX.IotPlatform.Simulator.dll\n```\n\nor\n\n```\ncd EntityFX.IotPlatform.Simulator\\bin\\Release\\net5.0\n./EntityFX.IotPlatform.Simulator.exe\n```\n\nTo change configuration you can modify `appsettings.json` file.\n\n### SendPeriod\n\nConfiguration:\n\n```json\n{\n  \"sendPeriod\" :  \"00:00:00.5\"\n}\n```\n\n\u003e \"00:00:00.5\" means will send telemetry each 500 milliseconds.\n\n`sendPeriod` can be set in any TimeStamp format.\n\n### Properties\n\nProperty types:\n\n* Number\n* String\n* Bool\n* Timestamp\n* DateTime\n* Complex\n* GeoLocation\n\nConfiguration fo properties:\n\n```json\n{\n  \"properties\": {\n    \"Property1\": {\n      \"type\": \"Number\",\n      ...\n    },\n    \"Property2\": {\n      \"type\": \"String\",\n      ..\n    },\n    ...\n  }\n}\n```\n\n#### Number property\n\nCan generate numeric values by constant, enum, sequence, random.\n\nFor constant value:\n\n```json\n{\n    \"Temperature\": {\n      \"type\": \"Number\",\n      \"constant\": 25\n    },\n}\n```\n\nFor sequence value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Number\",\n      \"sequence\": {\n        \"from\": 5,\n        \"to\": 9,\n        \"step\": 2\n      }\n    },\n}\n```\n\n`from`: inclusive\n\n`to`: exclusive\n\n`step`: value to increment, default is **1**.\n\n\u003e Will generate values like 5, 7, 5, 7, ...\n\nFor random sequence value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Number\",\n      \"randomSequence\": {\n        \"from\": 10,\n        \"to\": 25,\n        \"isDouble\": false\n      },\n      \"useNull\": true\n    },\n}\n```\n\n`from`: inclusive\n\n`to`: exclusive\n\n\u003e Will generate random value in range from `10` to `25` (exclusive).\n\u003e \n\u003e If `useNull` is true then will generate `null` randomly.\n\u003e \n\u003e If `isDouble` is set then will generate in float format.\n\nFor enum value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Number\",\n      \"enum\": [ 1, 2, 3, 5 ],\n      \"useNull\": true,\n      \"random\": true\n    },\n}\n```\n\n\u003e Will generate values like 1, 2, 3, 5, 1, 2, 3\n\nor random from list if `random` is true\n\nIf `useNull` is true then will generate `null` then `1, 2, 3, 5, 1, 2, 3` or random value from the list.\n\n#### String property\n\nCan generate string values by constant, enum abd guid.\n\nFor constant value:\n\n```json\n{\n    \"Name\": {\n      \"type\": \"String\",\n      \"constant\": \"John Doe\"\n    },\n}\n```\n\nFor enum value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Number\",\n      \"enum\": [ \"good\", \"warning\", \"critical\" ],\n      \"useNull\": true,\n      \"random\": true\n    },\n}\n```\n\n\u003e Will generate values like `good`, `warning`, `critical` or random from the list if `random` is true.\n\u003e \n\u003e If `useNull` is true then will generate `null`\n\nFor guid value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Number\",\n      \"enum\": [ \"good\", \"warning\", \"critical\" ],\n      \"useNull\": true,\n      \"random\": true\n    },\n}\n```\n\n#### Bool property\n\nCan generate bool values by constant, random.\n\nFor constant value:\n\n```json\n{\n    \"IsOn\": {\n      \"type\": \"Bool\",\n      \"constant\": true\n    },\n}\n```\n\nFor random value:\n\n```json\n{\n    \"IsOpened\": {\n      \"type\": \"Bool\",\n      \"useNull\": true,\n      \"random\": true\n    },\n}\n```\n\n\u003e Will generate random values`random` is true. Otherwise will generate sequential `false`, `true`, `false`, `true`.\n\u003e \n\u003e If `useNull` is true then will generate `null`\n\n#### Timestamp property\n\nCan generate timestamp (numeric value in milliseconds since January 01 1970) by constant, enum, sequence, random or current date.\n\nFor Curent timestamp:\n\n```json\n{\n    \"_ts\": {\n      \"type\": \"Timestamp\",\n      \"dateType\": \"now\"\n    },\n}\n```\n\nor\n\n```json\n{\n    \"_ts\": {\n      \"type\": \"Timestamp\",\n      \"dateType\": \"utcNow\"\n    },\n}\n```\n\nFor sequence value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Timestamp\",\n      \"sequence\": {\n        \"from\": 1620025640642,\n        \"to\": 1621025640642,\n        \"step\": 1000\n      }\n    },\n}\n```\n\n`from`: inclusive\n\n`to`: exclusive\n\n`step`: value to increment, default is **1**.\n\nFor random sequence value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Timestamp\",\n      \"randomSequence\": {\n        \"from\": 1620025640642,\n        \"to\": 1621025640642\n      },\n      \"useNull\": true\n    },\n}\n```\n\n`from`: inclusive\n\n`to`: exclusive\n\n\u003e Will generate random value in range.\n\u003e \n\u003e If `useNull` is true then will generate `null` randomly.\n\nFor enum value:\n\n```json\n{\n    \"Step1\": {\n      \"type\": \"Timestamp\",\n      \"enum\": [ 1620025640642, 1620025990642 ],\n      \"useNull\": true,\n      \"random\": true\n    },\n}\n```\n\n\u003e Will generate random from list if `random` is true\n\nIf `useNull` is true then will generate `null` then `1, 2, 3, 5, 1, 2, 3` or random value from the list.\n\n#### DateTime property\n\nCan generate DatTime (string date Time value in ISO format) by constant, enum, sequence, random or current date.\n\nFor Curent datettime:\n\n```json\n{\n    \"Dt\": {\n      \"type\": \"DateTime\",\n      \"dateType\": \"now\"\n    },\n}\n```\n\nor\n\n```json\n{\n    \"Dt\": {\n      \"type\": \"DateTime\",\n      \"dateType\": \"utcNow\"\n    },\n}\n\nFor Sequence datettime:\n\n```json\n{\n    \"Dt1\": {\n      \"type\": \"DateTime\",\n      \"sequence\": {\n        \"from\": \"2000-01-01\",\n        \"to\": \"2030-01-01\"\n      },\n      \"random\": true\n    },\n}\n\nor\n\n```json\n{\n    \"Dt1\": {\n      \"type\": \"DateTime\",\n      \"sequence\": {\n        \"from\": \"2000-01-01\",\n        \"to\": \"2030-01-01\",\n        \"step\" : \"01:00:00\"\n      }\n    },\n}\n\n\u003e Sequentially increases time by 1 hour.\n\n#### GeoLocation\n\nGenerates geolocation data:\n\n```json\n{\n    \"lat\": 55.3683346539588,\n    \"lon\": 51\n}\n```\n\nConfiguraiton (latitude and longitude will be generated randomly and range can be restricted by latRandomSequence and lonRandomSequence):\n\n```json\n{\n    \"Location\": {\n      \"type\": \"GeoLocation\",\n      \"latRandomSequence\": {\n        \"from\": 55,\n        \"to\": 57,\n        \"isDouble\": true\n      },\n      \"lonRandomSequence\": {\n        \"from\": 47,\n        \"to\": 52,\n        \"isDouble\": false\n      }\n    }\n}\n\n#### Complex type\n\n\n```\n### Telemetry Sender\n\nTelemetry Sender Types:\n\n* Http\n* Mqtt\n* Azure Iot Hub\n* Azure Iot Center\n* Azure SignalR\n\nSender Type configuration:\n\n```json\n{\n  \"telemetrySender\": {\n    \"_types\": [ \"Http\", \"Mqtt\", \"AzureSignalR\", \"AzureIotHub\", \"AzureIotCenter\" ],\n    \"type\": \"AzureIotHub\"\n  }\n}\n```\n\n#### Http Sender\n\nHttp sender configuration example:\n\n```json\n{\n  \"telemetrySender\": {\n    \"Http\": {\n      \"Path\": \"https://your.uri\",\n      \"Method\": \"Post\",\n      \"RequestHeaders\": {\n        \"x-functions-key\": \"some-key-here\",\n        \"Auth\": \"Bearer ...\"\n      }\n    }\n  }\n}\n```\n\n`Method`: `Post` or `Put`\n\n`RequestHeaders` can contain any `\"key\": \"value\"` property.\n\n#### AzureSignalR\n\nConfiguration:\n\n```json\n{\n  \"telemetrySender\": {\n    \"AzureSignalR\": {\n      \"Hub\": \"telemetry\",\n      \"Method\": \"Send\",\n      \"ConnectionStringName\": \"AzureSignalR\"\n    },\n  },\n  \"connectionStrings\": {\n    \"AzureSignalR\": \"Endpoint=https://your.uri;AccessKey=...;Version=1.0;\"\n  }\n}\n```\n\n`Hub`: SignalR hub name\n\n`Method`: Remote method to invoke (only support one parameter method with object type)\n\n`ConnectionStringName`: SignalR Connection string which should be defined in `connectionStrings` section\n\n#### AzureIotHub\n\nConfiguration to send telemetry to Azure Iot Hub.\n\nConfiguration:\n\n```json\n{\n  \"telemetrySender\": {\n    \"AzureIotHub\": {\n      \"HostName\": \"almaz-gdc.azure-devices.net\",\n      \"SymmetricKeys\": {\n        \"deviceId1\": \"sas-token\"\n      }\n    }\n  }\n}\n```\n\n`HostName`: uri address of Azure Iot Hub\n\n`SymmetricKeys`: `\"key\": \"value\"` properties, where `key` is Iot Hub device id and `value` is Iot Hub's device sas-token. You can use multiple Symmetric Keys but only one random key will be used per each telemetry send call.\n\n#### AzureIotCenter\n\nAzureIotCenter configuration is used when you send telemetry to Azure IoT central with unknown address of it's IoT Hub.\n\n```json\n{\n  \"telemetrySender\": {\n    \"AzureIotCenter\": {\n      \"ProvisioningHost\": \"global.azure-devices-provisioning.net\",\n      \"IdScope\": \"your-id-scope\",\n      \"SymmetricKeys\": {\n        \"deviceId1\": \"sas-token\"\n      }\n    }\n  }\n}\n```\n\n`ProvisioningHost`: Iot Center provisioning host.\n\n`IdScope`: unique id of your Iot Central application\n\n\n`SymmetricKeys`: `\"key\": \"value\"` properties, where `key` is Iot Hub device id and `value` is Iot Hub's device sas-token. You can use multiple Symmetric Keys but only one random key will be used per each telemetry send call.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentityfx%2Fmqs-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentityfx%2Fmqs-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentityfx%2Fmqs-simulator/lists"}