{"id":22083200,"url":"https://github.com/refactor-group/ambi_mock_client","last_synced_at":"2025-03-23T21:23:46.106Z","repository":{"id":42381363,"uuid":"453161037","full_name":"refactor-group/ambi_mock_client","owner":"refactor-group","description":"Emulates an Edge hardware-based room sensor client purely as a CLI application.","archived":false,"fork":false,"pushed_at":"2023-03-25T14:01:41.000Z","size":103,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-19T21:46:19.598Z","etag":null,"topics":["cli","iot","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refactor-group.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}},"created_at":"2022-01-28T17:41:18.000Z","updated_at":"2024-01-11T01:15:55.000Z","dependencies_parsed_at":"2024-11-07T12:28:37.205Z","dependency_job_id":"ee0b149e-2a87-4d28-bb26-dd42b0eada65","html_url":"https://github.com/refactor-group/ambi_mock_client","commit_stats":null,"previous_names":["refactor-group/ambi_mock_client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi_mock_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi_mock_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi_mock_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refactor-group%2Fambi_mock_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refactor-group","download_url":"https://codeload.github.com/refactor-group/ambi_mock_client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245170390,"owners_count":20572060,"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":["cli","iot","rust","rust-lang"],"created_at":"2024-12-01T00:11:26.992Z","updated_at":"2025-03-23T21:23:46.081Z","avatar_url":"https://github.com/refactor-group.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ambi_mock_client\n\nProvides a mock Ambi client that emulates real sensor hardware such as an Edge client.\n\n## Usage\n\nYou must have Rust installed to build `ambi_mock_client`.\nYou can find documentation on installing Rust [here](https://www.rust-lang.org/tools/install).\n\nYou will also need a local copy of [Ambi](https://github.com/jhodapp/ambi) running ( default port 4000 ).\n\n## Set Up Git Hooks\n\nThe ambi_mock_client repository makes use of several Git hooks to ensure that code quality standards are met and consistent. To automatically configure these hooks for your local workspace, you can run the following:\n```bash\n./scripts/create-git-hooks\n```\n\nThis will create symlinks to the Git hooks, preserving any hooks that you may have already configured.\n\n## Usage\n\nYou can either install this as a CLI tool by running `cargo install --path .` (which is the\nrecommended way of using this) or you can run it directly from this repository.\n\n```\n# Installed\n$ ambi_mock_client -h\n\n# Or not Installed\n$ cargo run -- -h\n\n# Output\nProvides a mock Ambi client that emulates real sensor hardware such as an Edge client.\n\nUsage: ambi_mock_client [OPTIONS]\n\nOptions:\n  -d, --debug\n          Turns verbose console debug output on\n  -n, --post-amount \u003cPOST_AMOUNT\u003e\n          The number of sensor readings to post. [DEFAULT: 1]\n  -t, --time-per-post \u003cTIME_PER_POST_S\u003e\n          The time between each sensor reading post (in seconds). [DEFAULT: 10]\n  -T, --total-time \u003cTOTAL_TIME_S\u003e\n          The total time over which all the sensor reading posts must be sent (in seconds, alternative to -t)\n  -p, --num-threads \u003cNUM_THREADS\u003e\n          The number of threads to spawn. The workload will be cloned to each thread, not divided. [DEFAULT: 1]\n  -h, --help\n          Print help (see more with '--help')\n  -V, --version\n          Print version\n```\n\nExample output:\n\n```log\n$ ambi_mock_client -n 1\n\n[2023-03-08T17:39:54Z INFO  ambi_mock_client::sensor_posts] [Thread 0]: Sending POST request to http://localhost:8000/api/readings/add\n[2023-03-08T17:39:54Z INFO  ambi_mock_client::sensor_posts] [Thread 0]: Response from Ambi backend: 201\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefactor-group%2Fambi_mock_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefactor-group%2Fambi_mock_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefactor-group%2Fambi_mock_client/lists"}