{"id":51100716,"url":"https://github.com/timothyf/nest-control","last_synced_at":"2026-06-24T10:03:46.804Z","repository":{"id":365786577,"uuid":"1270477695","full_name":"timothyf/nest-control","owner":"timothyf","description":"A web app to monitor and control a Nest thermostat.","archived":false,"fork":false,"pushed_at":"2026-06-18T21:08:58.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T23:09:08.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/timothyf.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-06-15T18:48:18.000Z","updated_at":"2026-06-18T21:09:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/timothyf/nest-control","commit_stats":null,"previous_names":["timothyf/nest-control"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/timothyf/nest-control","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothyf%2Fnest-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothyf%2Fnest-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothyf%2Fnest-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothyf%2Fnest-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timothyf","download_url":"https://codeload.github.com/timothyf/nest-control/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothyf%2Fnest-control/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34724765,"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-06-24T02:00:07.484Z","response_time":106,"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-06-24T10:03:45.977Z","updated_at":"2026-06-24T10:03:46.792Z","avatar_url":"https://github.com/timothyf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nest-control\n\nA web app to monitor and control a Nest thermostat, with live weather data.\n\n## Stack\n\n| Layer    | Technology |\n|----------|------------|\n| Backend  | Node.js 18+ · Express 5 |\n| Frontend | Vue 3 · Vite 8 · Vue Router · Pinia |\n| Nest API | Google Smart Device Management (SDM) API |\n| Weather  | [Open-Meteo](https://open-meteo.com) (free, no API key required) |\n\n---\n\n## Project Structure\n\n```\nnest-control/\n├── backend/              Node.js/Express API server\n│   ├── src/\n│   │   ├── index.js      App entry point\n│   │   ├── routes/\n│   │   │   ├── nest.js   Nest thermostat endpoints\n│   │   │   └── weather.js Weather endpoints\n│   │   └── services/\n│   │       ├── nestService.js    Google SDM API client\n│   │       └── weatherService.js Open-Meteo API client\n│   └── .env.example\n└── frontend/             Vue 3 / Vite SPA\n    ├── src/\n    │   ├── components/\n    │   │   ├── ThermostatCard.vue\n    │   │   └── WeatherCard.vue\n    │   ├── stores/\n    │   │   ├── nestStore.js\n    │   │   └── weatherStore.js\n    │   ├── services/api.js\n    │   ├── views/DashboardView.vue\n    │   ├── router/index.js\n    │   ├── App.vue\n    │   └── main.js\n    └── .env.example\n```\n\n---\n\n## Setup\n\n### 1. Install dependencies\n\n```bash\nnpm run install:all\n```\n\n### 2. Configure environment variables\n\n**Backend** — copy and edit:\n```bash\ncp backend/.env.example backend/.env\n```\n\n| Variable | Description |\n|----------|-------------|\n| `PORT` | Server port (default `3000`) |\n| `NEST_PROJECT_ID` | Google Device Access project ID |\n| `NEST_CLIENT_ID` | OAuth 2.0 client ID |\n| `NEST_CLIENT_SECRET` | OAuth 2.0 client secret |\n| `NEST_REFRESH_TOKEN` | OAuth 2.0 refresh token |\n| `WEATHER_LATITUDE` | Latitude for weather (default: San Francisco) |\n| `WEATHER_LONGITUDE` | Longitude for weather (default: San Francisco) |\n\n**Frontend** — copy and edit (optional; the Vite dev proxy handles this automatically):\n```bash\ncp frontend/.env.example frontend/.env\n```\n\n---\n\n## Obtaining Nest OAuth Credentials\n\n1. Visit [Google Device Access Console](https://console.nest.google.com/device-access) and create a project.\n2. Enable the Smart Device Management API in [Google Cloud Console](https://console.cloud.google.com).\n3. Create OAuth 2.0 credentials (Web application) and note the **Client ID** and **Client Secret**.\n4. Complete the [OAuth authorization flow](https://developers.google.com/nest/device-access/authorize) to obtain a **Refresh Token**.\n5. Place all four values in `backend/.env`.\n\n---\n\n## Running in Development\n\nStart the backend and frontend concurrently:\n\n```bash\nnpm run dev\n```\n\nOr in separate terminals:\n```bash\nnpm run dev:backend   # http://localhost:3001\nnpm run dev:frontend  # http://localhost:5173\n```\n\nThe Vite dev server proxies all `/api/*` requests to the backend automatically.\n\n---\n\n## API Reference\n\n### Health\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/api/health` | Server health check |\n\n### Nest Thermostat\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/api/nest/devices` | List all Nest devices |\n| GET | `/api/nest/devices/:deviceId` | Get a single device |\n| POST | `/api/nest/devices/:deviceId/temperature` | Set heat/cool setpoints |\n| POST | `/api/nest/devices/:deviceId/mode` | Set thermostat mode |\n\n**Set temperature** body:\n```json\n{ \"heatCelsius\": 20, \"coolCelsius\": 24 }\n```\n\n**Set mode** body — `mode` must be one of `HEAT`, `COOL`, `HEATCOOL`, `OFF`:\n```json\n{ \"mode\": \"HEATCOOL\" }\n```\n\n### Weather\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | `/api/weather/current` | Current conditions |\n| GET | `/api/weather/forecast` | 7-day daily forecast |\n\n---\n\n## Production Build\n\n```bash\nnpm run build     # Builds frontend to frontend/dist/\nnpm run start     # Starts the backend server\n```\n\nServe `frontend/dist/` with any static file host, or configure Express to serve it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothyf%2Fnest-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothyf%2Fnest-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothyf%2Fnest-control/lists"}