Notifications
Clear all

[Solved] witty pi 4 mini on pi zero 2w

13 Posts
3 Users
0 Likes
180 Views
(@townlema)
Posts: 4
Active Member
Topic starter
 

hello, newbie here so be gentle.

I have a brand new rasp pi zero 2w and loaded bullseye onto it and installed the witty s/w:

cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

witty 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-04-05 17:48:20] Done 🙂
[2024-04-05 17:48:20] Firmware ID: 0x36
[2024-04-05 17:48:20] Firmware Revison: 0x01
[2024-04-05 17:48:20] Current Vout=5.09V, Iout=0.08A
[2024-04-05 17:48:20] Unknown/incorrect startup reason: 0x02
[2024-04-05 17:48:25] Send out the SYS_UP signal via GPIO-17 pin.
[2024-04-05 17:48:25] Pending for incoming shutdown command...
[2024-04-05 17:48:26] Schedule script is interrupted, revising the schedule...
[2024-04-05 17:48:26] Schedule next shutdown at: 2024-04-05 17:59:00
[2024-04-05 17:48:26] Schedule next startup at: 2024-04-05 18:00:00

 

schedule log:

--------------- 2024-04-05 17:30:11 ---------------
Schedule next shutdown at: 2024-04-05 17:45:00
Schedule next startup at: 2024-04-05 18:00:00
---------------------------------------------------
--------------- 2024-04-05 17:48:26 ---------------
Schedule script is interrupted, revising the schedule...
Schedule next shutdown at: 2024-04-05 17:59:00
Schedule next startup at: 2024-04-05 18:00:00
---------------------------------------------------

wiityPi.sh o/p:

./wittyPi.sh
================================================================================
| |
| Witty Pi - Realtime Clock + Power Management for Raspberry Pi |
| |
| < Version 4.15 > by Dun Cat B.V. (UUGear) |
| |
================================================================================
>>> Current temperature: 37°C / 98.6°F
>>> Your system time is: 2024-04-05 17:54:56 CEST
>>> Your RTC time is: 2024-04-05 17:54:56 CEST
>>> Vout=5.09V, Iout=0.08A
Now you can:
1. Write system time to RTC
2. Write RTC time to system
3. Synchronize with network time
4. Schedule next shutdown [05 17:59:00]
5. Schedule next startup [05 18: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

i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

I can read register values:

i2cget -y 1 0x08 7
0x00

gpio values:

raspi-gpio get
BANK0 (GPIO 0 to 27):
GPIO 0: level=1 fsel=0 func=INPUT
GPIO 1: level=1 fsel=0 func=INPUT
GPIO 2: level=1 fsel=4 alt=0 func=SDA1
GPIO 3: level=1 fsel=4 alt=0 func=SCL1
GPIO 4: level=1 fsel=0 func=INPUT
GPIO 5: level=1 fsel=0 func=INPUT
GPIO 6: level=1 fsel=0 func=INPUT
GPIO 7: level=1 fsel=0 func=INPUT
GPIO 8: level=1 fsel=0 func=INPUT
GPIO 9: level=0 fsel=0 func=INPUT
GPIO 10: level=0 fsel=0 func=INPUT
GPIO 11: level=0 fsel=0 func=INPUT
GPIO 12: level=0 fsel=0 func=INPUT
GPIO 13: level=0 fsel=0 func=INPUT
GPIO 14: level=1 fsel=4 alt=0 func=TXD0
GPIO 15: level=1 fsel=4 alt=0 func=RXD0
GPIO 16: level=0 fsel=0 func=INPUT
GPIO 17: level=0 fsel=0 func=INPUT
GPIO 18: level=0 fsel=0 func=INPUT
GPIO 19: level=0 fsel=0 func=INPUT
GPIO 20: level=0 fsel=0 func=INPUT
GPIO 21: level=0 fsel=0 func=INPUT
GPIO 22: level=0 fsel=0 func=INPUT
GPIO 23: level=0 fsel=0 func=INPUT
GPIO 24: level=0 fsel=0 func=INPUT
GPIO 25: level=0 fsel=0 func=INPUT
GPIO 26: level=0 fsel=0 func=INPUT
GPIO 27: level=0 fsel=0 func=INPUT
BANK1 (GPIO 28 to 45):
GPIO 28: level=0 fsel=0 func=INPUT
GPIO 29: level=0 fsel=1 func=OUTPUT
GPIO 30: level=0 fsel=0 func=INPUT
GPIO 31: level=0 fsel=1 func=OUTPUT
GPIO 32: level=1 fsel=2 alt=5 func=TXD1
GPIO 33: level=1 fsel=2 alt=5 func=RXD1
GPIO 34: level=1 fsel=7 alt=3 func=SD1_CLK
GPIO 35: level=1 fsel=7 alt=3 func=SD1_CMD
GPIO 36: level=1 fsel=7 alt=3 func=SD1_DAT0
GPIO 37: level=0 fsel=7 alt=3 func=SD1_DAT1
GPIO 38: level=1 fsel=7 alt=3 func=SD1_DAT2
GPIO 39: level=1 fsel=7 alt=3 func=SD1_DAT3
GPIO 40: level=0 fsel=1 func=OUTPUT
GPIO 41: level=1 fsel=1 func=OUTPUT
GPIO 42: level=1 fsel=1 func=OUTPUT
GPIO 43: level=1 fsel=4 alt=0 func=GPCLK2
GPIO 44: level=1 fsel=0 func=INPUT
GPIO 45: level=1 fsel=0 func=INPUT
BANK2 (GPIO 46 to 53):
GPIO 46: level=1 fsel=0 func=INPUT
GPIO 47: level=1 fsel=1 func=OUTPUT
GPIO 48: level=0 fsel=4 alt=0 func=SD0_CLK
GPIO 49: level=1 fsel=4 alt=0 func=SD0_CMD
GPIO 50: level=1 fsel=4 alt=0 func=SD0_DAT0
GPIO 51: level=1 fsel=4 alt=0 func=SD0_DAT1
GPIO 52: level=1 fsel=4 alt=0 func=SD0_DAT2
GPIO 53: level=1 fsel=4 alt=0 func=SD0_DAT3

 

I immediately set a shutdown and startup schedule from the list of schedule files (on_5m_every_20m.wpi) but nothing happens and I dont see any real errors.  Maybe it is just a lack of understanding but...

Anyone have any ideas why the schedule is being ignored?

 

Thanks for any help

 
Posted : 05/04/2024 6:05 pm
(@admin)
Posts: 315
Member Admin
 

How do you connect your Witty Pi 4 Mini to your Raspberry Pi Zero 2W?

Have you soldered the 40 pin header to your Raspberry Pi Zero 2W? You need to do so, just putting the header in place is not enough.

 
Posted : 05/04/2024 9:06 pm
(@townlema)
Posts: 4
Active Member
Topic starter
 

Soldered the header and then when it didn’t work went over it again but still the same. 

 
Posted : 05/04/2024 9:11 pm
(@townlema)
Posts: 4
Active Member
Topic starter
 

To add when I schedule the shutdown I see the white LED on the Witty board light up at the correct time but the pi does not shutdown.

Could it be something wrong with the setup of the serial ports/UARTs/bluetooth?

 

Some GPIO data below as well that might help:

bash -c '. gpio-util.sh; gpio readall'
+-----+-----+---------+------+---+Pi Zero 2W+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| | | 3.3v | | | 1 || 2 | | | 5v | | |
| 2 | 8 | SDA.1 | ALT0 | 1 | 3 || 4 | | | 5v | | |
| 3 | 9 | SCL.1 | ALT0 | 1 | 5 || 6 | | | 0v | | |
| 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | ALT0 | TxD | 15 | 14 |
| | | 0v | | | 9 || 10 | 1 | ALT0 | RxD | 16 | 15 |
| 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 |
| 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | |
| 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 |
| | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 |
| 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | |
| 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 |
| 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 |
| | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 |
| 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 |
| 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | |
| 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 |
| 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | |
| 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 |
| 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 |
| | | 0v | | | 39 || 40 | 0 | IN | GPIO.29 | 29 | 21 |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+Pi Zero 2W+---+------+---------+-----+-----+

 

This post was modified 4 weeks ago by townlema
 
Posted : 06/04/2024 1:06 am
(@admin)
Posts: 315
Member Admin
 

White LED lighted up at correct time means Witty Pi emulated a button click (shortting GPIO4 to GND for 0.5 second). If the phyicially connection is reliable, this should be detected by daemon.sh and hence it will shutdown the device. In the wittyPi.log you should be able to see something about this event.

 
Posted : 06/04/2024 9:47 am
(@townlema)
Posts: 4
Active Member
Topic starter
 

@admin, understood thanks but the system just does not shutdown.  A physical button press results in the LED white light coming on and the system shutdowns correctly.  It's just the scheduled shutdown does not seem to work even though the white LED does light up.

Seems like the daemon.sh does not pickup the event, after the white LED comes on nothing appears in the witty log file:

[2024-04-06 23:49:56] Seting shutdown time to "06 23:53:00"
[2024-04-06 23:49:56] Done 🙂

and the system does not shutdown.

 
Posted : 06/04/2024 11:55 pm
(@admin)
Posts: 315
Member Admin
 

@townlema If physical clicking the button can be detected by daemon.sh, scheduled shutdown should be dected too. In both cases, the event needs a reliable connection on GPIO-4 to be detected.

If you have voltmeter, maybe you can monitor the voltage on GPIO-4 and see what happen when scheduled shutdown is due.

 
Posted : 08/04/2024 3:47 pm
(@mmoollllee)
Posts: 31
Eminent Member
 

I have exactly the same problem with a device in production. Only remote access is possible.

With a reboot I get these wittypi related messages:

Apr 22 13:53:42 raspberrypi wittypi[30520]: Stopping Witty Pi 4 Daemon...
Apr 22 13:53:42 raspberrypi wittypi[30520]: /etc/init.d/wittypi: line 25: kill: (462) - No such process
Apr 22 13:53:41 raspberrypi systemd[1]: wittypi.service: Succeeded.
Apr 22 13:53:41 raspberrypi systemd[1]: wittypi.service: Unit process 433 (daemon.sh) remains running after unit stopped.
Apr 22 13:53:41 raspberrypi systemd[1]: wittypi.service: Unit process 1275 (python3) remains running after unit stopped.
Apr 22 13:53:41 raspberrypi systemd[1]: wittypi.service: Consumed 1min 20.329s CPU time.
Apr 22 13:53:52 raspberrypi wittypi[433]: Starting Witty Pi 4 Daemon...
Apr 22 13:53:55 raspberrypi wittypi[438]: Witty Pi daemon (v4.15) is started.
Apr 22 13:53:55 raspberrypi wittypi[438]: Running on Raspberry Pi 3 Model A Plus Rev 1.1
Apr 22 13:53:55 raspberrypi wittypi[605]: cat: /home/kuckadm1n/Desktop/kuckuck-pi/wittypi/tmp/BUILD-DATA: No such file or directory
Apr 22 13:53:55 raspberrypi systemd[1]: home-kuckadm1n-Desktop-kuckuck\x2dpi-wittypi-tmp.mount: Succeeded.
Apr 22 13:53:55 raspberrypi wittypi[438]: Seems RTC has good time, write RTC time into system
Apr 22 13:53:55 raspberrypi wittypi[438]:   Writing RTC time to system...
Apr 22 13:54:17 raspberrypi wittypi[438]:   Done :-)
Apr 22 13:54:17 raspberrypi wittypi[438]: Firmware ID: 0x26
Apr 22 13:54:17 raspberrypi wittypi[438]: Firmware Revison: 0x05
Apr 22 13:54:17 raspberrypi wittypi[438]: Current Vin=13.19V, Vout=5.09V, Iout=0.27A
Apr 22 13:54:17 raspberrypi wittypi[438]: Unknown/incorrect startup reason: 0x02
Apr 22 13:54:22 raspberrypi wittypi[438]: Send out the SYS_UP signal via GPIO-17 pin.

I checked everything software related. The only thing I noticed is:

Error: I2C bus name doesn't match any bus present!
Usage: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]
       i2cdetect -F I2CBUS
       i2cdetect -l
  I2CBUS is an integer or an I2C bus name
  If provided, FIRST and LAST limit the probing range.

but

bash -c '. gpio-util.sh; gpio readall'
 +-----+-----+---------+------+---+  Pi 3A+  +---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 | ALT0 | 1 |  3 || 4  |   |      | 5v      |     |     |
 |   3 |   9 |   SCL.1 | ALT0 | 1 |  5 || 6  |   |      | 0v      |     |     |
 |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | ALT0 | TxD     | 15  | 14  |
 |     |     |      0v |      |   |  9 || 10 | 1 | ALT0 | RxD     | 16  | 15  |
 |  17 |   0 | GPIO. 0 |   IN | 0 | 11 || 12 | 0 | IN   | GPIO. 1 | 1   | 18  |
 |  27 |   2 | GPIO. 2 |   IN | 0 | 13 || 14 |   |      | 0v      |     |     |
 |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
 |     |     |    3.3v |      |   | 17 || 18 | 0 | IN   | GPIO. 5 | 5   | 24  |
 |  10 |  12 |    MOSI |   IN | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO |   IN | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK |   IN | 0 | 23 || 24 | 1 | IN   | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   |
 |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
 |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
 |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 0 | IN   | GPIO.26 | 26  | 12  |
 |  13 |  23 | GPIO.23 |   IN | 0 | 33 || 34 |   |      | 0v      |     |     |
 |  19 |  24 | GPIO.24 |   IN | 0 | 35 || 36 | 0 | IN   | GPIO.27 | 27  | 16  |
 |  26 |  25 | GPIO.25 |   IN | 0 | 37 || 38 | 0 | IN   | GPIO.28 | 28  | 20  |
 |     |     |      0v |      |   | 39 || 40 | 0 | IN   | GPIO.29 | 29  | 21  |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+  Pi 3A+  +---+------+---------+-----+-----+

Also after manual reboot, schedule is not refreshed. Only a manual `bash runScript.sh` does write the next shutdown & startup time, which doesn't happen either.

See:

sh wittyPi.sh
================================================================================
|                                                                              |
|   Witty Pi - Realtime Clock + Power Management for Raspberry Pi              |
|                                                                              |
|            < Version 4.15 >     by Dun Cat B.V. (UUGear)                     |
|                                                                              |
================================================================================
>>> Current temperature: 15.25°C / 59.45°F
>>> Your system time is: 2024-04-23 12:03:04 CEST
>>> Your RTC time is:    2024-04-23 12:03:05 CEST
>>> Vin=13.25V, Vout=5.09V, Iout=0.19A
Now you can:
  1. Write system time to RTC
  2. Write RTC time to system
  3. Synchronize with network time
  4. Schedule next shutdown [22 18:00:00]
  5. Schedule next startup  [23 06:00:00]
  6. Choose schedule script [in use]
  7. Set low voltage threshold  [12.8V]
  8. Set recovery voltage threshold  [13.8V]
  9. Set over temperature action
 10. Set below temperature action
 11. View/change other settings...
 12. Reset data...
 13. Exit
 
Posted : 23/04/2024 12:11 pm
(@mmoollllee)
Posts: 31
Eminent Member
 

Because schedule didn't work, batteries went low for this device, and it turned out, that voltage thresholds didn't work either. The BMS of the battery cut power somewhere.

With solar recharging the battery, it turned out, that this solved the problem 🙂

Since power was cut, schedule works again!

 
Posted : 25/04/2024 7:23 pm
(@mmoollllee)
Posts: 31
Eminent Member
 

Turns out it worked for a few days but now scheduled shutdown was missed and the device is still on. Nothing in the logs indicating that shutdown time was due.

I did a manual reboot today resulting in this schedule.log file

--------------- 2024-04-25 05:59:37 ---------------
Schedule next shutdown at: 2024-04-25 18:59:14
Schedule next startup at:  2024-04-26 05:59:14
---------------------------------------------------
--------------- 2024-04-26 05:59:37 ---------------
Schedule next shutdown at: 2024-04-26 18:59:14
Schedule next startup at:  2024-04-27 05:59:14
---------------------------------------------------
--------------- 2024-04-27 05:59:38 ---------------
Schedule next shutdown at: 2024-04-27 18:59:14
Schedule next startup at:  2024-04-28 05:59:14
---------------------------------------------------
--------------- 2024-04-28 05:59:38 ---------------
Schedule next shutdown at: 2024-04-28 19:59:14
Schedule next startup at:  2024-04-29 05:59:14
---------------------------------------------------
--------------- 2024-04-28 18:32:07 ---------------
Schedule next shutdown at: 2024-04-28 19:59:14
Schedule next startup at:  2024-04-29 05:59:14
---------------------------------------------------

and this is the wittyPi.log

[2024-04-24 10:28:57] Done :-)
[2024-04-24 10:28:57] System was previously shut down because of low-voltage.
[2024-04-24 10:28:57] Firmware ID: 0x26
[2024-04-24 10:28:57] Firmware Revison: 0x05
[2024-04-24 10:28:57] Current Vin=13.62V, Vout=5.13V, Iout=0.27A
[2024-04-24 10:28:57] System starts up because the input voltage reaches the restore voltage.
[2024-04-24 10:29:02] Send out the SYS_UP signal via GPIO-17 pin.
[2024-04-24 10:29:02] Pending for incoming shutdown command...
[2024-04-24 10:29:03] Schedule next shutdown at: 2024-04-24 18:59:14
[2024-04-24 10:29:03] Schedule next startup at: 2024-04-25 05:59:14
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.15) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 3 Model A Plus Rev 1.1
[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-04-25 05:59:31] Done :-)
[2024-04-25 05:59:31] Firmware ID: 0x26
[2024-04-25 05:59:31] Firmware Revison: 0x05
[2024-04-25 05:59:31] Current Vin=13.13V, Vout=5.08V, Iout=0.08A
[2024-04-25 05:59:31] System starts up because scheduled startup is due.
[2024-04-25 05:59:36] Send out the SYS_UP signal via GPIO-17 pin.
[2024-04-25 05:59:36] Pending for incoming shutdown command...
[2024-04-25 05:59:37] Schedule next shutdown at: 2024-04-25 18:59:14
[2024-04-25 05:59:38] Schedule next startup at: 2024-04-26 05:59:14
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.15) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 3 Model A Plus Rev 1.1
[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-04-26 05:59:30] Done :-)
[2024-04-26 05:59:30] Firmware ID: 0x26
[2024-04-26 05:59:30] Firmware Revison: 0x05
[2024-04-26 05:59:30] Current Vin=13.31V, Vout=5.06V, Iout=0.36A
[2024-04-26 05:59:30] System starts up because scheduled startup is due.
[2024-04-26 05:59:35] Send out the SYS_UP signal via GPIO-17 pin.
[2024-04-26 05:59:35] Pending for incoming shutdown command...
[2024-04-26 05:59:36] Schedule next shutdown at: 2024-04-26 18:59:14
[2024-04-26 05:59:36] Schedule next startup at: 2024-04-27 05:59:14
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.15) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 3 Model A Plus Rev 1.1
[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-04-27 05:59:31] Done :-)
[2024-04-27 05:59:31] Firmware ID: 0x26
[2024-04-27 05:59:31] Firmware Revison: 0x05
[2024-04-27 05:59:31] Current Vin=13.31V, Vout=5.09V, Iout=0.08A
[2024-04-27 05:59:31] System starts up because scheduled startup is due.
[2024-04-27 05:59:36] Send out the SYS_UP signal via GPIO-17 pin.
[2024-04-27 05:59:36] Pending for incoming shutdown command...
[2024-04-27 05:59:37] Schedule next shutdown at: 2024-04-27 18:59:14
[2024-04-27 05:59:37] Schedule next startup at: 2024-04-28 05:59:14
[2024-04-27 09:30:12] Schedule next shutdown at: 2024-04-27 19:59:14
[2024-04-27 09:30:12] Schedule next startup at: 2024-04-28 05:59:14
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.15) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 3 Model A Plus Rev 1.1
[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-04-28 05:59:31] Done :-)
[2024-04-28 05:59:31] Firmware ID: 0x26
[2024-04-28 05:59:31] Firmware Revison: 0x05
[2024-04-28 05:59:31] Current Vin=13.25V, Vout=5.06V, Iout=0.45A
[2024-04-28 05:59:31] System starts up because scheduled startup is due.
[2024-04-28 05:59:36] Send out the SYS_UP signal via GPIO-17 pin.
[2024-04-28 05:59:36] Pending for incoming shutdown command...
[2024-04-28 05:59:37] Schedule next shutdown at: 2024-04-28 19:59:14
[2024-04-28 05:59:37] Schedule next startup at: 2024-04-29 05:59:14
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.15) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 3 Model A Plus Rev 1.1
[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-04-28 18:32:01] Done :-)
[2024-04-28 18:32:01] Firmware ID: 0x26
[2024-04-28 18:32:01] Firmware Revison: 0x05
[2024-04-28 18:32:01] Current Vin=13.56V, Vout=5.13V, Iout=0.36A
[2024-04-28 18:32:01] System starts up because scheduled startup is due.
[2024-04-28 18:32:06] Send out the SYS_UP signal via GPIO-17 pin.
[2024-04-28 18:32:06] Pending for incoming shutdown command...
[2024-04-28 18:32:07] Schedule next shutdown at: 2024-04-28 19:59:14
[2024-04-28 18:32:07] Schedule next startup at: 2024-04-29 05:59:14

Any ideas?

 
Posted : 28/04/2024 10:51 pm
(@admin)
Posts: 315
Member Admin
 

Posted by: @mmoollllee

Nothing in the logs indicating that shutdown time was due.

This is the only problem I can see from the log, and this problem should not be ignored.

A well configured Witty Pi device will pull down GPIO-4 for a short moment when the scheduled startup/shutdown is due. Before shutdown its software will detect the falling of GPIO-4 and then this line should be logged, as implemented in do_shutdown() function:

Halting all processes and then shutdown Raspberry Pi...

Not seeing this line in log means Witty Pi's software (daemon.sh) did not detect the falling of GPIO-4, and your Pi was not shut down with command "shutdown -h now", instead it got power cut directly after the delay. In such case, no cleanup was done before the power cut, and the system was not shut down gracefully.

The only possibility I can imagine, is the GPIO-4 connection (physically) failed, so the software can not detect its state changing. This can be confirmed very easily if you have the device on hand.

 

 
Posted : 29/04/2024 9:43 am
(@mmoollllee)
Posts: 31
Eminent Member
 

Unfortunately it did not shutdown at all, since I did a manual reboot via `sudo reboot`
From my understanding this means either

  1. shutdown Alarm was triggered, daemon.sh did not detect the falling of GPIO-4, and power cut didn't happen as the RPi was still on after delay? From what I understand this is the behaviour of the wittypi?
  2. Alarm wasn't triggered at all
 
Posted : 29/04/2024 9:54 am
(@admin)
Posts: 315
Member Admin
 

I was not referring the last scheduled shutdown, I mean there were a few "successful" cycles but they were not really successful: no shutdown was logged.

--------------- 2024-04-25 05:59:37 ---------------
Schedule next shutdown at: 2024-04-25 18:59:14
Schedule next startup at:  2024-04-26 05:59:14
---------------------------------------------------
--------------- 2024-04-26 05:59:37 ---------------
Schedule next shutdown at: 2024-04-26 18:59:14
Schedule next startup at:  2024-04-27 05:59:14
---------------------------------------------------
--------------- 2024-04-27 05:59:38 ---------------
Schedule next shutdown at: 2024-04-27 18:59:14
Schedule next startup at:  2024-04-28 05:59:14
---------------------------------------------------
--------------- 2024-04-28 05:59:38 ---------------
Schedule next shutdown at: 2024-04-28 19:59:14
Schedule next startup at:  2024-04-29 05:59:14
 
Posted : 29/04/2024 12:50 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.