Connectivity Issues (HMC Continued)

Hi @CamDavidsonPilon. I am a member of the HMC AMYBO Clinic team and we are having a new round of issues with the Pioreactor. Our web portal is still not loading. I have gone through the solutions you gave Julien last semester which have not worked and, after a long time scouring this forum, the AMYBO forum, and various reddit threads, am out of ideas. Do you have any advice?

Hi @arlombardo,

Are you able to SSH into the Pioreactor? If so, can you report back the output of the following:

sudo systemctl status lighttpd.service

Are you able to access the following url:

http://pioreactor.local/api/experiments

in your browser?

What about

http://<your Pioreactors name>.local/api/experiments

Hi @CamDavidsonPilon,

The output of sudo systemctl status lighttpd.service is the following:
● lighttpd.service - Lighttpd Daemon
Loaded: loaded (/etc/systemd/system/lighttpd.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-01-23 13:40:19 GMT; 59s ago
Process: 515 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 649 (lighttpd)
Tasks: 4 (limit: 501)
CPU: 25.585s
CGroup: /system.slice/lighttpd.service
├─649 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
└─727 /usr/bin/python3 /var/www/pioreactorui/main.fcgi

Jan 23 13:39:52 pioreactor systemd[1]: Starting lighttpd.service - Lighttpd Daemon…
Jan 23 13:40:19 pioreactor systemd[1]: Started lighttpd.service - Lighttpd Daemon.

I am not able to access the link (our pioreactor is named pioreactor for ease of following AMYBO and Pioreactor setup instructions and forum guides)

Hi @CamDavidsonPilon, I have an update for you! the webserver is now working (network sharing settings were not working I had to try another method which worked). After updating to the latest version, we are getting the following error: monitor: This module does not understand old-style revision codes. I am not entirely sure what this means.

This is the longer error message:
monitor: This module does not understand old-style revision codes Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/pioreactor/utils/timing.py", line 156, in _execute_function self.function(*self.args, **self.kwargs) File "/usr/local/lib/python3.11/dist-packages/pioreactor/background_jobs/monitor.py", line 261, in self_checks self.check_for_power_problems() File "/usr/local/lib/python3.11/dist-packages/pioreactor/background_jobs/monitor.py", line 474, in check_for_power_problems is_rpi_having_power_probems, voltage = self.rpi_is_having_power_problems() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/pioreactor/background_jobs/monitor.py", line 459, in rpi_is_having_power_problems voltage_read = voltage_in_aux(precision=0.05) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/pioreactor/hardware.py", line 161, in voltage_in_aux adc = ADC_class() # type: ignore ^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/pioreactor/utils/adcs.py", line 96, in __init__ self.i2c = I2C(hardware.SCL, hardware.SDA) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/busio.py", line 36, in __init__ self.init(scl, sda, frequency) File "/usr/local/lib/python3.11/dist-packages/busio.py", line 158, in init from microcontroller.pin import i2cPorts File "/usr/local/lib/python3.11/dist-packages/microcontroller/__init__.py", line 16, in <module> from microcontroller import pin # pylint: disable=unused-import ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/microcontroller/pin.py", line 29, in <module> from adafruit_blinka.microcontroller.bcm283x.pin import * File "/usr/local/lib/python3.11/dist-packages/adafruit_blinka/microcontroller/bcm283x/pin.py", line 5, in <module> from RPi import GPIO File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 927, in <module> RPI_INFO = _get_rpi_info() ^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/RPi/GPIO/__init__.py", line 428, in _get_rpi_info raise NotImplementedError( NotImplementedError: This module does not understand old-style revision codes'

Additionally, when I run the selftests, all fail except Pioreactor HAT is detected. They fail with the message This module does not understand old-style revision codes.

Huh, that’s a new error I’ve never seen. What Raspberry Pi model are you using, specifically? You can find out under PioreactorsManageSystemVersion information.

Ah actually I have seen that error before - by your team!

Try the following (this worked last time):

  1. SSH into each Pioreactor, and enter:

    sudo nano /etc/environment 
    
  2. This opens a text editor, on the last line, add:

RPI_LGPIO_REVISION=800012
  1. Save and exit with ctrl-x. Then reboot the machine:

sudo reboot

  1. Try running self-test again

That worked! Thanks Cam. I’ll keep you updated if we have any more issues.

@CamDavidsonPilon New error! After power cycling the unit, I get the following logs and error:

Time	    Source	                Message
18:38:34	monitor	                Webserver isn't online.
18:38:16	monitor	                Ready.
18:38:16	monitor	                pioreactor is online and ready.
18:38:10	mqtt to db streaming	Ready.

These logs are within 1 minute of each other.
The webportal is active. however, it seems to think the pioreactor is “lost”
Have you ever seen this before?

Sounds like a race condition between the start of the monitor job, and the start of the webserver. Everything is okay though. The “lost” part can be ignored, too.

If you want to fix the “lost” status, try the following:

sudo systemctl restart pioreactor_startup_run@monitor.service