Dietpi Operating System - Script Isn't Working

Hi guys, I’m running my Nas on dietpi. Very easy to use and the way it works is. It’s a stripped down version of bullseye. Please check it out. The only issue is,. Not able to have the screen work with the script. Any help would be great.

Screenshot_20220215-210400_Termius
Screenshot_20220215-210448_Chrome

Screenshot_20220215-210606_Termius
Screenshot_20220215-210554_Termius
Screenshot_20220215-210544_Termius

If i can get the script working, I’ll post a video on how to setup the Nas from start to finish. Help everyone out.

If it’s a light install, perhaps you’re missing some dependencies. The script is python 3 based so I would start there. Then I know mdadm is one. You’d have to look through the script and make sure you have any necessary packages installed.

How about attempting some manual steps:

After installing the Argon display code (either the modified version or the original), we want to stop the services so that we do not conflict (assuming nothing is being displayed):

$ sudo systemctl stop argononed.service 

Now that we have the services stopped, lets see if python is installed, executing the command provided you should see something like the following:

$ dpkg-query -l | grep "python3 "
ii  libpython3-stdlib:arm64              3.9.2-3                          arm64        interactive high-level object-oriented language (default python3 version)
ii  python-is-python3                    3.9.2-1                          all          symlinks /usr/bin/python to python3
ii  python3                              3.9.2-3                          arm64        interactive high-level object-oriented language (default python3 version)
ii  python3-minimal                      3.9.2-3                          arm64        minimal subset of the Python language (default python3 version)
ii  python3-venv                         3.9.2-3                          arm64        venv module for python3 (default python3 version)

If you do not get output similar to this, try installing python:

sudo apt update
sudo apt install python3

Now we are sure that python is installed, (assuming no errors from the above), Its time to try mdadm, again you should see something similar to the following:

$ dpkg-query -l | grep mdadm
ii  mdadm                                4.1-11                           arm64        Tool to administer Linux MD arrays (software RAID)

If you don’t see mdadm installed, then simply install it:

sudo apt update
sudo apt install mdadm

Now since we should have things properly installed and working, lets try executing part of the code that is used to write to the OLED.

$ sudo python3 -i /etc/argon/argonsysinfo.py 
>>> argonsysinfo_listhddusage()
{'sda': {'used': 4797546, 'total': 480666971}, 'md0': {'used': 1323892, 'total': 2767390088}}
>>>

If you get similar output, python and mdadm are both installed and usable. Exit python by using cntrl-D.

One more test:

sudo python3 -i /etc/argon/argononed.py 
>>> display_loop(Queue())

This should run with no errors, and display to the OLED.

At some point there will be errors, and we need to install packages to get things running. Once those packages and libraries have been installed, restart the service:

sudo systemctl start argononed.service
sudo systemctl status argononed.service

I’m also using DietPi, I found that one of the GPIO pins that the script uses to communicate with the OLED screen/button/fan was disabled by default… if you go into dietpi-config to Advanced Options, you want to enable I2c. Might need a reboot afterwards.

1 Like

How did you go? I’m just having a look around. I’m finding that even at boot the argon image on the screen doesn’t load. But on PiOS it works.

This was fantastic. I was able to trouble shoot my install. Had some python dependency issues. Enables some setting including the gpio pin. The only issues I have is the screen is a mirror or what it should look like. Everything is backwards, but the correct way up. Once I’ve worked that out, I’m all sorted and I’ll do a video about it and copy a direct USB and sdcard image.

Glad things are working, I suspect that the GPIO or i2c stuff is not being initialized properly, hence the right to left instead of left to right.

Would be interesting to boot raspian just to verify the display is installed properly…

I’ve installed rasbian and tested that and appears correctly on the screen. I think I’ll do a clean install. Run all the steps a second time and see what the outcome is.