{"id":17551065,"url":"https://github.com/ttu/dummy-sensor-server","last_synced_at":"2026-04-09T12:16:39.142Z","repository":{"id":139968245,"uuid":"61485122","full_name":"ttu/dummy-sensor-server","owner":"ttu","description":"REST API and Socket.io server that generates random data in sensor-like format","archived":false,"fork":false,"pushed_at":"2023-05-09T04:12:02.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T20:53:50.097Z","etag":null,"topics":["express","nodejs","socket-io"],"latest_commit_sha":null,"homepage":"http://dummy-sensors.azurewebsites.net/","language":"JavaScript","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/ttu.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":"2016-06-19T14:51:19.000Z","updated_at":"2022-09-16T15:50:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"7d41ce83-593c-4847-979e-66bad883d11c","html_url":"https://github.com/ttu/dummy-sensor-server","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/ttu%2Fdummy-sensor-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttu%2Fdummy-sensor-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttu%2Fdummy-sensor-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttu%2Fdummy-sensor-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttu","download_url":"https://codeload.github.com/ttu/dummy-sensor-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246153972,"owners_count":20732115,"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":["express","nodejs","socket-io"],"created_at":"2024-10-21T04:44:45.932Z","updated_at":"2025-12-30T21:07:27.100Z","avatar_url":"https://github.com/ttu.png","language":"JavaScript","readme":"# Dummy Sensor Server\n\nProvides random sensor-like data\n\n* server\n  * Express REST API \u0026 Socket.io server\n* sensors\n  * BL, starts new background process and keeps track of active sensors\n* sensorProcess\n  * Background process which updates sensor's data periodically\n* sensorModel\n  * Model for sensor\n* weather\n  * Get weather data periodically from Darksky API\n\n## Installation\n\n```sh\nasdf install\nnpm install\nnpm run dev\n```\n\n```sh\n# fetch sensors\ncurl localhost:3000/api/sensor\n# fetch single sensor data\ncurl localhost:3000/api/sensor/abba5\n```\n\n### REST API\n```\nGET /api/sensor\n\u003e\n[\"acdc1\",\"abba5\",\"iddqd\",\"idkfa\"]\n\nGET /api/sensor/abba5\n\u003e\n{ \n    'id': 'abba5',\n    'data': 24.940641212025657,\n    'timestamp': 1466322901825\n}\n\nGET /api/weather\n\u003e\n{ \n    'latitude': 60.192059,\n    'longitude': 24.945831,    \n    'time': 1479744195,\n    'temperature': 7.12,\n    'units': 'si'\n}\n```\n\n### Socket.io\n\nListen for events\n* listen (expected payload: sensorId)\n  * replies with sensorId if sensor is found\n* stop (expected payload: sensorId)\n  * replies with sensorId if sensor is fond\n\nWhen sensor has updated data emit message with sensor's id \n\n## Sample client\n\n* Listen selected sensor's data with socket.io\n* Buffer data with RxJS and reduce buffer to single item\n* Visualize to C3-chart\n\n\n## Depolyment\n\nDeploy to fly.io.\n\n  1. Install [flyctl](https://fly.io/docs/hands-on/install-flyctl/)\n  1. Deploy app\n  ```sh\n  fly launch\n  ```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttu%2Fdummy-sensor-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttu%2Fdummy-sensor-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttu%2Fdummy-sensor-server/lists"}