Notifications
Clear all

How to interact programmatically with the witty pi 5 from the raspberry pi ?

5 Posts
2 Users
0 Reactions
44 Views
(@dynalogic)
Posts: 4
Active Member Customer
Topic starter
 

Hi :),

I have read the user manual ( https://www.uugear.com/doc/WittyPi5_UserManual.pdf) for wittypi 5.

Bought a few to test upgrading our wittypi4 fleet. What is the recommended way to interact  with the wittypi5 from the pi itself ?

To be more specific one simple example is having a .wpi script on the pi itself, and wanting to "upload" it to the wittypi5. The doc seems to say you have to turn off the pi, physically plug it to a computer and upload the .wpi script to the schedule folder then select it when the pi is back on. That would be a huge regression from wp4 to programmatically schedule on/off timers on your raspberry.

I must be missing something, so before I delve into the code what is the uugear team recommended way to programmatically do this ?

Best,

 
Posted : 15/12/2025 3:07 pm
Topic Tags
(@admin)
Posts: 707
Member Admin
 

There is already a similar topic: https://www.uugear.com/forums/technial-support-discussion/remote-update-of-schedule-on-wittypi5/

The feature you are asking is planned, but is not implemented yet.

 

 
Posted : 15/12/2025 4:46 pm
(@dynalogic)
Posts: 4
Active Member Customer
Topic starter
 

@admin thank you for that fast answer, it is a crucial feature for us. Also, exposing a way to programmatically retrieve and set information (next shutdown time, rtc time etc) would be a very good second feature.

Also am I right to assume uploading the schedule from the pi is a firmware update ? Do you have an approximate target for the feature release ? 

Best

 
Posted : 15/12/2025 7:11 pm
(@admin)
Posts: 707
Member Admin
 

Posted by: @dynalogic

exposing a way to programmatically retrieve and set information

This feature has been there since first generation of Witty Pi. You can get/set these information by accessing the I2C registers. There are also functions provided for these purpose: https://github.com/uugear/Witty-Pi-5-Software/blob/main/wp5lib.h

Posted by: @dynalogic

am I right to assume uploading the schedule from the pi is a firmware update ?

No, they are completely different things, and they are copied to the Witty Pi 5 under different modes (as described in the user manual). Schedule scripts are just text files, while firmware is a compiled program for the RP2350 MCU.

Posted by: @dynalogic

Do you have an approximate target for the feature release ? 

We don't usually make very specific plans for software development progress, but I believe this feature will be implemented in the first half of 2026.

 
Posted : 16/12/2025 7:32 am
(@dynalogic)
Posts: 4
Active Member Customer
Topic starter
 

Hi,

Thanks for the quick response.

I realize I was too vague when I said "programmatically" - let me clarify what I actually meant. I don't really need/want to write code that accesses I2C registers directly (unless I have to ofc). What we would love is a way to call the wp5 tool (or some other way) to access the features we really need (get information, upload and apply the schedule script etc).

What seems to be a good idea at first glance would be to add CLI arguments to the existing `wp5` command.

Most functions seem to be already there in wp5lib.h so it might not be too huge maybe. Here's an example of what would be useful:

wp5 --get-info --format json
wp5 --upload-and-apply /path/to/schedule.wpi
wp5 --set-startup-time "06:00:00"
wp5 --set-shutdown-time "22:00:00"

Example of what --get-info could return something like:

{
"model": "Witty Pi 5",
"temperature_celsius": 45.3,
"temperature_fahrenheit": 113.5,
"power_mode": "VIN",
"input_voltage": 12.05,
"output_voltage": 5.12,
"output_current": 0.850,
"system_time": "2025-12-16 14:30:45",
"rtc_time": "2025-12-16 14:30:46",
"next_startup": "01 06:00:00",
"next_shutdown": "01 22:00:00",
"script_active": true,
...
}

This would make it very nice to integrate with bash scripts, Python, whatever. No need to write custom C code or deal with I2C directly.

What do you think ? 

Best

 
Posted : 16/12/2025 11:32 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.