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
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.
