Control your PC's power button from Google Home — tap the button in the app or use a voice command. Built on a Raspberry Pi Pico W, a single relay, and SinricPro.
Tap the tile in the Google Home app, or say "Hey Google, turn on my PC"
The Pico W connects to SinricPro over WiFi. When Google Home sends a "turn on" command, the Pico closes a relay for 500 ms — identical to pressing the physical power button. A second wire reads the motherboard's PWR_LED header so Google Home always reflects the real power state, even if the PC was turned on or off manually.
| Item | Notes |
|---|---|
| Raspberry Pi Pico W | Any revision |
| 5V single-channel relay module | SRD-05VDC-SL-C or equivalent |
| 1kΩ resistor | For PWR_LED sense wire |
| Jumper wires |
| Pico W | Relay module | Purpose |
|---|---|---|
| VBUS (Pin 40) | VCC / + | 5V power |
| GND (Pin 38) | GND / − | Ground |
| GP15 (Pin 20) | IN / S | Trigger signal |
Connect the relay output to the motherboard PWR_SW header:
- Relay COM → PWR_SW pin 1
- Relay NO → PWR_SW pin 2
| Pico W | Motherboard | Notes |
|---|---|---|
| GP14 (Pin 19) | PWR_LED + | Via 1kΩ resistor |
| Any GND | PWR_LED − |
The PWR_LED header is usually labelled PWR_LED, PLED, or +PW- on the motherboard, directly next to the PWR_SW header.
- Create a free account at sinric.pro
- Add a new device — type Switch
- Note your App Key, App Secret, and Device ID
- Link the Sinric Pro skill in the Google Home app
- Flash MicroPython firmware onto the Pico W (instructions)
- Open Thonny and connect to the Pico W
- Install the SinricPro library into
/libon the Pico W - Copy
secrets.example.pytosecrets.pyand fill in your credentials:
WIFI_SSID = "your-wifi-name"
WIFI_PASS = "your-wifi-password"
APP_KEY = "..."
APP_SECRET = "..."
DEVICE_ID = "..."- Copy
main.pyandsecrets.pyto the root of the Pico W - Reboot — the Pico W runs
main.pyautomatically on power-up
The onboard LED shows connection state at a glance:
| Pattern | Meaning |
|---|---|
| Slow blink (1 s) | Connecting to WiFi |
| Fast blink (0.2 s) | WiFi up, connecting to SinricPro |
| Rare brief flash | Ready |
Relay stays closed by default (NC relay)
Swap relay.value(1) and relay.value(0) in main.py.
Google Home shows wrong power state Check the PWR_LED wiring. The 1kΩ resistor is required — connecting the header directly to GPIO can damage the Pico.
Device goes offline after a while The watchdog timer will reboot the Pico W automatically if the script freezes. If it keeps dropping, check your router's DHCP lease time and assign a static IP to the Pico.
MIT