Hi,
My wittypi's have been working fine for ages. I recently upgraded to bookworm and it everything was still working. I've just done updates (including a kernel upgrade) on both devices now neither of my wittypi's appear to be working to their schedules and aren't shutting down.
This is the log from one of the pis
[2023-12-08 05:30:31] Pending for incoming shutdown command... [2023-12-08 05:30:31] Schedule next shutdown at: 2023-12-08 17:30:00 [2023-12-08 05:30:32] Schedule next startup at: 2023-12-11 05:30:00 [xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.13) is started. [xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 4 Model B Rev 1.4 [xxxx-xx-xx xx:xx:xx] Seems RTC has good time, write RTC time into system [xxxx-xx-xx xx:xx:xx] Writing RTC time to system... [2023-12-08 08:26:25] Done :-) [2023-12-08 08:26:25] Firmware ID: 0x26 [2023-12-08 08:26:25] Firmware Revison: 0x01 [2023-12-08 08:26:25] Current Vout=5.02V, Iout=1.56A [2023-12-08 08:26:25] System starts up because scheduled startup is due. [xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.13) is started. [xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 4 Model B Rev 1.4 [xxxx-xx-xx xx:xx:xx] Seems RTC has good time, write RTC time into system [xxxx-xx-xx xx:xx:xx] Writing RTC time to system... [2023-12-08 12:13:15] Done :-) [2023-12-08 12:13:15] Firmware ID: 0x26 [2023-12-08 12:13:15] Firmware Revison: 0x01 [2023-12-08 12:13:15] Current Vout=5.02V, Iout=1.72A [2023-12-08 12:13:15] System starts up because scheduled startup is due. [xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.13) is started. [xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 4 Model B Rev 1.4 [xxxx-xx-xx xx:xx:xx] Seems RTC has good time, write RTC time into system [xxxx-xx-xx xx:xx:xx] Writing RTC time to system... [2023-12-11 05:30:26] Done :-) [2023-12-11 05:30:26] Firmware ID: 0x26 [2023-12-11 05:30:26] Firmware Revison: 0x01 [2023-12-11 05:30:26] Current Vout=5.03V, Iout=1.63A [2023-12-11 05:30:26] System starts up because scheduled startup is due. [2023-12-11 09:20:56] Copying "studypi.wpi" to "schedule.wpi"... [2023-12-11 09:20:56] Running the script... [2023-12-11 09:20:56] Schedule next shutdown at: 2023-12-11 17:30:00 [2023-12-11 09:20:56] Schedule next startup at: 2023-12-12 05:30:00 [2023-12-11 09:20:57] Done :-) [xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.13) is started. [xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 4 Model B Rev 1.4 [xxxx-xx-xx xx:xx:xx] Seems RTC has good time, write RTC time into system [xxxx-xx-xx xx:xx:xx] Writing RTC time to system... [2023-12-11 09:29:16] Done :-) [2023-12-11 09:29:16] Firmware ID: 0x26 [2023-12-11 09:29:16] Firmware Revison: 0x01 [2023-12-11 09:29:16] Current Vout=5.01V, Iout=1.61A [2023-12-11 09:29:16] System starts up because scheduled startup is due. [xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.13) is started. [xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 4 Model B Rev 1.4 [xxxx-xx-xx xx:xx:xx] Seems RTC has good time, write RTC time into system [xxxx-xx-xx xx:xx:xx] Writing RTC time to system... [2023-12-11 13:18:34] Done :-) [2023-12-11 13:18:34] Firmware ID: 0x26 [2023-12-11 13:18:34] Firmware Revison: 0x01 [2023-12-11 13:18:34] Current Vout=5.02V, Iout=1.72A [2023-12-11 13:18:34] System starts up because scheduled startup is due.
Interestingly if I look at the wittypi menu, I get the following:
>>> Current temperature: 44.625°C / 112.325°F >>> Your system time is: 2023-12-11 22:18:49 GMT >>> Your RTC time is: 2023-12-11 22:18:51 GMT >>> Vout=5.10V, Iout=1.22A Now you can: 1. Write system time to RTC 2. Write RTC time to system 3. Synchronize with network time 4. Schedule next shutdown [11 17:30:00] 5. Schedule next startup [12 05:30:00] 6. Choose schedule script [in use] 7. Set low voltage threshold 8. Set recovery voltage threshold 9. Set over temperature action 10. Set below temperature action 11. View/change other settings... 12. Reset data... 13. Exit What do you want to do? (1~13)
As you can see the shutdown time is well past and the device hasn't shutdown.
I am guessing this is a problem with a recent raspberry pi bookworm OS update as it's happening on both devices across two different types of pi.
Any advice?
Thanks
I've found if I go into the menu and choose the schedule script, it then schedules it and works for the next 24 hours, but never updates the next shutdown or startup. So it looks like what ever should update the schedule in the background isn't working. Does it use cron or a service to do this?
Ok, more information. I have looked in the systemctl status for wittypi.service.
On the pi zero 2 (witty pi 3 mini), I'm getting this every second:
Dec 13 10:03:18 livingroompi wittypi[801]: /home/pi/wittypi/daemon.sh: line 119: [: too many arguments
On the pi 4 (witty pi 4) I'm getting this every second:
Dec 13 10:03:51 studykioskpi wittypi[589]: /home/pi/wittypi/daemon.sh: line 155: [: too many arguments
So it looks like some form of bug in the daemon.sh script?
I haven't reproduced this issue yet. But the error message like "[: too many arguments" usually is because running the BASH script with non-BASH shell.
Maybe after the upgrade the system no longer uses BASH as default shell. You may run "echo $SHELL" or "echo $0" to confirm this.
So I guess the problem is because the new system removed raspi-gpio, which is used by gpio-util.sh.
If you can not install raspi-gpio in new system, before we update gpio-util.sh and use pinctrl instead of raspi-gpio, you may have to use older version of Raspberry Pi OS.
@admin raspi-gpio is installed and as far as I know working! I believe it's only the Pi 5 that doesn't support raspi-gpio? As I said it was working up until the latest updates.
From the system "raspi-gpio is already the newest version (0.20231127)."
I think I may have found the issue. There was a minor upgrade to the raspi-gpio script which steers users towards pinctrl, could this message tagged on the end cause the too many arguments error? See: Steer users towards pinctrl · RPi-Distro/raspi-gpio@e16ed29 (github.com)
I've tried compiling the previous version of raspi-gpio and that hasn't fixed the issue 🙁
I've commented out the delay until pin state gets stable section in the daemon file and that seems to workaround the issue, what does this section actually do?
Thanks
Facing the same issue on WittyPi 3 Mini. Additionally it doesn't seem possible to execute a shutdown by pressing the button on WittyPi.
@causing4132 If you do systemctl status wittypi.service you'll find it's erroring every second it will give you a line number for your daemon.sh file. If you open the file using nano (or similar) then comment out that whole section (it's called delay until pin state). Then it works, but I'm not 100% sure what that section does...
I tried to reproduce the issue but with no success. The Raspberry Pi OS I am using is:
Raspberry Pi OS with desktop
- Release date: December 5th 2023
- System: 32-bit
- Kernel version: 6.1
- Debian version: 12 (bookworm)
@msage @causing4132 could you provide the Raspberry Pi OS version you are using?