To help extend the life of the OLED screen, the Pironman4 has a default feature that turns off the display after 60 seconds of inactivity. You can easily reactivate the screen by pressing the power button. This is a great feature of the Pironman4. Does the Pironman5 have a similar feature? If not, could you provide guidance on how to modify the Python code to implement this functionality?
Currently, you can temporarily use commands or modify the code to control the OLED screenās power. We will investigate and optimize this issue in the future.
There is no option to control OLED via pironman5 command line. Below command line is only for pironman4
set to sleep mode: āalā means to āalways onā. In sleep mode, short press the power button to wake up.
pironman -al off
set to always on mode:
pironman -al on
Set the duration in seconds,
pironman -s 60
Please advise the corresponding command for pironman5 if its available. Or could you please show me the python source code file that I can add option or modify?
Currently, there is no command to control the sleep mode of the OLED screen. Since the PI5 has a switch button, the OLED screen cannot enter sleep or wake mode through the button.
There is also no support for this in the Python source code. We will consider implementing this feature in the future, but it will take time to find a good solution.
Pironman4 has a switch too, but its oled screen goes into sleep mode until you touch the switch.
Isnāt it possible to make it works at the same way ?
Not exactly what youāre looking for but I forked the code and added support for oled power control via command line and HTTP request (did not update the dashboard to add a toggle, donāt think itād be hard)
(this forum limits links per post for some reason. repo for pm_auto is)/pj530i/pm_auto/tree/oled_control
Example HTTP request:
curl -X POST -H āContent-Type: application/jsonā -d ā{ādataā:{āautoā:{āoled_enableā:true}}}ā http://127.0.0.1:34001/api/v1.0/set-config
The oled_control branch of pironman5 should have the install.py point to my oled_control branch of pm_auto automatically. Main branch has stuff very specific to my setup
xGattox: No. The Pironman V2 uses custom button, while the button on the Pironman 5 are directly connected to the Raspberry Piās power switch. Pressing the button will trigger the Raspberry Pi to shut down, so thereās no way to use this button to control the OLED.
Could we implement the following: pressing and holding for 3-5 seconds should trigger a shutdown while pressing and releasing in less than 3 seconds will display the OLED screen?
Ok thanks for your clarification @SunFounder_Moderator I think we can merge code from @pj530i and implement on/off switch in the dashboard and call the api to on/off oled via the portal
This method can be implemented, but it is not very meaningful. Since the data displayed on the OLED screen is already available on the PC dashboard, adding a switch function for the OLED screen on the PC dashboard makes the OLED screen redundant. The PC dashboard can display all the data from the OLED screen. We are considering creating a command to control the OLED screenās power.