Finally, I succeeded to make the weewx running and capturing AS3935 
lightning detector data

For that, I had to force the detection of the i2c addresses from 0x03 to 
0x77 instead of 0x08 to 0x77 with the command:
sudo i2cdetect -a -y 1 0x03 0x77

I had also to add gpio to weewx group:
sudo usermod -a -G gpio weewx

PYB
Le vendredi 16 février 2024 à 21:30:08 UTC+1, Pierre-Yves a écrit :

> Hello All,
>
> Maybe a bit off-topic. But just in case someone would have faced to this 
> strange behavior of a Raspberry i2c address map.
>
>
> Rpi4-1: usual address map from 0x03 to 7x76.
> Config.:
> Weewx 4.10.2,
> Bresser 7in1,
> sdr driver,
> RTC clock (UU),
> BME280 (0x76) (pressure, temperature, humidity)
> AS3935 (0x03) (lightning detector)
>
> Weewx on Rpi4-1 running without any error.
>
> pi@weewx:~ $ sudo i2cdetect -y 1
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00:          03 -- -- -- -- -- -- -- -- -- -- -- -- 
> 10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
> 70: -- -- -- -- -- -- 76 --                         
> pi@weewx:~ $ 
>
> Rpi4-2: "abnormal" map with addresses 0x03 to 0x07 non selectable.
> Config.:
> Weewx 5.0.2,
> Bresser 7in1,
> RTC clock (UU),
> AS3935 (??)
>
> Weewx on Rpi4-2 failing : File "/etc/weewx/bin/user/as3935.py", line 182, 
> in __init__GPIO.setup(self.pin, GPIO.IN (see log below)
>
> pi@raspberrypi:~ $ sudo i2cdetect -y 1
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00:                         -- -- -- -- -- -- -- -- 
> 10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- -- 
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- 
> 70: -- -- -- -- -- -- -- --                         
> pi@raspberrypi:~ $
>
> Clearly, the AS3935 is not identified because the 0x03 to 0x07 address 
> range is not active. This AS3935 module works on the Rpi4-1
>
> Any idea on where this problem of misconfiguration could come from, 
> firmware, kernel ?
> Is there a way to reset the I2c address map ? 
>
> Thanks,
>
> Pierre-Yves
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/e6f844cb-245c-412e-8e91-6c5d17e3711fn%40googlegroups.com.

Reply via email to