Quad SATA Hat Top, no OLED display information or push button action

I have just received my Quad SATA NAS kit and tried to set it up:
After burning raspbian-lite to a uSD card I updated, upgraded and did:

sudo rpi-upgrade

for good measure.

After reading some posts here: Quad SATA kit top hat install script missing I did:

sudo raspi-config

To enable I2C and SPI interfaces, then did:

sudo nano /etc/modules

to load kernel modules i2c-dev and i2c-bcm2708, after rebooting I checked that I could see i2c devices:

i2cdetect -y 1

Which outputs:

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

Then I started following the instructions here: Dual_Quad_SATA_HAT Wiki and after the Software Support part and some errors related to permissions on pip and pip/cache directories I ran the command listed with -H flag:

curl -sL https://rock.sh/get-rockpi-sata | sudo -H -E bash -

Which ran with no issues, after a while, lights started to blink, the SATA HAT Top fan started to spin and lsblk showed my 2 1TB drives … but no information on the OLED display or any change triggered by the push button…

systemctl status rockpi-sata.service

Outputs:

rockpi-sata.service - Rockpi SATA Hat
Loaded: loaded (/lib/systemd/system/rockpi-sata.service; enabled; vendor preset
Active: active (running) since Thu 2020-05-28 17:32:19 BST; 27min ago
Main PID: 1091 (python3)
Tasks: 4 (limit: 4915)
CGroup: /system.slice/rockpi-sata.service
β”œβ”€1091 /usr/bin/python3 /usr/bin/rockpi-sata/main.py on
└─1506 /usr/bin/python3 /usr/bin/rockpi-sata/main.py on
May 28 17:32:19 raspberrypi systemd[1]: Started Rockpi SATA Hat.
May 28 17:32:33 raspberrypi /main.py[1506]: The sensor will take effect after reboot.

I’d appreciate some help troubleshooting or fixing this issue, as far as I know there is some PWM action going on because SATA HAT Top fan speed has been changing from time to time, it’s just that tit would be nice to have information display on the OLED display…

I2c looks normal, maybe there is something wrong with the installation process, I will check it now.

Please run the following command and tell me the result.

sudo python3 /usr/bin/rockpi-sata/oled.py

Thank you, I had to stop the service, update the system , reboot and it worked afterwards

I’m glad to hear it’s working. Having fun.

I had similar problems with the OLED not working.

root@rpi4b-3:/# python3 /usr/bin/rockpi-sata/oled.py
Traceback (most recent call last):
   <snip>
   File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/GPIO.py", line 420, in get_platform_gpio
   import Adafruit_BBIO.GPIO
ModuleNotFoundError: No module named 'Adafruit_BBIO'

So apparently Adafruit_BBIO.GPIO wasn’t installed for me:

root@rpi4b-3:/# pip3 freeze | grep Ada
Adafruit-GPIO==1.0.3
Adafruit-PureIO==1.1.5
Adafruit-SSD1306==1.6.2
root@rpi4b-3:/#`

Installing it via pip3 gave me an error so in the end I installed it from source and that worked.

how did you installed it from source? i have the same issue it seems:

pi@RPi:~ $ sudo python3 /usr/bin/rockpi-sata/oled.py
Traceback (most recent call last):
  File "/usr/bin/rockpi-sata/oled.py", line 28, in <module>
    disp = disp_init()
  File "/usr/bin/rockpi-sata/oled.py", line 22, in disp_init
    disp = Adafruit_SSD1306.SSD1306_128_32(rst=None)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 288, in __init__
    gpio, spi, i2c_bus, i2c_address, i2c)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 85, in __init__
    self._gpio = GPIO.get_platform_gpio()
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/GPIO.py", line 420, in get_platform_gpio
    import Adafruit_BBIO.GPIO
ModuleNotFoundError: No module named 'Adafruit_BBIO'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/rockpi-sata/oled.py", line 32, in <module>
    disp = disp_init()
  File "/usr/bin/rockpi-sata/oled.py", line 22, in disp_init
    disp = Adafruit_SSD1306.SSD1306_128_32(rst=None)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 288, in __init__
    gpio, spi, i2c_bus, i2c_address, i2c)
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_SSD1306/SSD1306.py", line 85, in __init__
    self._gpio = GPIO.get_platform_gpio()
  File "/usr/local/lib/python3.7/dist-packages/Adafruit_GPIO/GPIO.py", line 420, in get_platform_gpio
    import Adafruit_BBIO.GPIO
ModuleNotFoundError: No module named 'Adafruit_BBIO'

My link to the source didn’t work, I corrected it now. But basically you need to (as root):

git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git
cd adafruit-beaglebone-io-python
sudo python3 setup.py install

And then it works. More info here

1 Like

i found the link in the mean time searching on google for Adafruit_BBIO, i actually got it installed via pip, was just missing some packages, the screen works ok now, thanks a lot for the solution

just to add more context, mine broke after I did and rpi-update, that bumped the kernel to 5.4
the rpi-update was done because I keep having issues on each restart since I installed OMV5, the rockpi-sata.service is not always started, couldn’t see anything in logs, no errors, nothing, it’s just not started on boot. And on the off occasion it’s started OMV breaks (php fails), ohh the joy :slight_smile:

I did some modifications to rockpi-sata.service and testing it now, if they are stable I’m gonna do an override snippet with systemctl edit

what it looks like now, if anyone is curios

[Unit]
Description=Rockpi SATA Hat

[Service]
Type=simple
ExecStart=/usr/bin/python3 /usr/bin/rockpi-sata/main.py on
ExecStop=/usr/bin/python3 /usr/bin/rockpi-sata/main.py off
Restart=always
WorkingDirectory=/usr/bin/rockpi-sata

[Install]
Before=local-fs.target
WantedBy=multi-user.target

Thanks. Maybe I messed up my rootfs somehow.

So, today I went in and edited rockpi-sata.conf and changed the entry press = power under the [key] section, line 20 from none(default). Saved and rebooted and now the display has flipped back to upside down. I went back in edited the line to press = none and still the same. How would editing that line change the oled section on line 35/36 back to false? Any ideas? Is the correct location for the rockpi-sata.conf still /etc/ ?

Editing press will not affect rotate, and the default value of rotate is false. Can you post your current rockpi-sata.conf?

I discovered an editing error and fixed it. The display is working correctly now (rotated). However, I’m trying to use the β€˜press’ feature of the button to poweroff the quad-sata box, but that doesn’t seem to be working. Do I have the correct syntax? My conf file is below.

[fan]

When the temperature is above lv0 (35’C), the fan at 25% power,

and lv1 at 50% power, lv2 at 75% power, lv3 at 100% power.

When the temperature is below lv0, the fan is turned off.

You can change these values if necessary.

lv0 = 35
lv1 = 40
lv2 = 45
lv3 = 50

[key]

You can customize the function of the key, currently available functions are

slider: oled display next page

switch: fan turn on/off switch

reboot, poweroff

If you have any good suggestions for key functions,

please add an issue on https://setq.me/rockpi-sata

click = slider
twice = switch
press = poweroff

[time]

twice: maximum time between double clicking (seconds)

press: long press time (seconds)

twice = 0.7
press = 1.8

[slider]

Whether the oled auto display next page and the time interval (seconds)

auto = true
time = 5

[oled]

Whether rotate the text of oled 180 degrees, whether use Fahrenheit

rotate = true
f-temp = true

@jj_0 @SsilviusS

Could you please tell me the results to help me fix the OLED bug

echo -e "import Adafruit_GPIO\nprint(Adafruit_GPIO.Platform.platform_detect())" | python3

Sorry I can’t anymore. I tried using a fresh Raspberry Pi OS image on an SD-card, this time the install of the Quad SATA software went smoothly. So there was probably something wrong with my original rootfs.

pi@RPi:~ $ echo -e β€œimport Adafruit_GPIO\nprint(Adafruit_GPIO.Platform.platform_detect())” | python3
2

Thank you. It looks normal.