Pironman 5 Pro Max Install Fails - Hardware Variant Detection Failure

I am attempting to run a Python script on a Raspberry PI 5. The software is at https://gethub.com/sunfounder/pironman5.git -depth 1. The error message is

Traceback (most recent call last):
File “/home/pi/pironman5/install.py”, line 6, in
from pironman5.variants import NAME, DT_OVERLAYS, PERIPHERALS, VARIANTS
File “/home/pi/pironman5/pironman5/variants/init.py”, line 119, in
NAME = VARIENT.NAME
^^^^^^^^^^^^
AttributeError: ‘NoneType’ object has no attribute ‘NAME’
pi@raspberry5:~/pironman5 $

There is a typo in the code: VARIENT (misspelled) instead of VARIANT.

Running this line patches the code, allowing the script to continue with my device type of “0316” assigned to Pironman5Max. BUT, I have a Pro Max.

sed -i ‘s/elif variant_id == “0308”:/elif variant_id == “0316”:\n return Pironman5Max\n elif variant_id == “0308”:/’
~/pironman5/pironman5/variants/init.py

After running this line, the installer works. This code finds the device ID:

python3 -c "
import os
hat_path = ‘/proc/device-tree/hat_type1’
for fname in [‘product_id’, ‘product_ver’, ‘product’, ‘vendor’, ‘uuid’]:
fpath = f’{hat_path}/{fname}’
if os.path.exists(fpath):
with open(fpath, ‘rb’) as f:
raw = f.read()
print(f’{fname}: raw={raw} hex={raw.hex()}')
"

variant ID “0316”

version “V10”

product: Piroman 5 Pro Max

After all this - no LEDs or screen. The local website works - http://localhost:34001

Thank you for providing such detailed troubleshooting information. This is very helpful for us to confirm the issue.

Based on the logs you provided and the reading result of /proc/device-tree/hat_type1, your device information is:
variant ID: 0316
version: V10
product: Pironman 5 Pro Max

It is possible that you have installed the incorrect version of the pironman5 software. Please uninstall pironman5 using the following commands:

cd ~/pironman5
sudo python3 install.py --uninstall
cd ~/
sudo rm -rf pironman5

Then reinstall it:

cd ~
git clone -b pro-max GitHub - sunfounder/pironman5: Code for Raspberry Pi 5 case (Pironman5) · GitHub --depth 1
cd ~/pironman5
sudo python3 install.py