PC-Pilot — Control your PC from Gladys

Hello everyone!

I’ve developed a small tool to control a Windows or Linux PC directly from Gladys scenes: \\PC-Pilot\\.

It runs as a tray icon on your PC and exposes a local REST API that Gladys can call via HTTP requests.

## What does it do?

\- \\Shut down\\, \\restart\\, \\sleep\\, \\hibernate\\ or \\lock\\ your PC

\- \\Start or stop applications\\ (Firefox, VLC, etc.)

\- \\Run custom commands\\ (backup scripts, etc.)

## How does it work

1\. Install PC-Pilot on the PC to control

2\. Add your Gladys IP to the allowed IPs (from the tray menu, no need to edit a file)

3\. Copy the API token from the tray menu

4\. Create a Gladys scene with an HTTP request action

Example to lock your PC:

| Champ | Valeur |

| ----- | ------ |

| Méthode | \POST\\ |

| URL | \http://\u003cip-du-pc\u003e:7042/api/v1/system/lock\\ |

| Header | \Authorization\\ = \Bearer \u003cyour-token\u003e\\ |

| Header | \Content-Type\\ = \application/json\\ |

| Body | \{}\\ |

\u003e Don’t forget the \{}\\ in the body — Gladys requires it even when the API doesn’t need it.

## Use cases

\- « Turn off the PC » by voice command

\- Lock the PC when leaving the house

\- Launch an application when arriving home

\- Run a scheduled backup

## Security

Everything stays on your local network. Token authentication, IP whitelist, rate limiting, no shell injection possible.

## Links

\- \\GitHub\\ : GitHub - david-digitis/pc-pilot: REST service to control a Windows/Linux PC from a home automation system (Gladys Assistant). Electron tray + Fastify API. · GitHub

\- \\Download (Windows)\\ : Releases · david-digitis/pc-pilot · GitHub

Your feedback is welcome!

1 Like

Linux build available. Tested on Fedora / Wayland

1 Like