MagicMirror² module for displaying live data from Google Nest thermostats. It uses the homebridge-nest API client under the hood, giving you quick access to ambient temperature, humidity, operating mode, and HVAC status for every thermostat on your Nest account.
- Tracks multiple Nest thermostats in real time using Google's Smart Device Management API.
- Shows ambient temperature, target temperature (including range mode), humidity, HVAC mode, and current state.
- Built-in loading, empty, and error states to surface configuration issues quickly.
- Simple CSS and Nunjucks template for easy customization.
- A working MagicMirror² installation running on Node.js 16 or higher.
- Google Nest thermostat(s) linked to your Google account.
- Change into your MagicMirror modules directory:
cd ~/MagicMirror/modules
- Clone this repository and install dependencies:
git clone https://github.com/xiujunma/MMM-nest.git cd MMM-nest npm install - Restart MagicMirror so the new module is loaded.
Note: If you prefer to copy the module manually, make sure the final folder name matches the module name
MMM-nest.
- Change into the module directory inside your MagicMirror installation:
cd ~/MagicMirror/modules/MMM-nest
- Pull the latest changes and reinstall dependencies:
git pull npm install
- Restart MagicMirror to apply the update.
Add the module to the modules array in your MagicMirror config/config.js file:
{
module: "MMM-nest",
position: "top_right",
config: {
issueToken: "https://accounts.google.com/...",
cookies: "NID=...; __Secure-3PAPISID=...; ...",
temperatureUnit: "F",
}
},| Option | Type | Required | Description |
|---|---|---|---|
issueToken |
String | Yes | Google Nest issue token URL produced during authentication. |
cookies |
String | Yes | Semicolon-separated cookie string for the same session used to get token. |
temperatureUnit |
String | No | Display hint ("F" or "C"). Conversion defaults to °F if omitted. |
When configuration is incomplete, the module surface an on-screen error and logs the missing keys to the MagicMirror server console.
MMM-nest relies on the homebridge-nest project for Google authentication. Follow its "Using Google Accounts" guide to obtain an issueToken URL and the associated cookies string:
- Open a browser session where you are signed into the Google account linked to your Nest devices.
- Use the developer tools Network tab to capture the
issueTokenendpoint call as described in the homebridge-nest documentation. - Copy the returned
issueTokenURL and the request cookies and paste them into your MagicMirror configuration. - Restart MagicMirror after updating the configuration.
Tokens and cookies can expire, especially after password changes or new logins. If the module stops updating, repeat the steps above to refresh the values.
- Styling lives in
MMM-nest.css; adjust font sizes or colors to match your dashboard. - The layout is rendered with
MMM-nest.njk. You can add or remove fields (e.g., target temperature range) by editing the template. - All thermostat data arrives through the socket interface—check the MagicMirror server logs for payload details when tweaking the UI.
Missing configuration: issueToken, cookies: At least one required token is empty; double-check your config.Loading Nest data…never disappears: Authentication likely failed; refresh tokens or inspect the MagicMirror logs for Nest API errors.- No thermostats displayed: Ensure your Nest account has active devices and that they are shared with the Google profile used for authentication.
Logs appear in the MagicMirror server console; use them to confirm socket notifications or debug data parsing.
- Install dependencies (includes ESLint):
npm install - Run the linter from the module root:
node --run lint - Optionally auto-fix simple issues:
node --run lint -- --fix
MIT © Xiujun Ma
