Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

[Solved / Archived] Witty Pi on Pi Zero 2W - Not shutting down on schedule

6 Posts
2 Users
0 Likes
507 Views
(@msage)
Posts: 46
Trusted Member
Topic starter
 

Hi,

I am having another weird issue that I can't track down. I have been through my previous threads and others and I can't find the solution. It's very odd. I am running the latest version of the wittypi script and I've tried it with both a witty pi 3 mini and witty pi 4 mini and they are both exhibiting the same issue. 

Basically the pi isn't shutting down on the schedule.

================================================================================
|                                                                              |
|   Witty Pi - Realtime Clock + Power Management for Raspberry Pi              |
|                                                                              |
|            < Version 4.15 >     by Dun Cat B.V. (UUGear)                     |
|                                                                              |
================================================================================
>>> Current temperature: 35.875°C / 96.575°F
>>> Your system time is: 2024-03-20 09:25:27 GMT
>>> Your RTC time is:    2024-03-20 09:25:29 GMT
>>> Vout=5.06V, Iout=0.73A
Now you can:
  1. Write system time to RTC
  2. Write RTC time to system
  3. Synchronize with network time
  4. Schedule next shutdown [20 09:25:00]
  5. Schedule next startup  [20 09:40:00]
  6. Choose schedule script [in use]
  7. Set low voltage threshold  [0V]
  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)

 

The witty pi service

systemctl status wittypi
● wittypi.service - LSB: Witty Pi 4 initialize script
     Loaded: loaded (/etc/init.d/wittypi; generated)
     Active: active (running) since Wed 2024-03-20 08:46:56 GMT; 38min ago
       Docs: man:systemd-sysv-generator(8)
      Tasks: 6 (limit: 368)
        CPU: 1min 13.631s
     CGroup: /system.slice/wittypi.service
             ├─ 781 /bin/bash /home/pi/wittypi/daemon.sh
             └─1291 python3 -

Mar 20 08:46:57 livingroompi sudo[936]:     root : PWD=/ ; USER=root ; COMMAND=/usr/bin/date -s @1710925228
Mar 20 08:46:57 livingroompi sudo[936]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Mar 20 09:00:28 livingroompi sudo[936]: pam_unix(sudo:session): session closed for user root
Mar 20 09:00:28 livingroompi wittypi[781]:   Done :-)
Mar 20 09:00:28 livingroompi wittypi[781]: Firmware ID: 0x36
Mar 20 09:00:28 livingroompi wittypi[781]: Firmware Revison: 0x01
Mar 20 09:00:28 livingroompi wittypi[781]: Current Vout=5.06V, Iout=0.73A
Mar 20 09:00:28 livingroompi wittypi[781]: System starts up because scheduled startup is due.
Mar 20 09:00:33 livingroompi wittypi[781]: Send out the SYS_UP signal via GPIO-17 pin.
Mar 20 09:00:33 livingroompi wittypi[781]: Pending for incoming shutdown command...

 

The wittypi.log

 

[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.15) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi Zero 2 W Rev 1.0
[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...
[2024-03-20 09:00:28] Done :-)
[2024-03-20 09:00:28] Firmware ID: 0x36
[2024-03-20 09:00:28] Firmware Revison: 0x01
[2024-03-20 09:00:28] Current Vout=5.06V, Iout=0.73A
[2024-03-20 09:00:28] System starts up because scheduled startup is due.
[2024-03-20 09:00:33] Send out the SYS_UP signal via GPIO-17 pin.
[2024-03-20 09:00:33] Pending for incoming shutdown command...
[2024-03-20 09:00:33] Schedule next shutdown at: 2024-03-20 09:05:00
[2024-03-20 09:00:34] Schedule next startup at: 2024-03-20 09:20:00
[2024-03-20 09:14:38] Copying "on_5m_every_20m.wpi" to "schedule.wpi"...
[2024-03-20 09:14:38] Running the script...
[2024-03-20 09:14:39] Schedule next shutdown at: 2024-03-20 09:25:00
[2024-03-20 09:14:39] Schedule next startup at: 2024-03-20 09:40:00
[2024-03-20 09:14:39] Done :-)

Any ideas where else I could look as it all looks ok 🙁

If I restart the wittypi service it shutsdown the pi, so I suspect the issue is there somewhere, but no idea where to look. 

Given the amount of change I have made to this pi over the last few weeks with the bookworm issues, I could rebuild it if it's nothing obvious...

 
Posted : 20/03/2024 10:34 am
(@admin)
Posts: 480
Member Admin
 

When the schedule shutdown is due, the firmware will emulate a button click, which should pull down GPIO-4 on your Pi. If for any reason the GPIO-4 was not pulled down, you would not see anything in the log. Maybe it was due to unreliable connection on GPIO-4.

 
Posted : 20/03/2024 12:29 pm
(@msage)
Posts: 46
Trusted Member
Topic starter
 

The button on the board is working fine, I have just tested. I've just done a totally fresh install and it's still displaying the same issue. I've tried a different Pi zero 2w and the witty pi mini 3 and 4 :(. I _think_ it does the first shutdown and never powers up again. I am running the 5 mins on in 20 script at the moment to test. Will report back when I have more information!

 
Posted : 20/03/2024 4:03 pm
(@msage)
Posts: 46
Trusted Member
Topic starter
 

Ok, so the first shutdown worked, it started to boot up again and about 1/2 way it turned off, if I was a betting man I'd say it turned off when the witty pi service was starting... This really is a bit weird!

 
Posted : 20/03/2024 4:21 pm
(@msage)
Posts: 46
Trusted Member
Topic starter
 

I think this might be another update issue as my other witty pi 4 on my other pi has stopped running it's schedule too.

 

pi@studykioskpi:~ $ wittypi/wittyPi.sh
================================================================================
|                                                                              |
|   Witty Pi - Realtime Clock + Power Management for Raspberry Pi              |
|                                                                              |
|            < Version 4.14 >     by Dun Cat B.V. (UUGear)                     |
|                                                                              |
================================================================================
>>> Current temperature: 44.375°C / 111.875°F
>>> Your system time is: 2024-03-23 09:29:10 GMT
>>> Your RTC time is:    2024-03-23 09:29:09 GMT
>>> Vout=5.04V, Iout=1.24A
Now you can:
  1. Write system time to RTC
  2. Write RTC time to system
  3. Synchronize with network time
  4. Schedule next shutdown [20 18:00:00]
  5. Schedule next startup  [21 06:00: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)
 
Posted : 23/03/2024 10:30 am
(@admin)
Posts: 480
Member Admin
 

@msage I did some tests on Friday with latest software (V4.15) and did not reproduce the issue.

It is not likely due to update - if the update breaks things, you will see errors in log and you know the software is not working well.

BTW your latest log shows the software version is V4.14

 
Posted : 24/03/2024 9:47 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.