LetsControlIt released #ESPEasy version mega-20260125. http://www.espeasy.com/
Let's Control It - Index page

LetsControlIt released #ESPEasy version mega-20260108. http://www.espeasy.com/
Let's Control It - Index page

LetsControlIt released #ESPEasy version mega-20250430. http://www.espeasy.com/
Let's Control It - Index page

Follow-up to this note.

Dragan had asked me to do repeated power-cycle tests with different kernel versions using the patched dtb for #RockPro64 to make sure the kernel #oops wouldn't still be an issue.

I learned that cutting the power of the device could kill the #LPDDR4 #RAM. This is documented in the specification referenced on the RockPro64 wiki page for Micron LPDDR4 Mobile LPDDR4 Datasheet as stated on page 37 in Uncontrolled Power-Off:

An uncontrolled power-off sequence can occur a maximum of 400 times over the life of the device.

I never had heard about this before! Cutting power without shutdown can kill my RAM?

show dmesg and shutdown

To get all the debugging information I needed I wanted the system after booting to print dmesg to the serial console, wait a short time and then actually shutdown.

root:~# cat /root/bin/dmesg_and_shutdown.sh #!/bin/bash # a small script that outputs dmesg to serial # console, waits 20 seconds and shuts down dmesg > /dev/ttyS2 # show a message how to stop this script and wait 20 seconds echo "Will shutdown in 20 seconds - to stop me call 'pkill dmesg_and_shut'" > /dev/ttyS2 sleep 20 echo "shutdown -h" > /dev/ttyS2 shutdown -h now # a cronjob that runs after each boot root:~# crontab -l @reboot /root/bin/dmesg_and_shutdown.sh

powercycle the board

I took the time needed for a complete cycle of booting, showing dmesg, waiting and shutting down: well below 2 minutes.

To automate the power cycle I used an #esp8266 based power switch made by #Sonoff (Powr2) running ESP Easy (mega-20210503).

#ESPeasy offers a simple scripting language I used to powercycle after 120 seconds of being switched on:

On System#Boot do gpio,12,0 gpio,13,1 endon On button#button_state do if [blue_led#blue_led_state]=1 gpio,13,0 timerSet,1,2 else gpio,13,1 gpio,12,1 timerSet,1,0 timerSet,2,0 endif endon On Rules#Timer=1 do gpio,12,0 timerSet,2,1 endon On Rules#Timer=2 do gpio,12,1 timerSet,1,2 endon

Pressing the button on the Sonoff device toggles between:

  • blue led off: timers disabled, relay on permanently
  • blue led on: timers switch the relay off for 5 seconds, on for 120 seconds and then repeat

logging

minicom logged the serial output to a file.

Further down the #RabbitHole I went when looking at the resulting logfile…

Note

Follow-up to this note Meanwhile Dragans...

Chris Vogel's microblog
LetsControlIt released #ESPEasy version mega-20241222. http://www.espeasy.com/
Let's Control It - Index page

Ist doch ganz nett geworden. Kleines Shield zum Anschluss von bis zu sechs OneWire Temperatur-Sensoren.

#esp8266 #onewire #espeasy #ds18b20

@h03rnchen ich baue mir gerade zwei neue Stockwaagen. Um Geld und Energie zu sparen, hängen beide an einem gemeinsamen Microcontroller. #imkern #esp8266 #basteln #espeasy #mqtt
LetsControlIt released #ESPEasy version mega-20240414. http://www.espeasy.com/
Let's Control It - Index page

Low(est) budget Stockwaage für meinen Imkerpaten.
Er ist ein ziemlicher Offline-Typ und möchte nur ein Display, mit dem er an seinen Ständen unkompliziert vor Ort das Gewicht einzelner Stöcke ablesen kann.
Der Microcontroller und der Messverstärker verbleiben an der Waage; im "Handteil" befinden sich nur das Display und das Batteriepaket.
Wenn ihm dieser Prototyp im Alltag gefällt, dann lässt sich das System für ca 15€ pro Wägestelle erweitern!
#imkern #esp8266 #basteln #espeasy
LetsControlIt released #ESPEasy version mega-20240401. http://www.espeasy.com/
Let's Control It - Index page