{"id":20841494,"url":"https://github.com/iotexproject/pebble-simulator","last_synced_at":"2025-05-08T22:11:13.670Z","repository":{"id":49480768,"uuid":"296894973","full_name":"iotexproject/pebble-simulator","owner":"iotexproject","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-01T05:36:42.000Z","size":7599,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":12,"default_branch":"master","last_synced_at":"2023-08-24T12:55:22.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iotexproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-19T15:13:52.000Z","updated_at":"2023-02-07T19:44:41.000Z","dependencies_parsed_at":"2023-02-10T01:30:35.903Z","dependency_job_id":null,"html_url":"https://github.com/iotexproject/pebble-simulator","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fpebble-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fpebble-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fpebble-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iotexproject%2Fpebble-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iotexproject","download_url":"https://codeload.github.com/iotexproject/pebble-simulator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225110811,"owners_count":17422482,"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-11-18T01:20:23.573Z","updated_at":"2024-11-18T01:20:24.258Z","avatar_url":"https://github.com/iotexproject.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pebble Simulator\nThis is a shell script that simulates verifiable IoT data produced by a Pebble Tracked device and store it to a local file. If required, the script can publish the data to AWS IoT Core using MQTT similarly to a real Pebble Tracker device. \n\n# Installation\nThe script has been successfully tested on Ubuntu 16.04.6 and MacOS 10.14\n\n### Dependencies\n- linux bash\n- openssl 1.0.2g or later\n- mosquitto-clients\n\n### Ubuntu\nRun the following commands in a Linux shell \n```\n$ apt-get install  openssl\n$ apt-get install  mosquitto-clients\n```\n\n### MacOS\n```\n$ brew install openssl\n$ brew install mosquitto\n```\n## Run the simulator\n```\n$ ./simulator.sh\n\n========\u003e\u003e PEBBLE SIMULATOR \u003c\u003c========\n\n\n 1.  Config Sensors\n\n 2.  Set Number of Data Points (Current: 30)\n\n 3.  Generate Simulated Data\n\n 4.  Publish to IoTT Portal\n\n 5.  Device Registration\n\n 6.  Set Device IMEI (Current: 103381234567402)\n\n 7.  Config device privkey (Current: 0510802dad279d7451c63ab28a44915ffc1fa61db98c276a16f8b0f1e87ec1af)\n\n 8.  Exit\n\nSelect:\n\n```\n## How to registration\n1. Run the simulator\n```\n    ./simulator.sh\n```\n\n2. Select menu '5' \n\n3. Add a device on the page:  https://portal.iott.network/\"\n    \n    When you get the prompt \"Device registration complete!\", it means that the device has been registered\n\n## Generate the data points\nYou need to register the device before generating data.By default, the scirpt will generate 30 data points using random values for each of the 8 sensors available on Pebble Tracker, along with the elliptic curve signature for each data point. You can change the number of generated data points by selecting the menu item #2. Finally select the menu item #3 to generate and save the data points to pebble.dat. Each data point is saved in JSON format:\n```json\n{\n    \"message\": {\n        \"snr\": 185,\n        \"vbat\": 3.98584,\n        \"latitude\": 8150.30185,\n        \"longitude\": 9830.17993,\n        \"gasResistance\": 1124,\n        \"temperature\": 16.38644,\n        \"pressure\": 503.77594,\n        \"humidity\": 31.56519,\n        \"light\": 725.80341,\n        \"temperature2\": 76.39319,\n        \"gyroscope\": [7, -1184, 8],\n        \"accelerometer\": [906, 1184, 1461],\n        \"timestamp\": \"150000\",\n        \"random\": \"e954d411fed3f5c0\"\n    },\n    \"signature\": {\n        \"r\": \"4c05a4fa3eba782780a517ba03ef6fdd65e5b560a027808b47fcc6ed2b864169\",\n        \"s\": \"05bde29104febe10c096c550b91f5d8ed2cf0d15fe48e164ee0e9765dda76f34\"\n    }\n}\n```\n\n```\n$ cat pebble.dat\n\n{\"message\":{\"snr\":3,\"vbat\":0.96024,\"latitude\":1608.27036,\"longitude\":15147.14661,\"gasResistance\":3451,\"temperature\":39.17099,\"pressure\":1084.90033,\"humidity\":60.16272,\"light\":1306.92780,\"temperature2\":19.17529,\"gyroscope\":[11,-2638,-13],\"accelerometer\":[2361,2638,2915],\"timestamp\":\"5000\",\"random\":\"3f7e6c358150c30c\"},\"signature\":{\"r\":\"5d1557f43c6aa781e82043f73f84cca9cd06e5eba06b530a9d83d28e89889f38\",\"s\":\"1a79e43825a1f5e48706d8e4eb359c283c8f31fa4f9b37f2200494f8a137a2e4\"}}\n{\"message\":{\"snr\":88,\"vbat\":2.59143,\"latitude\":4628.10452,\"longitude\":2906.98260,\"gasResistance\":6099,\"temperature\":65.62442,\"pressure\":1746.80295,\"humidity\":93.23846,\"light\":1968.83044,\"temperature2\":45.63116,\"gyroscope\":[-1,2,-4570],\"accelerometer\":[4016,4293,4570],\"timestamp\":\"10000\",\"random\":\"0bfc6c9b3363ec67\"},\"signature\":{\"r\":\"d46facce007012e22dbcf47b0e54d8bb07a1dc25d5ad49bf7da62a96157d8741\",\"s\":\"08b65972c616ee6c0cf6f5d501cab49995f4d32b70a908c1d7cac5254ffa63fc\"}}\n...\n{\"message\":{\"snr\":86,\"vbat\":2.48517,\"latitude\":157.96259,\"longitude\":12137.83881,\"gasResistance\":2153,\"temperature\":26.61856,\"pressure\":760.86353,\"humidity\":44.36566,\"light\":982.82999,\"temperature2\":6.62286,\"gyroscope\":[9,-1826,-10],\"accelerometer\":[1549,1826,2104],\"timestamp\":\"25000\",\"random\":\"6b95e9e7a4bcd119\"},\"signature\":{\"r\":\"8bec9b753ae7743f7c6ac9cb51baa5c70f12e9f511c96216975657002b809768\",\"s\":\"4dccd4be89388ba70ef3b498a8c56e1acfad859f73526591b8988a8536d8d70e\"}}\n```\n## How to config private key\n1. Run the simulator.\n```\n./simulator.sh\n```\n2. Select menu '7'. \n   \n3. Select menu '1' if you enter a new private key. Or the simulator automatically generates a private key, select menu '2'.\n   \n4. Now return to the main menu, you can see the configured private key at the end of menu '7'.\n\n## Publish all data\nSince the data has a time stamp, it is necessary to select menu \"3\" to generate new data before publishing the data.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Fpebble-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiotexproject%2Fpebble-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiotexproject%2Fpebble-simulator/lists"}