Skip to content
/ sys-oled Public
forked from kobol-io/sys-oled

Script to display Helios4 system status for i2c OLED screen.

Notifications You must be signed in to change notification settings

4ntsu/sys-oled

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Application to display Helios4 System Status on I2C OLED display.

system status system time

INSTALLATION

git clone https://github.com/helios-4/sys-oled.git
cd sys-oled
sudo ./install.sh

CONFIGURATION

Configure OLED display model

  1. Test which display model is the correct one by launching manually sys-oled and trying different display model as parameter until the System Status is showing correctly on the display.

Example :

sudo sys-oled --display ssd1306
sudo sys-oled --display sh1106

Supported values : ssd1306 (default), ssd1322, ssd1325, ssd1327, ssd1331, ssd1351, sh1106.

  1. Once you know which display model is the correct one, edit /usr/local/etc/sys-oled.conf and update the DISPLAY= line.

Configure storage info

For now sys-oled is a very crude python app that will require you to edit it directly in order to customize what you want to display.

Edit sys-oled script and look for the status() function.

sudo nano /usr/local/bin/sys-oled

You can edit the following lines to define for which storage devices you want to display info.

d.text((0, 27), disk_usage('sd', '/'), font=font, fill="white")
d.text((0, 39), disk_usage('md0', '/mnt/md0'), font=font, fill="white")

In the above example, we are displaying sd (SDcard) usage which is the rootfs mounted on '/'. We are also displaying md0 (RAID array) that is mounted on '/mnt/mnd0'. The values (0, 27) and (0, 39) correspond to the X, Y positions of displayed texts.

Start the service

The install script will automatically setup sys-oled to start at every startup. Now you can either restart your Helios4 or you can launch directly the service with the following command:

systemctl start sys-oled.service

Note

This sys-oled app was developed and tested only with the OLED model SH1106 which has a matrix panel of 132 x 64. If you use a different model that has a smaller resolution, you might need to tweak the coordinate values.

About

Script to display Helios4 system status for i2c OLED screen.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.8%
  • Shell 16.2%