{"id":51841687,"url":"https://github.com/cocool97/subway_display","last_synced_at":"2026-07-23T06:01:51.623Z","repository":{"id":371009031,"uuid":"1298274582","full_name":"cocool97/subway_display","owner":"cocool97","description":null,"archived":false,"fork":false,"pushed_at":"2026-07-12T16:39:55.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-12T18:11:39.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/cocool97.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-12T12:45:56.000Z","updated_at":"2026-07-12T16:40:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cocool97/subway_display","commit_stats":null,"previous_names":["cocool97/subway_display"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cocool97/subway_display","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocool97%2Fsubway_display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocool97%2Fsubway_display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocool97%2Fsubway_display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocool97%2Fsubway_display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cocool97","download_url":"https://codeload.github.com/cocool97/subway_display/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cocool97%2Fsubway_display/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35791261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-23T02:00:06.683Z","response_time":57,"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":[],"created_at":"2026-07-23T06:01:50.478Z","updated_at":"2026-07-23T06:01:51.618Z","avatar_url":"https://github.com/cocool97.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# subway_display\n\n\u003e Project built in Rust aiming to mimic the Paris subway displays using a Raspberry Pi and an ESP-32 microcontroller.\n\n## Server\n\nIt listens on **TCP** for incoming connections from the microcontroller and regularly sends subway arrivals data as well as the current hour over the network.\n\nOnce the microcontroller is connected, the server will keep the connection open and send data as long as the it is connected, every `POLL_INTERVAL_SECS` seconds.\n\nIn current version the server only supports one client at a time.\n\nIt uses the [PRIM API](https://prim.iledefrance-mobilites.fr/fr) to fetch next subway arrivals.\nAn API key is required and can be obtained [here](https://prim.iledefrance-mobilites.fr/fr/mes-jetons-authentification) (registration needed). This key has to be passed as an environment variable `PRIM_API_KEY`.\n\nThe API endpoint used is based on two values:\n\n- MonitoringRef: Representing the station to monitor (1 station per direction)\n- LineRef: The line to monitor\n\nKnown values for MonitoringRef and LineRef can be found [here](https://prim.iledefrance-mobilites.fr/fr/jeux-de-donnees/arrets-lignes) (`stop_id` for stations/directions and `route_id` for lines).\nFor example, for Ligne 13 Station 'Gabriel-Péri' direction Chatillon-Montrouge, the values are respectively `STIF:StopPoint:Q:462953:` and `STIF:Line::C01383:`.\n\n\u003e [!warning]\n\u003e By default the API only allows for 1000 requests per day but can be increased if asked for.\n\u003e Current usage can be checked [here](https://prim.iledefrance-mobilites.fr/fr/ma-consommation-api)\n\nTo build the server container, run:\n\n```bash\npodman build -t subway_server:latest -f Dockerfile .\n```\n\nA `docker-compose.yml` is also provided to easily setup the server:\n\n```bash\npodman-compose -f podman-compose.yml up -d\n```\n\n## Microcontroller a.k.a. \"Client\"\n\nTODO\n\nEnv:\n\nWIFI_SSID\nWIFI_PASSWORD\n\n## Communication protocol\n\nThe protocol used to communicate between the server and the microcontroller is a basic custom binary protocol. It has been designed to be very light to keep the microcontroller power consumption as low as possible.\n\nThe protocol's code is available in `proto/` directory, with a `no_std` contrainst to be usable on the microcontroller. \n\nIt contains a message type over **1 byte** and a variable-length payload depending on the message type.\n\n| Message Type |                                                       Meaning                                                        | Payload Length |\n| :----------: | :------------------------------------------------------------------------------------------------------------------: | :------------: |\n|    `0x00`    |                                       Provides the current hour (from 0 to 23)                                       |     1 byte     |\n|    `0x01`    | Provides the **two** next subway arrivals in minutes (1 byte each). A value of 255 indicates an error or no arrival. |    2 bytes     |\n\n## Final display\n\nTODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcocool97%2Fsubway_display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcocool97%2Fsubway_display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcocool97%2Fsubway_display/lists"}