Skip to main content

Companion CLI for https://wakemypc.com (WakeMyPC) -- flash, provision, and manage Pico W transmitters from your terminal. WakeMyPC is a website that lets you turn on you PC remotely from anywhere in the world using Wake-on-Lan.

Project description

WakeMyPC

Companion CLI for wakemypc.com.

Runs on your computer, talks to a Pi Pico W (or W 2) over USB, and your wakemypc.com account over HTTPS.

Install

Create a virtual environment.

python -m venv .venv

Activate virtual environment.

source .venv/bin/activate #linux/MacOS
.venv\Scripts\Activate.bat #Command prompt
.\.venv\Scripts\Activate.ps1 #Powershell

Use pip:

pip install wakemypc

Verify:

wakemypc --help

On Linux you may need to add yourself to the dialout group so you can talk to the Pico's serial port without sudo:

sudo usermod -a -G dialout $USER
# log out and back in

What it does

wakemypc detect           # list connected Picos (flashed and BOOTSEL-mode)
wakemypc flash --uf2     # write MicroPython firmware to a BOOTSEL Pico
wakemypc upload          # copy wakemypc-firmware .py files onto the Pico
wakemypc provision       # write WiFi creds + server URL to secrets.json
wakemypc register        # register with the server, get a device token
wakemypc restart          # soft-reboot the Pico (or reboot into BOOTSEL)
wakemypc identify         # blink the Pico's LED to find it physically usefull when multiple pico(s) connected
wakemypc status           # read WiFi state + secrets summary over USB
wakemypc logs             # Read logs from Pico over USB serial connection 

wakemypc --help and wakemypc <subcommand> --help have the full reference.

First Setup

The most common flow for a brand new Pico is:

# 1) Plug Pico in BOOTSEL mode (hold BOOTSEL while connecting USB).
wakemypc detect
wakemypc flash --uf2 RPI_PICO2_W-…uf2

# 2) Plug the now-flashed Pico to upload latest firmware from GitHub.
wakemypc upload --github

# 3) Configure WiFi + server.
wakemypc provision --add-new-wifi --wifi-ssid HomeWiFi --wifi-pass mypassword

# 4) Register on wakemypc.com.
wakemypc register --username username --password mypassword 
# or 
# Use Token based registeration When using Goggle SignIn (Future versions will support login through browsers)
wakemypc register --token <Token> # Check

Auth Token registeration (Manual)

Register the token offline when

  • You obtained the auth token by manually registering Pico device on dashboard
wakemypc register --token <Token>

This doesn't require any username or password. The Pico will automatically communicate with the server if the Pico is registered on Transmitters on the dashboard.

Token rotation

In the event that you'd like to rotate the auth token used while authenticating with the server.

Two modes:

wakemypc register --username  --password  --rotate   # rotate existing
wakemypc register --token <T>                                                          # offline, no server call

--rotate calls the server's rotate-token endpoint and writes the new token to the Pico in one step.

--token <T> skips the server -- handy when you've already rotated through the dashboard and just need to push the new token over USB.

What this CLI does NOT do

  • It does not need root / sudo (apart from the one-time dialout group add on Linux).
  • It does not support Pico Token registeration through dashboard yet. The only network calls go to the api url with username and passwordthat you pass to register.
  • It does not store your password. Login uses the JWT the api server returns; the password is forwarded once and then forgotten.

License

Source-available, non-commercial. PolyForm Noncommercial 1.0.0.

You can run it, audit it, modify it, and share patches. You can't sell it or run a paid service on top of it. Patches welcome.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wakemypc-1.2.2.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wakemypc-1.2.2-py3-none-any.whl (49.5 kB view details)

Uploaded Python 3

File details

Details for the file wakemypc-1.2.2.tar.gz.

File metadata

  • Download URL: wakemypc-1.2.2.tar.gz
  • Upload date:
  • Size: 47.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wakemypc-1.2.2.tar.gz
Algorithm Hash digest
SHA256 2aba60a069d34d33203a330bc75a85fdd0e72e59b56068a034c4f13f1eef7795
MD5 1f3c6a23249ec9c1b0e7b9d4b99f0e0f
BLAKE2b-256 1f0174cc2470425fc83ad72b1cd9bb6ba598fae5585a1ff425f8757475944406

See more details on using hashes here.

Provenance

The following attestation bundles were made for wakemypc-1.2.2.tar.gz:

Publisher: publish.yml on vipulksh/wakemypc-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wakemypc-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: wakemypc-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 49.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wakemypc-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 932cc63fefcd28140f5f1af23107c1ffff9fb4f598675955ae7a42b8a7f9c874
MD5 db5826786aa9b9e7c0433c890cbe8c07
BLAKE2b-256 c9f7abbaad1e326edb17d48f77bf4de3cc4e5409ac09a84bf6463862a3e89bbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for wakemypc-1.2.2-py3-none-any.whl:

Publisher: publish.yml on vipulksh/wakemypc-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page