|
Post by triggerfish on Feb 7, 2020 2:07:41 GMT -8
My gosh! I have never seen that error before. Just comment out line 654 and see if it continues. I wonder if you have the latest RPi_AS3935 installed. BP I commented out that line, after which it broke on the next one about spike detection. After commenting out that, the software ran furhter.
Program startup shows: pi@IBADHOEV14:~/SDL_Pi_SkyWeather $ head -80 ~/SDL_Pi_SkyWeather/log/`ls -1t ~/SDL_Pi_SkyWeather/log | head -1` /home/pi/SDL_Pi_SkyWeather/pclogging.py:58: Warning: Field 'ID' doesn't have a default value cur.execute(query) (1196.4192, 595, 184) () ('Pi Camera Revision', u'ov5647') ('after bme680', True) as3935 start as3935 present at 0x02 tmp= [76, 135, 81, 166, 81, 107] outsideTemperature: 7.3 C outsideHumidity: 65.0 % crcH: 0x6b crcT 0x51 after SHT30
SkyWeather Weather Station Version 055 - SwitchDoc Labs
Program Started at:2020-02-07 11:00:53
---------------------- I2C Mux - TCA9545: Present BME680: Present BMP280: Not Present SkyCam: Present DS3231: Not Present HDC1080: Not Present SHT30: Present AM2315: Not Present ADS1015: Not Present ADS1115: Present AS3935: Present OLED: Present SunAirPlus/SunControl: Present SolarMAX: Not Present SI1145 Sun Sensor: Not Present TSL2591 Sun Sensor: Present DustSensor: Present WXLink: Not Present Dual SolarMAX/WXLink: Not Present
UseBlynk: Present UseMySQL: Present Check WLAN: Present WeatherUnderground: Present UseWeatherStem: Present ---------------------- ----------------- SunAirPlus Sampling ----------------- ----------------- Sample and Display ----------------- ----------------- Weather Sampling ----------------- (' value = ', 2202.75) (' voltageValue = ', 2.20275) ----------------- SHT30 Stats: (g,br,bc,rt,pc) (1, 0, 0, 0, 0) --Sending Data to WeatherUnderground-- success GET sent ----------------- SunAirPlus Sampling ----------------- (' value = ', 2205.375) (' voltageValue = ', 2.205375) ----------------- ----------------- ----------------- AS3935 Lightning Detector ----------------- Last result from AS3935: ----No Lightning detected--- Lightning Count = 0
So apparently the board works... Which could lead to your other remark about the correct version... I just cloned github.com/switchdoclabs/SDL_Pi_SkyWeather.git when I started, so thats what I have running...
Which, looking at the repo's is a month old next to a "2" version updated 6 days ago... Which one to use?
|
|
|
Post by triggerfish on Feb 7, 2020 10:18:44 GMT -8
Just to see I grepped on the function and:
pi@IBADHOEV14:~/SDL_Pi_SkyWeather $ grep -r set_watchdog_threshold * log/IBADHOEV14_2020-01-21_19.43.13.log: as3935.set_watchdog_threshold(WatchDogThreshold) log/IBADHOEV14_2020-01-21_19.43.13.log:AttributeError: RPi_AS3935 instance has no attribute 'set_watchdog_threshold' log/IBADHOEV14_2020-02-06_19.33.41.log: as3935.set_watchdog_threshold(WatchDogThreshold) log/IBADHOEV14_2020-02-06_19.33.41.log:AttributeError: RPi_AS3935 instance has no attribute 'set_watchdog_threshold' RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py: def set_watchdog_threshold(self, threshold): SkyWeather.py: #as3935.set_watchdog_threshold(WatchDogThreshold) SkyWeather.py: as3935.set_watchdog_threshold(WatchDogThreshold) testAS3935.py: sensor.set_watchdog_threshold(WatchDogThreshold) It is in the code...
|
|
|
Post by triggerfish on Feb 7, 2020 10:44:13 GMT -8
Oh, and to add: allthough the main program seems to be working with "a" AS3935, the testprogram still can't see it:
pi@IBADHOEV14:~/SDL_Pi_SkyWeather $ sudo python testAS3935.py AS3935 NOT detected at I2C port 0x02 on base Bus
|
|
|
Post by SDL on Feb 7, 2020 15:11:46 GMT -8
Peter,
Where is the ThunderBoard plugged in? Is it plugged into the base I2C on the Pi2Grover board? Not the WeatherPi board.
There is something hosed up in your distribution. Can you delete your code (saving the conflocal.py file obviously) and reclone the software?
It all runs perfectly (including the watchdog threshold) on our test systems and you are the ONLY person that has seen this.
BP
|
|
|
Post by triggerfish on Feb 8, 2020 8:27:10 GMT -8
Peter, Where is the ThunderBoard plugged in? Is it plugged into the base I2C on the Pi2Grover board? Not the WeatherPi board. There is something hosed up in your distribution. Can you delete your code (saving the conflocal.py file obviously) and reclone the software? It all runs perfectly (including the watchdog threshold) on our test systems and you are the ONLY person that has seen this. BP Thunderboard is plugged in an I2C on the Pi2Grover indeed.
Will reclone asap.
|
|
|
Post by triggerfish on Feb 9, 2020 5:03:55 GMT -8
(318.5664, 165, 53) () ('Pi Camera Revision', u'ov5647') ('after bme680', True) as3935 start Traceback (most recent call last): File "/home/pi/SDL_Pi_SkyWeather/SkyWeather.py", line 654, in <module> as3935.set_watchdog_threshold(WatchDogThreshold) AttributeError: RPi_AS3935 instance has no attribute 'set_watchdog_threshold' Same error again...
|
|
|
Post by SDL on Feb 9, 2020 11:04:38 GMT -8
Peter,
I'm not kidding when I say ours works. I look in the RPi_AS3935.py file and here it is:
def set_watchdog_threshold(self, threshold): self.read_data() threshold = (threshold & 0x0F) write_data = (self.registers[0x01] & 0xF0) + threshold self.set_byte(0x01, write_data)
Is it **possible** that you installed another version on your machine that somehow overrides ours?
BP
|
|
|
Post by triggerfish on Feb 9, 2020 23:32:12 GMT -8
Peter, I'm not kidding when I say ours works. I look in the RPi_AS3935.py file and here it is: I believe you without doubt. Peter, Is it **possible** that you installed another version on your machine that somehow overrides ours? Well... Here's the answer to that: pi@IBADHOEV14:~ $ sudo find / -name RPi_AS3935.py /usr/local/lib/python2.7/dist-packages/RPi_AS3935/RPi_AS3935.py /home/pi/SDL_Pi_SkyWeather/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py /home/pi/SDL_Pi_SkyWeather_20200209/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py /home/pi/SDL_Pi_SkyWeather_eerste_pogin/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py /home/pi/SDL_Pi_GroveWeatherPi/RaspberryPi-AS3935/build/lib.linux-armv7l-2.7/RPi_AS3935/RPi_AS3935.py /home/pi/SDL_Pi_GroveWeatherPi/RaspberryPi-AS3935/build/lib.linux-armv6l-2.7/RPi_AS3935/RPi_AS3935.py /home/pi/SDL_Pi_GroveWeatherPi/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py pi@IBADHOEV14:~ $ diff /usr/local/lib/python2.7/dist-packages/RPi_AS3935/RPi_AS3935.py /home/pi/SDL_Pi_SkyWeather/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py 79a80,92 > > def set_watchdog_threshold(self, threshold): > self.read_data() > threshold = (threshold & 0x0F) > write_data = (self.registers[0x01] & 0xF0) + threshold > self.set_byte(0x01, write_data) > > def set_spike_detection(self, threshold): > self.read_data() > threshold = (threshold & 0x0F) > write_data = (self.registers[0x02] & 0xF0) + threshold > self.set_byte(0x02, write_data) >
Why that first version is there, and why it loads in favour of the included search, is still beyond me, but I copied your version over the distribution version, removed the comments on lines 654 and 655 and the software runs without failing on the set_watchdog_treshold...
|
|
|
Post by SDL on Feb 10, 2020 15:57:11 GMT -8
Now, how the heck did that happen? This isn't one of our SDCards is it?
BP
|
|
|
Post by triggerfish on Feb 11, 2020 1:35:46 GMT -8
Now, how the heck did that happen? This isn't one of our SDCards is it? BP No, it is not of your cards, don't panic This is a setup I did according to the early GroveWeatherPi days. Basically the README.md way to go. Install raspbian, update, apt-get install a shitload off software and so on. I just git cloned the SkyWeather software and went on from there.
|
|
|
Post by sibrown on May 22, 2020 8:57:05 GMT -8
I have a similar issue to the above..
pi@raspberrypiWeather:~/SDL_Pi_SkyWeather $ sudo python testAS3935.py AS3935 NOT detected at I2C port 0x02 on base Bus pi@raspberrypiWeather:~/SDL_Pi_SkyWeather $ sudo python testAS3935.py AS3935 NOT detected at I2C port 0x02 on base Bus pi@raspberrypiWeather:~/SDL_Pi_SkyWeather $
though if I run the demo.py from the RasberryPi-AS3935 directory I get this result no problem. Absolutely nothing changed no wires different. seems fine int is pulled. LED flashes near a phone/ monitor fine
pi@raspberrypiWeather:~/SDL_Pi_SkyWeather/RaspberryPi-AS3935 $ sudo python demo.py Waiting for lightning - or at least something that looks like it Noise level too high - adjusting
SB
|
|
|
Post by SDL on May 24, 2020 8:47:57 GMT -8
SiBrown,
Can you post a picture of your ThunderBoard and how it is wired into the system?
BP
|
|
|
Post by sibrown on May 27, 2020 11:41:46 GMT -8
This is setup, its on a seeed Grove base hat not Pi2Grover. int pin on GPIO 16 as demo.py SB
|
|
|
Post by sibrown on Jun 1, 2020 7:53:00 GMT -8
Error seems to be within the testAM3935.py script though not sure where. I ran sudo python SkyWeather.py and it found it and started reporting correctly
SB
|
|
|
Post by SDL on Jun 1, 2020 10:15:08 GMT -8
Boy, I'm sorry but we have no idea what the Seedstudio Grove base hat is doing. Glad you have it working.
BP
|
|