{"id":22963800,"url":"https://github.com/ivarprudnikov/rpi-speedtest","last_synced_at":"2025-08-13T08:30:49.008Z","repository":{"id":44062154,"uuid":"214431537","full_name":"ivarprudnikov/rpi-speedtest","owner":"ivarprudnikov","description":"Network speedtest for Raspberry Pi with Lambda API and simple data preview","archived":false,"fork":false,"pushed_at":"2023-01-24T00:42:50.000Z","size":460,"stargazers_count":0,"open_issues_count":25,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T14:49:30.951Z","etag":null,"topics":["apex-up","aws-lambda","nodejs","raspberry-pi","speedtest"],"latest_commit_sha":null,"homepage":"https://speed-test.lila.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivarprudnikov.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":"2019-10-11T12:31:52.000Z","updated_at":"2020-07-12T21:12:09.000Z","dependencies_parsed_at":"2023-02-13T05:55:22.730Z","dependency_job_id":null,"html_url":"https://github.com/ivarprudnikov/rpi-speedtest","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivarprudnikov%2Frpi-speedtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivarprudnikov%2Frpi-speedtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivarprudnikov%2Frpi-speedtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivarprudnikov%2Frpi-speedtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivarprudnikov","download_url":"https://codeload.github.com/ivarprudnikov/rpi-speedtest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229749269,"owners_count":18118319,"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":["apex-up","aws-lambda","nodejs","raspberry-pi","speedtest"],"created_at":"2024-12-14T19:39:56.551Z","updated_at":"2024-12-14T19:39:56.973Z","avatar_url":"https://github.com/ivarprudnikov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpi-speedtest\n\n[![Actions Status](https://github.com/ivarprudnikov/rpi-speedtest/workflows/Node%20CI/badge.svg)](https://github.com/ivarprudnikov/rpi-speedtest/actions)\n\nNetwork speedtest script to be run on Raspberry Pi\n\n## On Raspberry\n\n### Installation\n\n**Assumes you have API server deployed already.**\n\n- Connect to network ([WiFi setup docs](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md))\n- Install NodeJS for correct ARM version (`uname -m`)\n  - [Select node version binary hat supports ARM version](https://nodejs.org/en/download/)\n- `$ git clone $url/rpi-speedtest.git`\n- `$ cd rpi-speedtest`\n- `$ npm i`\n- Modify [config file](./config.json)\n\n*Verify it works*\n\n```shell script\n$ node bin/index.js\n91.40834570638205\nok 200\n```\n\n[*Setup CRON*](https://www.raspberrypi.org/documentation/linux/usage/cron.md)\n\n- Open editor mode `crontab -e`\n- Add something like `15 * * * * /usr/local/bin/node /home/pi/rpi-speedtest/bin/index.js` to run the script every 15th minute. Safest way is to puth full path to node installation.\n\n*Caveats*\n\n- I was testing on _Raspbian_ which has cron logs disabled by default, make your call, for me it is not necessary.\n- I did have `node` and `npm` preinstalled on _Raspbian_, make sure you have those installed and available in `PATH`.\n\n## API server\n\n### Running locally\n\n*AWS credentials*\n\nExport AWS credentials for DynamoDB queries/inserts to work locally:\n- Use profile: \n```\n$ export AWS_PROFILE=myprofilename\n```\n- or use key/secret \n```\n$ export AWS_ACCESS_KEY_ID=xxx\n$ export AWS_SECRET_ACCESS_KEY=yyy\n```\n- or whatever else AWS tells you to use with its SDKs\n\n*API server*\n\nTo start locally `$ npm start`\n\n### Testing\n\nTo test `$ npm test` which will run eslint and any tests present\n\n### Deployment\n\n- Modify [config file](./up.json)\n- To deploy to production run `$ up production`\n\nUses `up` to set up AWS Lambda, config lives in `up.json`. Refer to their docs for further usage info in docs [apex.sh/docs/up/](https://apex.sh/docs/up/) or in their repo [github.com/apex/up](https://github.com/apex/up)\n\n## DynamoDB\n\nExpecting simple table holding `deviceId` as a main partition key combined with a sort key `timestamp` and actual data sitting in `payload` column which expects Map structure.\n\n```\nPrimary partition key\n\tdeviceId (String)\nPrimary sort key\n\ttimestamp (Number)\nRead/write capacity mode\n\tOn-Demand\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivarprudnikov%2Frpi-speedtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivarprudnikov%2Frpi-speedtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivarprudnikov%2Frpi-speedtest/lists"}