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

[Solved / Archived] Wittypi4 l3v7 pi zero w power on/off synchronising with usb supply

2 Posts
2 Users
0 Likes
420 Views
(@gueron)
Posts: 1
New Member
Topic starter
 

Hi all,

  My wittypi has a small lithium battery to enable some power on cycles and maintain the RTC. I run some simple home automation software.

I have a Tuya power plug to provide USB power to the wittypi and also to a bridge to read out status from my heating /hot water heat pump.

So far the power-on cycling of the tuya plug does not always provide sufficient battery charge which means I lose RTC or I miss an on-off cycle.

So I am in the process of trying to adjust the two scheduling parts.

So my question is how to combine the wittypi schedule with the tuya plug power cycle. So far I have tried to have the wittypi RTC turn on the

pi zero and then later power on the supply. Then power off the plug before the wittypi is schedule to turn-off the pi zero. It seems that if I remotely

power on the plug with pi zero not yet schelduled on (via wittypi) then the schedule misruns from then on. By default I want to keep power-on causing

pi zero start-up otherwise no way to get back remote control.. Does the wittypi schedule require the pi-zero to run ?

If say the pi zero is off, and next scheduled on is in 1 hour, if I remote turn on the tuya plug to force power and start-up the pi zero for 10mins, then

turn of the power plug, ssh to the pi zero to shutdown, will the wittypi maintain the original RTC power on schedule in 50mins despite the intermediate

on/off manually provoked sequence ? Usually I maintain off state overnight it would be useful to occasionally repower the plug to restore battery charge

during the night without affecting the schedule for the following day.

Thanks for your help with this.

 

 
Posted : 20/10/2023 6:04 pm
(@admin)
Posts: 479
Member Admin
 

When schedule script is running, it is better to (only) let Witty Pi to decide when to turn on Raspberry Pi. If Raspberry Pi is woke up before the scheduled startup is due, it may trigger the schedule revising.

When running wittyPi.sh, there is a option named "Auto-On when USB 5V is connected", which only shows up when your Witty Pi is a Witty Pi 4 L3V7. This option is turned on by default, but you can turn it off, so you can keep your Raspberry Pi off, no matter power plug is on or off. This can make sure the schedule script will not be affected.

 
Posted : 22/10/2023 9:15 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.