{"id":16095680,"url":"https://github.com/rigwild/raspberry-instock-check","last_synced_at":"2025-07-27T18:12:51.846Z","repository":{"id":37994201,"uuid":"464192677","full_name":"rigwild/raspberry-instock-check","owner":"rigwild","description":"🔔 Get an alert on Telegram when there are Raspberry in stock ready to buy","archived":false,"fork":false,"pushed_at":"2023-12-16T21:59:24.000Z","size":309,"stargazers_count":50,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-02T08:47:44.783Z","etag":null,"topics":["alert","raspberry","raspberry-pi","scalping","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/raspberry_alert","language":"TypeScript","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/rigwild.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":"2022-02-27T16:37:33.000Z","updated_at":"2024-10-12T01:01:43.000Z","dependencies_parsed_at":"2023-12-16T23:00:12.074Z","dependency_job_id":null,"html_url":"https://github.com/rigwild/raspberry-instock-check","commit_stats":{"total_commits":74,"total_committers":2,"mean_commits":37.0,"dds":"0.013513513513513487","last_synced_commit":"43152b778f6d40bffae07b3f9c61edfebb865e2e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rigwild/raspberry-instock-check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigwild%2Fraspberry-instock-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigwild%2Fraspberry-instock-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigwild%2Fraspberry-instock-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigwild%2Fraspberry-instock-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rigwild","download_url":"https://codeload.github.com/rigwild/raspberry-instock-check/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rigwild%2Fraspberry-instock-check/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267400520,"owners_count":24081183,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":["alert","raspberry","raspberry-pi","scalping","telegram","telegram-bot"],"created_at":"2024-10-09T17:07:43.465Z","updated_at":"2025-07-27T18:12:51.793Z","avatar_url":"https://github.com/rigwild.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry instock check bot\n\nGet an alert on Telegram when there are Raspberry in stock ready to buy. This bot uses [rpilocator](https://rpilocator.com/) to check for stock updates.\n\nJoin the public Telegram channel to get notifications! [@raspberry_alert](https://t.me/raspberry_alert/35)\n\nWe also mirror the content of the [rpilocator](https://rpilocator.com/) website on this public API endpoint: [raspberry.rigwild.dev](https://raspberry.rigwild.dev)\n\n🌟 Star the project if we helped you get a Raspberry! 🙏\n\n## Features\n\n- Send an alert when a new Raspberry is in stock\n\n![screenshot](./screenshot.png)\n\n- Live update a message with currently in stock Raspberry\n\n![screenshot live update](./screenshot-live.png)\n\n- API showing current rpilocator stock\n\n## Install\n\n```sh\npnpm i\n```\n\n## Build\n\n```sh\npnpm build\n```\n\n## Run\n\n```sh\nTELEGRAM_TOKEN=\u003ctelegram_bot_token\u003e \\\nTELEGRAM_ADMIN_CHAT_ID=\u003ctelegram_chat_id_where_to_send_debug_info\u003e \\\nTELEGRAM_CHAT_ID=\u003ctelegram_chat_id_where_to_send_alerts\u003e \\\nTELEGRAM_CURRENTLY_IN_STOCK_MESSAGE_ID=\u003ctelegram_message_id_to_live_update_current_stock\u003e \\\nUSE_DIRECT_PRODUCT_LINK=1 \\\nSEARCHED_RASPBERRY_MODELS=RPI4-MODBP-4GB,RPI4-MODBP-8GB \\\nPROXY=http://user:pass@123.123.123.123:51234 \\\nCHECK_INTERVAL=30000 \\\npnpm start\n```\n\n| Environment variable                     | Required | Description                                                                                        |\n| ---------------------------------------- | :------: | -------------------------------------------------------------------------------------------------- |\n| `TELEGRAM_TOKEN`                         |    ✅    | Telegram bot token                                                                                 |\n| `TELEGRAM_ADMIN_CHAT_ID`                 |    ✅    | Telegram chat id where to send error messages (can be the same as `TELEGRAM_CHAT_ID`)              |\n| `TELEGRAM_CHAT_ID`                       |    ✅    | Telegram chat id where to send stock alerts and update the live stock update message               |\n| `TELEGRAM_CURRENTLY_IN_STOCK_MESSAGE_ID` |          | Telegram message id to update with the current stock                                               |\n| `USE_DIRECT_PRODUCT_LINK`                |          | Should the products links be direct product links? (if `0`, will send rpilocator link)             |\n| `USE_CACHED_REQUEST`                     |          | Load data from file system instead of sending requests (use if you have one other checker running) |\n| `SEARCHED_RASPBERRY_MODELS`              |          | List of Raspberry models to look for, separated by a `,`. If omitted, will look for all models     |\n| `PROXY`                                  |          | Proxy to use to fetch data from rpilocator                                                         |\n| `CHECK_INTERVAL`                         |          | Check interval in ms, checking too often might get you rate-limited (default is `60000`)           |\n| `API_RUN`                                |          | Start the API server                                                                               |\n| `API_PORT`                               |          | API server port                                                                                    |\n| `API_TRUST_PROXY`                        |          | Enable if server is ran behind a reverse proxy, for the rate limit                                 |\n\nTo get the `TELEGRAM_CURRENTLY_IN_STOCK_MESSAGE_ID`:\n\n- Right click on the message you want to be updated (message must be in the `TELEGRAM_CHAT_ID` channel)\n- Copy message link\n- Take the number at the end\n\nTo get a Telegram chat id:\n\n- Use [@RawDataBot](https://stackoverflow.com/a/46247058)\n- If it's a public channel, use the public @: `TELEGRAM_CHAT_ID='@raspberry_alert'`\n\n## Run with auto-restart\n\nUse [PM2](https://pm2.keymetrics.io/)\n\n```sh\npnpm build\nTELEGRAM_TOKEN=\u003ctelegram_bot_token\u003e \u003cother variables\u003e pm2 start dist/index.js\n```\n\nSee logs\n\n```sh\npm2 logs\n```\n\nKill\n\n```sh\npm2 delete all\n```\n\n## Run with Docker\n\nUse [Docker](https://docker.com)\n\n```sh\ndocker build -t raspberry-instock-check .\ndocker run -d -e TELEGRAM_TOKEN='...' -e TELEGRAM_CHAT_ID='...' -e TELEGRAM_ADMIN_CHAT_ID='...' raspberry-instock-check\n```\n\n## Test\n\nTo simulate some alerts to see if it's working, set the environment variable `NODE_ENV=test`.\n\n## List of Raspberry models\n\n| Model (SKU)      | Description                            |\n| ---------------- | -------------------------------------- |\n| `CM3-Lite`       | RPi CM3 - 1GB RAM, No MMC              |\n| `CM3+16GB`       | RPi CM3+ - 1GB RAM, 16GB MMC           |\n| `CM3+32GB`       | RPi CM3+ - 1GB RAM, 32GB MMC           |\n| `CM3+8GB`        | RPi CM3+ - 1GB RAM, 8GB MMC            |\n| `CM3+Lite`       | RPi CM3+ - 1GB RAM, No MMC             |\n| `CM4001000`      | RPi CM4 - 1GB RAM, No MMC, No Wifi     |\n| `CM4001008`      | RPi CM4 - 1GB RAM, 8GB MMC, No Wifi    |\n| `CM4001016`      | RPi CM4 - 1GB RAM, 16GB MMC, No Wifi   |\n| `CM4001032`      | RPi CM4 - 1GB RAM, 32GB MMC, No Wifi   |\n| `CM4002000`      | RPi CM4 - 2GB RAM, No MMC, No Wifi     |\n| `CM4002008`      | RPi CM4 - 2GB RAM, 8GB MMC, No Wifi    |\n| `CM4002016`      | RPi CM4 - 2GB RAM, 16GB MMC, No Wifi   |\n| `CM4002032`      | RPi CM4 - 2GB RAM, 32GB MMC, No Wifi   |\n| `CM4004000`      | RPi CM4 - 4GB RAM, No MMC, No Wifi     |\n| `CM4004008`      | RPi CM4 - 4GB RAM, 8GB MMC, No Wifi    |\n| `CM4004016`      | RPi CM4 - 4GB RAM, 16GB MMC, No Wifi   |\n| `CM4004032`      | RPi CM4 - 4GB RAM, 32GB MMC, No Wifi   |\n| `CM4008000`      | RPi CM4 - 8GB RAM, No MMC, No Wifi     |\n| `CM4008008`      | RPi CM4 - 8GB RAM, 8GB MMC, No Wifi    |\n| `CM4008016`      | RPi CM4 - 8GB RAM, 16GB MMC, No Wifi   |\n| `CM4008032`      | RPi CM4 - 8GB RAM, 32GB MMC, No Wifi   |\n| `CM4101000`      | RPi CM4 - 1GB RAM, No MMC, With Wifi   |\n| `CM4101008`      | RPi CM4 - 1GB RAM, 8GB MMC, With Wifi  |\n| `CM4101016`      | RPi CM4 - 1GB RAM, 16GB MMC, With Wifi |\n| `CM4101032`      | RPi CM4 - 1GB RAM, 32GB MMC, With Wifi |\n| `CM4102000`      | RPi CM4 - 2GB RAM, No MMC, With Wifi   |\n| `CM4102008`      | RPi CM4 - 2GB RAM, 8GB MMC, With Wifi  |\n| `CM4102016`      | RPi CM4 - 2GB RAM, 16GB MMC, With Wifi |\n| `CM4102032`      | RPi CM4 - 2GB RAM, 32GB MMC, With Wifi |\n| `CM4104000`      | RPi CM4 - 4GB RAM, No MMC, With Wifi   |\n| `CM4104008`      | RPi CM4 - 4GB RAM, 8GB MMC, With Wifi  |\n| `CM4104016`      | RPi CM4 - 4GB RAM, 16GB MMC, With Wifi |\n| `CM4104032`      | RPi CM4 - 4GB RAM, 32GB MMC, With Wifi |\n| `CM4108000`      | RPi CM4 - 8GB RAM, No MMC, With Wifi   |\n| `CM4108008`      | RPi CM4 - 8GB RAM, 8GB MMC, With Wifi  |\n| `CM4108016`      | RPi CM4 - 8GB RAM, 16GB MMC, With Wifi |\n| `CM4108032`      | RPi CM4 - 8GB RAM, 32GB MMC, With Wifi |\n| `RPI3-MODAP`     | RPi 3 Model A+ - 512MB RAM             |\n| `RPI3-MODB`      | RPi 3 Model B - 1GB RAM                |\n| `RPI3-MODBP`     | RPi 3 Model B+ - 1GB RAM               |\n| `RPI4-MODBP-1GB` | RPi 4 Model B - 1GB RAM                |\n| `RPI4-MODBP-2GB` | RPi 4 Model B - 2GB RAM                |\n| `RPI4-MODBP-4GB` | RPi 4 Model B - 4GB RAM                |\n| `RPI4-MODBP-8GB` | RPi 4 Model B - 8GB RAM                |\n| `SC0020`         | Raspberry Pi Zero W                    |\n| `SC0020WH`       | Raspberry Pi Zero W (w/ headers)       |\n| `SC0510`         | Raspberry Pi Zero 2 W                  |\n| `SC0510WH`       | Raspberry Pi Zero 2 W (w/ headers)     |\n\n## License\n\n```\nCopyright (c) rigwild\n\nThis license is granted to everyone except for the following entities and\nany of their subsidiaries:\n\n- \"rpilocator\"\n- \"camerahacks\"\n- \"DPHacks\"\n\nMIT License\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigwild%2Fraspberry-instock-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frigwild%2Fraspberry-instock-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frigwild%2Fraspberry-instock-check/lists"}