[weewx-user] Re: SOLVED as3935 lightining module not detected by I2c on a Rpi4
Thanks Karen, Yes, it is what I understood. As I explain in my last post, I fixed the problem by extending the range to 0x03 to 0x77 by the command sudo i2cdetect -a -y 1 0x03 0x77. That works perfectly now PY Le samedi 17 février 2024 à 08:04:00 UTC+1, Karen K a écrit : > May be you want to try option -a: > > sudo i2cdetect -a -y 1 > > Adresses below 0x8 are reserved at Raspberry Pi 4. But the lightning > module can address 0x0, 0x1, 0x2, or 0x3 only. > > -- 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/0e8e7602-46d9-4ca8-80e0-f448ee217541n%40googlegroups.com.
[weewx-user] Re: SOLVED as3935 lightining module not detected by I2c on a Rpi4
May be you want to try option -a: sudo i2cdetect -a -y 1 Adresses below 0x8 are reserved at Raspberry Pi 4. But the lightning module can address 0x0, 0x1, 0x2, or 0x3 only. -- 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/693d7c1a-7862-4e6a-8c33-50601df302adn%40googlegroups.com.
[weewx-user] Re: SOLVED as3935 lightining module not detected by I2c on a Rpi4
May be, you want to try option -a: sudo i2cdetect -a -y 1 -- 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/a26ea589-fb86-414e-bfdb-defd66d25873n%40googlegroups.com.
[weewx-user] Re: SOLVED as3935 lightining module not detected by I2c on a Rpi4
So... I've recently set up one of these modules from DFRobot. I started with their sample python code and morphed into something that fits in my set of libraries. In my case, I have it sending events out via mqtt. A quick look at the code doesn't give any hints to help you. >From the sample code, I set this up: #I2C address self.config['AS3935_I2C_ADDR1'] = 0x01 self.config['AS3935_I2C_ADDR2'] = 0x02 self.config['AS3935_I2C_ADDR3'] = 0x03 I think the hardware module has tiny switches to change it's address. It's dead of winter here, so no lightning to detect for a few months. I can share some of the code, but not all. Chris On Friday, February 16, 2024 at 4:43:49 PM UTC-7 Pierre-Yves wrote: > 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/97354093-f04c-4f9c-915b-4990b0634d2bn%40googlegroups.com.
[weewx-user] Re: SOLVED as3935 lightining module not detected by I2c on a Rpi4
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.