{"id":50323514,"url":"https://github.com/denniskoch/pypillar","last_synced_at":"2026-05-29T04:03:42.124Z","repository":{"id":347413964,"uuid":"1194013032","full_name":"denniskoch/pypillar","owner":"denniskoch","description":"Raspberry Pi nameplate display designed for a 480×1920 portrait LCD. Shows your name, job title, and live Microsoft Teams presence.","archived":false,"fork":false,"pushed_at":"2026-03-27T20:34:06.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T03:10:20.804Z","etag":null,"topics":["cubicle","fastapi","nameplate","presence","python","teams","workplace"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/denniskoch.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-03-27T20:28:46.000Z","updated_at":"2026-03-27T20:38:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/denniskoch/pypillar","commit_stats":null,"previous_names":["denniskoch/pypillar"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/denniskoch/pypillar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniskoch%2Fpypillar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniskoch%2Fpypillar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniskoch%2Fpypillar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniskoch%2Fpypillar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denniskoch","download_url":"https://codeload.github.com/denniskoch/pypillar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denniskoch%2Fpypillar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33635965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":["cubicle","fastapi","nameplate","presence","python","teams","workplace"],"created_at":"2026-05-29T04:03:41.315Z","updated_at":"2026-05-29T04:03:42.108Z","avatar_url":"https://github.com/denniskoch.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyPillar\n\nA workplace nameplate and presence display for a Raspberry Pi 4 connected to a 480×1920 portrait LCD. Shows your name, job title, and real-time Microsoft Teams availability — pulled live from Microsoft Graph.\n\n![Dark themed display showing name, status, and clock]\n\n---\n\n## Features\n\n- **Live presence** — reflects your Teams status (Available, Busy, Do Not Disturb, Away, etc.)\n- **Free After** — shows end of current busy block when in a meeting (requires `Calendars.Read`)\n- **Ambient glow** — background color shifts with your status\n- **Clock** — 12-hour time with blinking colon and full date\n- **Multi-user** — single server instance handles multiple nameplates via `/{username}`\n- **Zero interaction** — fully automated after boot\n\n---\n\n## Hardware\n\n| Component | Details |\n|---|---|\n| SBC | Raspberry Pi 4 |\n| Display | 480×1920 portrait LCD via HDMI |\n\n---\n\n## Prerequisites\n\n- Python 3.11+\n- An Azure app registration with the following **application** permissions (admin consent required):\n  - `User.Read.All`\n  - `Presence.Read.All`\n  - `Calendars.Read` *(optional — enables the \"Free After\" indicator; omit to skip it)*\n\n### Azure app registration setup\n\n1. Go to **Entra ID → App registrations → New registration**\n2. Add API permissions: `User.Read.All` and `Presence.Read.All` (both **Application** type)\n3. Optionally add `Calendars.Read` (**Application** type) for the Free After feature\n4. Click **Grant admin consent**\n5. Go to **Certificates \u0026 secrets → New client secret** — copy the value immediately\n6. Note the **Application (client) ID** and **Directory (tenant) ID** from the Overview page\n\n---\n\n## Installation\n\n```bash\ncd /opt\ngit clone https://github.com/denniskoch/pypillar.git\ncd pypillar\npython -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\nCopy the example env file and fill in your values:\n\n```bash\ncp .env.example .env\n```\n\n`.env` variables:\n\n| Variable | Description |\n|---|---|\n| `PYPILLAR_CLIENT_ID` | Azure app registration client ID |\n| `PYPILLAR_TENANT_ID` | Azure tenant (directory) ID |\n| `PYPILLAR_CLIENT_SECRET` | Client secret value |\n| `PYPILLAR_DOMAIN` | UPN domain suffix, e.g. `company.com` |\n| `PYPILLAR_COMPANY_NAME` | Company name shown at the top of the display |\n| `PYPILLAR_ALLOWED_SUBNETS` | *(optional)* Comma-separated CIDRs to restrict access, e.g. `10.0.0.0/8,192.168.1.0/24`. Empty = allow all. |\n| `PYPILLAR_TRUST_PROXY` | *(optional)* Set to `1` if behind a reverse proxy to trust `X-Forwarded-For` for subnet checks |\n\n---\n\n## Running\n\n### Docker (recommended)\n\nA `Dockerfile` and `docker-compose.yml` are included for containerised deployments.\n\n```bash\ncp .env.example .env   # fill in your values first\ndocker compose up -d\n```\n\nThis builds the image from source, binds port `8000`, loads `.env`, and restarts automatically unless manually stopped.\n\nTo rebuild after a code change:\n\n```bash\ndocker compose up -d --build\n```\n\n### Bare metal\n\n```bash\nuvicorn server:app --host 0.0.0.0 --port 8000\n```\n\nOpen `http://localhost:8000/{username}` in a browser, where `{username}` is the UPN prefix (e.g. `jsmith` for `jsmith@company.com`). On the Pi, point a fullscreen Chromium window at this address.\n\nAppend `?layout=h` for the horizontal layout variant.\n\n### Autostart on the Pi\n\nCreate a systemd service at `/etc/systemd/system/pypillar.service`:\n\n```ini\n[Unit]\nDescription=pypillar nameplate\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nUser=pi\nWorkingDirectory=/home/pi/pypillar\nEnvironmentFile=/home/pi/pypillar/.env\nExecStart=/home/pi/pypillar/.venv/bin/uvicorn server:app --host 0.0.0.0 --port 8000\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```bash\nsudo systemctl enable pypillar\nsudo systemctl start pypillar\n```\n\nFor a fullscreen Chromium kiosk at boot, add to `/etc/xdg/lxsession/LXDE-pi/autostart`:\n\n```\n@chromium-browser --kiosk --noerrdialogs --disable-infobars http://localhost:8000/jsmith\n```\n\n---\n\n## Presence mapping\n\n| Teams status | Display label | Color |\n|---|---|---|\n| Available | Available | Green |\n| Busy | In a Meeting | Red |\n| DoNotDisturb | Do Not Disturb | Red |\n| BeRightBack | Be Right Back | Amber |\n| Away | Away | Amber |\n| Offline | Offline | Amber |\n| PresenceUnknown | Offline | Amber |\n| Out of Office* | Out of Office | Purple |\n\n\\* OOF is detected via `outOfOfficeSettings.isOutOfOffice` and takes precedence over the reported availability value, so it displays correctly even when Teams reports a different underlying status (e.g. Offline with OOO left on).\n\nWhen `workLocation` is `remote`, a **Remote** badge is appended to the label for: Available, Busy, DoNotDisturb, BeRightBack, and Away.\n\nWhen presence is Busy or DoNotDisturb and `Calendars.Read` is granted, a **Free After** time is shown beneath the status label indicating the end of the current contiguous busy block.\n\n---\n\n## Project structure\n\n```\npypillar/\n├── server.py            # FastAPI backend — MSAL auth, Graph polling, routing\n├── requirements.txt\n├── .env.example\n├── Dockerfile\n├── docker-compose.yml\n└── static/\n    ├── index-v.html     # Portrait layout (480×1920)\n    ├── index-h.html     # Landscape layout\n    ├── style-v.css      # Portrait styles\n    ├── style-h.css      # Landscape styles\n    ├── script.js        # API polling, clock, name auto-fit\n    └── error.html       # Shown at / when no username is provided\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenniskoch%2Fpypillar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenniskoch%2Fpypillar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenniskoch%2Fpypillar/lists"}