Offline Device Task Scheduler for Raspberry Pi Pico W
PicoScheduler is a fully offline automation system built for the Raspberry Pi Pico W. It enables you to control GPIO devices and schedule tasks through a simple web interface—all without requiring internet connectivity, external servers, or a router. The system stores all tasks, device configurations, and persisted time in JSON files, ensuring your setup survives reboots.
- Fully Offline Operation — Functions independently without internet, router, or cloud services
- Browser-Based Interface — The Pico W creates a Wi-Fi Access Point for direct browser control
- Persistent Storage — Tasks, devices, and RTC time are stored in JSON files and survive power loss
- GPIO Device Control — Compatible with LEDs, relays, pumps, motors, and other GPIO-controlled devices
- Single Task per Device — Prevents multiple overlapping tasks for the same device
- Flexible Task Management — Create and delete one-time or daily recurring schedules
- Dynamic Device Creation — Add new devices directly from the UI without code modifications
- Automatic Time Synchronization — Receives local time from your browser on connection
- Internal Time Tracking — Maintains accurate time using MicroPython's internal timer after initial sync
The Raspberry Pi Pico W does not include a hardware Real-Time Clock (RTC). PicoScheduler addresses this through a hybrid approach:
- When you open the web interface, your browser transmits the current local time to the Pico
- The Pico sets its internal clock based on this synchronized time
- After synchronization, the Pico maintains time offline using MicroPython's millisecond timer (
utime.ticks_ms()) - In the event of power loss, the Pico resets to 00:00 until you reconnect to the interface
- The Pico persists the last set time in
time.jsonso it can restore the RTC on next boot
This design eliminates the need for internet connectivity, NTP servers, or external RTC hardware.
- Immediate offline functionality
- No network infrastructure required
- Persistent device, task, and time storage
- Built on MicroPython for easy customization
- Ideal for automation in remote locations, agricultural applications, laboratory equipment, and offline IoT projects
- Home automation (lighting, ventilation, relay control)
- Agricultural irrigation and grow room automation
- Laboratory equipment timing and control
- Offline IoT automation projects
- Educational and student projects
- Timed relay-based systems
PicoScheduler/
│
├── main.py # Web server, scheduler, and GPIO control logic
├── tasks.json # Auto-generated persistent task storage
├── devices.json # Auto-generated persistent device storage
├── time.json # Auto-generated RTC persistence storage
├── README.md
└── LICENSE
Download the latest MicroPython firmware for Pico W and flash it using BOOTSEL mode.
Upload main.py to your Pico W using Thonny or your preferred method. The tasks.json, devices.json, and time.json files will be generated automatically on first run.
- Power up the Pico W
- Connect to the Access Point:
- SSID:
PicoW_Scheduler - Password:
12345678
- SSID:
- Open your browser and navigate to:
http://192.168.4.1 - Your browser will automatically send the current time to the Pico
- The system is now fully operational offline
Displays the synchronized local time provided by your browser.
- Create new scheduled tasks (one task per device enforced)
- Delete existing tasks
- Configure one-time or daily recurring schedules
- Add devices by specifying name and GPIO pin
- Control relays and LEDs directly
- Remove user-added devices
All data is stored locally on the Pico W:
tasks.json— Stores all scheduled tasksdevices.json— Stores all device configurationstime.json— Stores last synchronized time for RTC restoration
Files are updated immediately upon any changes, ensuring data integrity even in the event of unexpected power loss.
Pico W
│
├── GPIO 15 → LED/Relay
└── GND
- Add device: "Bedroom Lamp" on GPIO 15
- Create schedule: Turn ON at 18:00, Turn OFF at 22:00
- System runs indefinitely offline after initial time synchronization
- Time tracking resets to 00:00 after power loss until the next interface connection
- After reconnection, the Pico restores accurate time from
time.jsonand maintains it offline - Device configurations and task data remain saved regardless of power loss
- Hardware RTC module support
- Enhanced UI design
- Weekly and monthly scheduling options
- Sensor integration and conditional automation
- Task execution logging
- Backup and restore utilities
Contributions are welcome. Please submit pull requests or open issues for bugs and feature requests.
This project is licensed under the MIT License.
- MicroPython
- Raspberry Pi Foundation
If you find this project useful, please consider starring the repository on GitHub.