Notifications
Clear all

[Mark Solved / Archieved] Witty Pi 5 crashes on activating script

13 Posts
2 Users
0 Reactions
142 Views
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

I have created a .wpi script using the UUgear script generator. The intention is to create a script, which turns the RPi on for 2 minutes then turn it off for 13 minutes starting at 18:00 and repeat this for 12 hours. After that the RPi is supposed to be off for 12 hours. Repeating this daily. 

The script consists of blocks or 2M ON and 13 M OFF followed by a 12 H Off block. When running this through the script emulator everything works fine.

Now, loading this script into the WittyPy 5 does work, but when I try to activate this script, the Witty Pi 5 crashes completely and becomes unresponsive. I have to use the reset firmware to get it back and then flash the firmware again. This has happened every time with this script; other scripts work fine.

ChatGpt tells me the script would be to long (having too many entries) and can't be processed by the Witty Pi 5. Is this true and if so, how long can I make a script, I mean how many entries would be possible before this crash occurs?

The script in question is attached.

Thanks for your help, Alfred

 
Posted : 28/06/2026 3:17 am
(@admin)
Posts: 810
Member Admin
 

The script was not attached to your post, so I cannot check its actual content. Could you paste its content here?

In general, a long script should not make Witty Pi 5 completely crash. If the generated action list becomes too long, the firmware should stop processing it gracefully or truncate the generated list. A real lock-up during script activation would be considered a firmware bug, not an expected limitation.

That said, script activation may take some time. During this process the white LED can stay on, and the emulated USB drive may become unavailable because the firmware is working on the internal file system. Please wait until the operation finishes before resetting or disconnecting the board.

Please also check your firmware version. If it is older than v1.5, please upgrade to firmware v1.5 first and try again. Some firmware-side issues have been fixed recently, so testing with the latest firmware is important.

For debugging, I suggest powering Witty Pi 5 via VIN, and connecting the USB-C port to your computer only for the serial interface. Then open the USB serial port with a terminal program such as CoolTerm, PuTTY, screen, or minicom, and capture the log while activating the script.

 
Posted : 28/06/2026 9:24 am
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

I copy the script in question below. My attempt to add the script as a *.wpi file was blocked, that's why it was not attached.

Today I have tried one more time to activate this script and got the following error message (see below). When I then cut the power to the Witty and started it again, it seemed, that the script had been activated. It is running now and I will see whether it runs beyond 24 hours. The error message is really strange since firmware 1.4 is installed?

Where can I find the firmware version 1.5? I can only find version 1.4 at GitHub and that one is installed.

 

BEGIN 2026-06-28 18:00:00
END 2031-08-01 23:00:00
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF M13
ON M2
OFF H11 M58

 
Posted : 28/06/2026 10:44 am
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

I have difficulties to add any screenshots since all images and *.wpi files will be stripped from the post when sending. How am I going to do this?

 
Posted : 28/06/2026 10:46 am
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

The error message I always get says:

Activating 07_AllSky-1.wpi

Waiting for script processing … done

Activation finished, but no valid future action was applied.

This feature requires firmware 1.2 or later.

Can not detect WittyPi, exiting…

This post was modified 3 weeks ago by Alfred
 
Posted : 28/06/2026 10:50 am
(@admin)
Posts: 810
Member Admin
 

@alischulte 

The forum sometimes strips certain file types, so pasting the script content directly is fine. For screenshots, you may attach only one image directly to the post, or upload additional images to any public image hosting service and paste the links here.

The messages you posted are printed by the wp5 software. A real firmware log usually has timestamps and can be captured from the USB serial port, or read from WittyPi5.log.

About this message:

This feature requires firmware 1.2 or later.

This does not necessarily mean your firmware is older than 1.2. It can also appear when the software cannot read the firmware version from Witty Pi via I2C at that moment. So the message is misleading in this case. We will improve this message in the software.

Your script is syntactically valid, but it is very large after expansion. It starts on 2026-06-28 and ends in 2031, and it generates about 98 actions per day. The current firmware has an internal limit for the generated action list, so the generated schedule will be truncated. This should not make Witty Pi crash, but it also means this script will not really generate all actions until 2031.

Firmware v1.5 is available on GitHub since 22nd June: https://github.com/uugear/Witty-Pi-5-Firmware/releases/tag/v1.5

 
Posted : 29/06/2026 8:04 am
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

Now, this clarifies a few things ...

I was of the wrong impression, that I would define a schedule for 24 hours, which would then be repeated daily. In the meantime I have made the delta between the two dates (start/end) to be 40 days, which is what we would need for our project but trying to activate this version created the same error message as before.

Can you give me a limit of events which I would need to stick to? For how many days could I run the above script?

I will now try to update to 1.5 and retrieve the log as well. Will let you know what I find.

 
Posted : 29/06/2026 11:42 am
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

Updating to firmware 1.5 has only slightly changed the behavior:

Activating 07_AllSky_short.wpi

  Activation failed: Device is busy

  This feature requires firmware 1.2 or later.

Can not detect Witty Pi, exiting...

 

When I then un-power the Witty and restart it I can see that it has loaded the beginning of my script but based on your explanation earlier I would have no clue how long this shortened script will actually function. This is frustrating.

The last entry in the log is: [06-29 19:33:28.815] Applying script 07_AllSky.wpi...

Nothing after that.

Any suggestion where to go to from here?

 
Posted : 29/06/2026 12:13 pm
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

I have now made the script just 1 day long starting and ending in the future. This one can be activated. So, I am coming back to my question above: How long can I make this script to run - can you answer this question or do I really need to go through trial and error to figure it out?

 
Posted : 29/06/2026 12:26 pm
(@admin)
Posts: 810
Member Admin
 

@alischulte The limitations can be found in the firmware source code:
https://github.com/uugear/Witty-Pi-5-Firmware/blob/main/src/script.c#L17-L19

#define WPI_MAX_LINES 128
#define WPI_MAX_LINE_LENGTH 128
#define WPI_MAX_ACTIONS 4096

The .wpi file may contain up to 128 lines. The action(startup/shutdown) number can go up to 4096 after extraction.

Your current schedule script can last for about 41 days. It should be safe to set end time to "END 2026-08-01 23:00:00"

 

 
Posted : 29/06/2026 2:03 pm
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

Thank you for this information!

Since we intend to use deployment periods of 35 days max., this will work for us :-). I can now progress with defining the scripts and importantly I know what to check and what to expect.

The only suggestions I would have is adding the above numbers to the Users Manual and output a clearer error message should those limits be exceeded in a script. If possible at all, prevent the Witty Pi 5 from locking up in such a case as it does currently. 

 
Posted : 30/06/2026 7:18 am
(@alischulte)
Posts: 9
Active Member Customer
Topic starter
 

One more comment:

The Firmware version 1.5 only becomes visible when clicking on "Tags" when being on "Revisions" as I have been, the latest firmware revision shown there is 1.4. ( https://github.com/uugear/Witty-Pi-5-Firmware/releases)  

 
Posted : 30/06/2026 7:24 am
(@admin)
Posts: 810
Member Admin
 

@alischulte we will improve the reliability of firmware when activating schedule script with large amount of actions, and print more informative log messages acccordingly.

I have double checked, the v1.5 firmware indeed has been released on 22nd June, and I believe its invisibility is due to GitHub's caching.

 
Posted : 30/06/2026 9:58 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.