AllskyTeam / allsky

A Raspberry Pi operated Wireless Allsky Camera
MIT License
1.18k stars 181 forks source link

[BUG] Error when using GPIO on Rasberry PI 5 #3907

Open splanquart opened 1 week ago

splanquart commented 1 week ago

Camera model

Rpi HD

Operating System

Bookworm

Allsky version

v2023.05.01_05

Pi and amount of memory (512 MB, 1, 2, 4, or 8 GB)

rpi 5 with 8Go of RAM

Bug Description

I try to use module dewheater without success. In other hand i was some probleme to read temperature with DHT11 too (but it is not the subject of this thread, juste i think it can be corralated by the issue with GPIO).

I found in logfile /var/log/allskyperiodic.log : ERROR: Module allsky_dewheater.py failed on line 224 - Cannot determine SOC peripheral base address In this file, at this line there is nothing about SOC ou GPIO.

I search some reason about this bug and not well understand that but rasberry pi 5 was changed lot of stuff and now we need to change som library to use GPIO on rasberry pi 5.

For example I can switch on my drew by this code :

import gpiod
chip = gpiod.Chip('gpiochip0')
pin=18
drew_line = chip.get_line(pin)
drew_line.request(consumer="Drew", type=gpiod.LINE_REQ_DIR_OUT)
drew_line.set_value(1)

In other way I found some stuff about this error in other allsky projet : https://github.com/aaronwmorris/indi-allsky/wiki/Dew-Heater-Support#raspberry-pi-5 Where they recommande to uninstall RPi.GPIOand rpi.lgpio and reinstall rpi.lgpio.

But my venv for allsky don't use this rpi.lgpio therefore I don't know if this trick can work good for allsky.

(venv) steph@sky:~ $ pip freeze|grep gpio
gpiozero==2.0
lgpio==0.2.2.0
pigpio==1.78

There noting more in log when i passe to debug level 4.

Note: I know that my problem occur on module but when I read the code I understand that GPIO was supported by the core of allsky projet. It's why I post this big here.

Log / configuration files

No response

Alex-developer commented 1 week ago

Was this a clean installation on the pi5? There should be no reason to change anything as the installation is designed to work on a pi5.

Could you do the following

source ~/allsky/venv/bin/activate pip list

And paste the output

Thanks

Alex

splanquart commented 1 week ago

Yes it is a clean install. I was this problem. To try to found a fix I make an install of the last version.. And the problem continue.

list.txt

When i read this kind of topic https://forums.raspberrypi.com/viewtopic.php?t=359742 i suppose that my package in my venv is not compatible with my board.

esenbaytekin commented 2 days ago

Similarly, I am using Raspberry Pi 5 (4Gb).

Version: v2023.05.01_05 Linux AllSky-RPI5 6.6.51+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.51-1+rpt3 (2024-10-08) aarch64 Pi Revision Raspberry Pi 5 Model B Rev 1.0 (4 GB) 64-Bit Bookworm, no desktop environment

The heater works without any problems. I am adding the venv list. There are differences. I am using is SHT31 module. (i2c 0x44) venv_list.txt

Have you updated RPI other than the normal updates?