Hi Jerry! Thank you for your answer. I've tried changing all wires and looked for any bad connections. But no success. I guess it's a faulty sensor so I will buy another one and see if i'm lucky with that. The sensor I used is a CJMCU AS3935. Is there another recommended sensor to use with Weewx? Or are they almost all the same?
/Mikael Den söndag 1 september 2019 kl. 17:21:07 UTC+2 skrev J D: > > Hi, > I have seen this a number of times with these sensors, what I have done is > the following to make it less of an issue > Checking for loose wires or wires not making good contact at either the > GPIO pins or the device.. > Power cycle the system. > Replacing the device. > Making sure there are no other devices with the same bus and address being > used > Putting a while loop with a fixed loop count and a try except around the > i2cbus read and sleeping for a second or two before trying the read again.. > (This is the best solution and if it is still failing after 10-20 seconds > of trying then there is probably a hardware failure most likely the device > or a loose connection. > Thanks Jerry > > On Sunday, September 1, 2019 at 4:24:17 AM UTC-7, Mikael Fredriksson wrote: >> >> Hi! >> >> Got a new issue with my as3935. >> Running weewx 3.9.1 >> >> >> Got this in my log when starting weewx: >> >> Sep 1 11:42:05 raspberrypi weewx[570]: engine: Debug is 1 >> Sep 1 11:42:05 raspberrypi weewx[570]: engine: Initializing engine >> Sep 1 11:42:05 raspberrypi weewx[570]: engine: Loading station type >> FineOffsetUSB (weewx.drivers.fousb) >> Sep 1 11:42:05 raspberrypi weewx[570]: fousb: driver version is 1.9 >> Sep 1 11:42:05 raspberrypi weewx[570]: fousb: polling mode is PERIODIC >> Sep 1 11:42:05 raspberrypi weewx[570]: fousb: polling interval is 60 >> Sep 1 11:42:05 raspberrypi weewx[570]: fousb: found station on USB bus= >> device= >> Sep 1 11:42:05 raspberrypi weewx[570]: engine: Loading service >> weewx.engine.StdTimeSynch >> Sep 1 11:42:05 raspberrypi weewx[570]: engine: Finished loading service >> weewx.engine.StdTimeSynch >> Sep 1 11:42:05 raspberrypi weewx[570]: engine: Loading service >> user.as3935.AS3935 >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: service version is 0.6 >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: address=0x03 >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: bus=1 >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: indoors=False >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: noise_floor=0 >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: calibration=0x06 >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: pin=17 >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: data_binding=None >> Sep 1 11:42:05 raspberrypi weewx[570]: as3935: binding=archive >> Sep 1 11:42:05 raspberrypi weewx[570]: engine: Caught unrecoverable >> exception in engine: >> Sep 1 11:42:05 raspberrypi weewx[570]: **** [Errno 121] I/O-fel på >> fjärrmaskin >> Sep 1 11:42:05 raspberrypi weewx[570]: **** Traceback (most recent >> call last): >> Sep 1 11:42:05 raspberrypi weewx[570]: **** File >> "/usr/share/weewx/weewx/engine.py", line 884, in main >> Sep 1 11:42:05 raspberrypi weewx[570]: **** engine = >> engine_class(config_dict) >> Sep 1 11:42:05 raspberrypi weewx[570]: **** File >> "/usr/share/weewx/weewx/engine.py", line 78, in __init__ >> Sep 1 11:42:05 raspberrypi weewx[570]: **** >> self.loadServices(config_dict) >> Sep 1 11:42:05 raspberrypi weewx[570]: **** File >> "/usr/share/weewx/weewx/engine.py", line 142, in loadServices >> Sep 1 11:42:05 raspberrypi weewx[570]: **** >> self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict)) >> Sep 1 11:42:05 raspberrypi weewx[570]: **** File >> "/usr/share/weewx/user/as3935.py", line 154, in __init__ >> Sep 1 11:42:05 raspberrypi weewx[570]: **** >> self.sensor.set_indoors(indoors) >> Sep 1 11:42:05 raspberrypi weewx[570]: **** File >> "/usr/local/lib/python2.7/dist-packages/RPi_AS3935/RPi_AS3935.py", line >> 162, in set_indoors >> Sep 1 11:42:05 raspberrypi weewx[570]: **** self.read_data() >> Sep 1 11:42:05 raspberrypi weewx[570]: **** File >> "/usr/local/lib/python2.7/dist-packages/RPi_AS3935/RPi_AS3935.py", line >> 234, in read_data >> Sep 1 11:42:05 raspberrypi weewx[570]: **** self.registers = >> self.i2cbus.read_i2c_block_data(self.address, 0x00) >> Sep 1 11:42:05 raspberrypi weewx[570]: **** IOError: [Errno 121] >> I/O-fel på fjärrmaskin >> Sep 1 11:42:05 raspberrypi weewx[570]: **** Exiting. >> Sep 1 11:44:34 raspberrypi systemd[1]: Stopping LSB: weewx weather >> system... >> >> Haven´t changed anything and suddenly I got an I/O error on the machine. >> >> If I run "sudo i2cdetect -y 1" several times in a row I sometimes get >> 0x03 but every other time I just get --. >> >> >> Any clue what this could be or how to debug? >> >> Got it connected to my raspberry pi like this: >> >> VCC -> 3.3V >> GND -> GND >> SCL -> PIN 5 >> MOSI -> PIN 3 >> SI -> 3.3V >> IRQ -> PIN 11 >> A0 -> 3.3V >> A1 -> 3.3V >> >> >> /Mikael >> >> Den måndag 8 juli 2019 kl. 10:48:22 UTC+2 skrev dan Forster: >>> >>> Hi, >>> >>> I bought one of these from eBay - *MA5532 AS3935 2.4V to 5.5V >>> Lightning Fulmine Sensor Breakout SPI/I2C Antenna*. I have connected it >>> all up and have it working fine, confirmed by using the demo script and >>> install instructions supplied here >>> *https://github.com/pcfens/RaspberryPi-AS3935 >>> <https://github.com/pcfens/RaspberryPi-AS3935>.* I can see that a few >>> people had problems connecting the module, so I have attached a picture of >>> how I have wired to get it working perfectly (note one address line has to >>> be set to common ground and the address is 00x0 *NOT 00x3)*. >>> >>> I then followed these instructions >>> *https://github.com/weewx/weewx/wiki/as3935 >>> <https://github.com/weewx/weewx/wiki/as3935>* in order that it can be >>> used within my weewx weather station. I have managed to do everything as it >>> says on this page, including the part at the bottom of the page with >>> regards to the extra sqlite database holding the lightening detector data >>> (which I confirmed exists in the same place as the weewx db). >>> >>> >>> >>> Now I am using the Seasons skin and would like to get help on adding the >>> two new lightening detector values (lightning_strikes and avg_distance)into >>> the Seasons skin web page (at the bottom of the Current Conditions list). I >>> think the file I need to alter is /etc/weewx/skins/Seasons/current.inc. >>> >>> >>> >>> I am OK with electronics and getting better at Linux, but I am terrible >>> at HTML. Any pointers would be greatly appreciated... >>> >>> >>> >>> Dan >>> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/d8b3dc68-f2e3-4f54-ae78-e77dda16ad9c%40googlegroups.com.
