|
Post by jmaurin on Oct 1, 2017 13:37:46 GMT -8
Hi. I'm trying to add an SI1145 sensor, but GroveWeatherPi software doesn't get values from it. I've tried with another piece of code ( github.com/THP-JOE/Python_SI1145 ) and sensor are fine (tested with a Lamp direct on sensor): Vis: 872
IR: 3673
UV Index: 3.3
But when I try to use with GroveWeather software, all values are 0 and the sensor are detected fine. Sunlight Vi/IR/UV Sensor
-----------------
Sunlight Visible(Lux): 0.00
Sunlight IR(Lux): 0.00
Sunlight UV Index: 0.00
I'm using the latest version from Github.
|
|
|
Post by SDL on Oct 1, 2017 14:34:50 GMT -8
First thing to do is go down into SDL_Pi_TCA9545
and run the test software. Post the results. Check the results in the assembly manual.
Also post the startup of GroveWeatherPi where it detects all the connected devices.
BP
|
|
|
Post by jmaurin on Oct 1, 2017 16:50:09 GMT -8
First thing to do is go down into SDL_Pi_TCA9545 and run the test software. Post the results. Check the results in the assembly manual. Also post the startup of GroveWeatherPi where it detects all the connected devices. BP root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545# python testSDL_Pi_TCA9545.py
Test SDL_Pi_TCA9545 Version 1.0 - SwitchDoc Labs
Sample uses 0x73
Program Started at:2017-10-02 00:45:11
Traceback (most recent call last):
File "testSDL_Pi_TCA9545.py", line 51, in <module>
tca9545 = SDL_Pi_TCA9545.SDL_Pi_TCA9545(addr=TCA9545_ADDRESS, bus_enable = TCA9545_CONFIG_BUS0)
File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545/SDL_Pi_TCA9545.py", line 47, in __init__
self._write(TCA9545_REG_CONFIG, config)
File "/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_TCA9545/SDL_Pi_TCA9545.py", line 52, in _write
self._bus.write_byte_data(self._addr, register, data)
IOError: [Errno 121] Remote I/O error
But I guess you mean SI1145 directory, right? lol If so, it's working fine inside test program: root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145# python simpletest.py
Press Cntrl + Z to cancel
Vis: 0
IR: 0
Vis Lux: 0.0
IR Lux: 0.0
UV Index: 0.0
Vis: 289
IR: 351
Vis Lux: 12.2950819672
IR Lux: 40.1639344262
UV Index: 0.17
Vis: 275
IR: 347
Vis Lux: 6.55737704918
IR Lux: 38.5245901639
UV Index: 0.1
Vis: 461
IR: 1136
Vis Lux: 82.7868852459
IR Lux: 361.885245902
UV Index: 1.09
Vis: 461
IR: 1117
Vis Lux: 82.7868852459
IR Lux: 354.098360656
UV Index: 1.09
Vis: 433
IR: 1076
Vis Lux: 71.3114754098
IR Lux: 337.295081967
UV Index: 0.94
^CTraceback (most recent call last):
File "simpletest.py", line 58, in <module>
time.sleep(5)
KeyboardInterrupt
Only in the main GroveWeatherPi is not working. root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi# python GroveWeatherPi.py
>>>>>>>>>>>>>>>>>>><<<<<<<<<<<
TCA9545 I2C Mux Not Present
>>>>>>>>>>>>>>>>>>><<<<<<<<<<<
WXLink Reset
GroveWeatherPi Solar Powered Weather Station Version 2.95 - SwitchDoc Labs
Program Started at:2017-10-02 00:48:53
----------------------
I2C Mux - TCA9545: Not Present
BMP280: Present
DS3231: Present
HDC1080: Not Present
HTU21DF: Not Present
AM2315: Present
ADS1015: Not Present
ADS1115: Present
AS3935: Not Present
OLED: Not Present
SunAirPlus: Not Present
Sunlight Sensor: Present
WXLink: Not Present
UseMySQL: Present
Check WLAN: Present
WeatherUnderground: Not Present
----------------------
sendmail exception raised
-----------------
Scheduled Jobs
I don't have I2C MUX. Sunlight Vi/IR/UV Sensor
-----------------
Sunlight Visible(Lux): 0.00
Sunlight IR(Lux): 0.00
Sunlight UV Index: 0.00
|
|
|
Post by SDL on Oct 1, 2017 16:54:20 GMT -8
Ah, you don't have the I2C Mux. Run this for me:
i2cdetct -y 1
and post the results
|
|
|
Post by SDL on Oct 1, 2017 16:55:53 GMT -8
And another thing, are you doing "sudo" before python?
sudo python GroveWeatherPi.py
BP
|
|
|
Post by jmaurin on Oct 1, 2017 17:01:25 GMT -8
root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi# i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77
No, I'm not using sudo....I'm running as root (for testing purpose).
|
|
|
Post by SDL on Oct 1, 2017 17:32:32 GMT -8
Good, I see the sunlight sensor at 0x60.
Now to figure out why it doesn't work in GroveWeatherPi
|
|
|
Post by SDL on Oct 1, 2017 17:34:18 GMT -8
I'm going to put together a GroveWeatherPi without the mux. I suspect this is a software problem. BP
|
|
|
Post by SDL on Oct 2, 2017 5:40:09 GMT -8
We just posted a new version of GroveWeatherPi (2.97) that fixes the sunlight sensor problem. We also cleaned up the SI1145 library code to eliminate Adafruit I2C code dependence. The issue had to do with a WXLink reset that was hosing the read of the SI1145. It's not 100% clear why that was, but it is fixed and tested now. github.com/switchdoclabs/SDL_Pi_GroveWeatherPiLet me know your test results. BP
|
|
|
Post by jmaurin on Oct 2, 2017 6:55:20 GMT -8
Still not working HEre's output of SI1145 'simpletest' script (inside GroveWeather folder) and output of GroveWeather, both with same system/hardware. root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145# python simpletest.py
Press Cntrl + Z to cancel
Vis: 0
IR: 0
Vis Lux: 0.0
IR Lux: 0.0
UV Index: 0.0
Vis: 263
IR: 262
Vis Lux: 1.6393442623
IR Lux: 3.68852459016
UV Index: 0.03
Vis: 247
IR: 261
Vis Lux: 0.0
IR Lux: 3.27868852459
UV Index: 0.0
Vis: 268
IR: 258
Vis Lux: 3.68852459016
IR Lux: 2.04918032787
UV Index: 0.06
^CTraceback (most recent call last):
File "simpletest.py", line 58, in <module>
time.sleep(5)
KeyboardInterrupt
root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi/SDL_Pi_SI1145# cd ..
root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi# python GroveWeatherPi.py
>>>>>>>>>>>>>>>>>>><<<<<<<<<<<
TCA9545 I2C Mux Not Present
>>>>>>>>>>>>>>>>>>><<<<<<<<<<<
visible= 0
GroveWeatherPi Solar Powered Weather Station Version 2.97 - SwitchDoc Labs
Program Started at:2017-10-02 14:53:06
----------------------
I2C Mux - TCA9545: Not Present
BMP280: Present
DS3231: Present
HDC1080: Not Present
HTU21DF: Not Present
AM2315: Present
ADS1015: Not Present
ADS1115: Present
AS3935: Not Present
OLED: Not Present
SunAirPlus: Not Present
Sunlight Sensor: Present
WXLink: Not Present
UseMySQL: Present
Check WLAN: Present
WeatherUnderground: Not Present
----------------------
sendmail exception raised
-----------------
Scheduled Jobs
-----------------
Jobstore default:
sampleAndDisplay (trigger: interval[0:00:10], next run at: 2017-10-02 14:53:18 UTC)
patTheDog (trigger: interval[0:00:10], next run at: 2017-10-02 14:53:18 UTC)
blinkSunAirLED2X (trigger: interval[0:00:10], next run at: 2017-10-02 14:53:18 UTC)
tick (trigger: interval[0:01:00], next run at: 2017-10-02 14:54:08 UTC)
sampleWeather (trigger: interval[0:05:00], next run at: 2017-10-02 14:58:08 UTC)
sampleSunAirPlus (trigger: interval[0:05:00], next run at: 2017-10-02 14:58:08 UTC)
writeWeatherRecord (trigger: interval[0:05:00], next run at: 2017-10-02 14:58:08 UTC)
writePowerRecord (trigger: interval[0:05:00], next run at: 2017-10-02 14:58:08 UTC)
updateRain (trigger: interval[0:05:00], next run at: 2017-10-02 14:58:08 UTC)
checkForShutdown (trigger: interval[0:05:00], next run at: 2017-10-02 14:58:08 UTC)
sampleWeather (trigger: interval[0:15:00], next run at: 2017-10-02 15:08:08 UTC)
sampleSunAirPlus (trigger: interval[0:15:00], next run at: 2017-10-02 15:08:08 UTC)
doAllGraphs (trigger: interval[0:15:00], next run at: 2017-10-02 15:08:08 UTC)
WLAN_check (trigger: interval[0:30:00], next run at: 2017-10-02 15:23:08 UTC)
-----------------
-----------------
Local WeatherRack Weather Sensors Sampling
-----------------
Rain Total= 0.00 in
Rain Last 60 Minutes= 0.00 in
Wind Speed= 0.00 MPH
MPH wind_gust= 0.00 MPH
------Patting The Dog-------
Wind Direction= 292.50 Degrees
Wind Direction Voltage= 2.685 V
-----------------
-----------------
DS3231 Real Time Clock
-----------------
Raspberry Pi= 2017-10-02 14:53:18
DS3231= 2017-10-02 14:53:17
DS3231 Temperature= 26.25 C
-----------------
-----------------
BMP280 Barometer
-----------------
Temperature = 27.27 C
Pressure = 95.03 KPa
Altitude = 537.61 m
Sealevel Pressure = 101.45 KPa
-----------------
-----------------
Sunlight Vi/IR/UV Sensor
-----------------
Sunlight Visible(Lux): 0.00
Sunlight IR(Lux): 0.00
Sunlight UV Index: 0.00
-----------------
HDC1080 Temp/Hum Not Present
-----------------
-----------------
HTU21DF Temp/Hum Not Present
-----------------
-----------------
-----------------
AS3935 Lightning Detector Not Present
-----------------
-----------------
-----------------
AM2315 Temperature/Humidity Sensor
-----------------
outsideTemperature: 25.9 C
outsideHumidity: 57.5 %
crc: 0
-----------------
-----------------
Local WeatherRack Weather Sensors Sampling
-----------------
Rain Total= 0.00 in
Rain Last 60 Minutes= 0.00 in
Wind Speed= 0.00 MPH
MPH wind_gust= 0.00 MPH
------Patting The Dog-------
Wind Direction= 292.50 Degrees
Wind Direction Voltage= 2.685 V
-----------------
-----------------
DS3231 Real Time Clock
-----------------
Raspberry Pi= 2017-10-02 14:53:28
DS3231= 2017-10-02 14:53:27
DS3231 Temperature= 26.25 C
-----------------
-----------------
BMP280 Barometer
-----------------
Temperature = 27.27 C
Pressure = 95.03 KPa
Altitude = 537.79 m
Sealevel Pressure = 101.45 KPa
-----------------
-----------------
Sunlight Vi/IR/UV Sensor
-----------------
Sunlight Visible(Lux): 0.00
Sunlight IR(Lux): 0.00
Sunlight UV Index: 0.00
-----------------
HDC1080 Temp/Hum Not Present
-----------------
-----------------
HTU21DF Temp/Hum Not Present
-----------------
-----------------
-----------------
AS3935 Lightning Detector Not Present
-----------------
-----------------
-----------------
AM2315 Temperature/Humidity Sensor
-----------------
outsideTemperature: 25.8 C
outsideHumidity: 57.5 %
crc: 0
-----------------
^CTraceback (most recent call last):
File "GroveWeatherPi.py", line 1856, in <module>
time.sleep(1.0)
KeyboardInterrupt
root@weatherpi:/home/pi/SDL_Pi_GroveWeatherPi#
|
|
|
Post by SDL on Oct 2, 2017 16:21:59 GMT -8
Very odd.
Our system is running fine now. Are you running "sudo python GroveWeatherPi.py" ?
BP
sudo python *Pi.py >>>>>>>>>>>>>>>>>>><<<<<<<<<<< TCA9545 I2C Mux Not Present >>>>>>>>>>>>>>>>>>><<<<<<<<<<< Error accessing 0x48: Check your I2C address Error accessing 0x48: Check your I2C address Type Error visible= 0
GroveWeatherPi Solar Powered Weather Station Version 2.97 - SwitchDoc Labs
Program Started at:2017-10-02 17:19:25
---------------------- I2C Mux - TCA9545: Not Present BMP280: Not Present DS3231: Not Present HDC1080: Not Present HTU21DF: Not Present AM2315: Not Present ADS1015: Not Present ADS1115: Not Present AS3935: Not Present OLED: Not Present SunAirPlus: Not Present Sunlight Sensor: Present WXLink: Not Present
UseMySQL: Present Check WLAN: Present WeatherUnderground: Not Present ---------------------- ----------------- Scheduled Jobs ----------------- Jobstore default: sampleAndDisplay (trigger: interval[0:00:10], next run at: 2017-10-02 17:19:37 PDT) patTheDog (trigger: interval[0:00:10], next run at: 2017-10-02 17:19:37 PDT) blinkSunAirLED2X (trigger: interval[0:00:10], next run at: 2017-10-02 17:19:37 PDT) tick (trigger: interval[0:01:00], next run at: 2017-10-02 17:20:27 PDT) sampleWeather (trigger: interval[0:05:00], next run at: 2017-10-02 17:24:27 PDT) sampleSunAirPlus (trigger: interval[0:05:00], next run at: 2017-10-02 17:24:27 PDT) writeWeatherRecord (trigger: interval[0:05:00], next run at: 2017-10-02 17:24:27 PDT) writePowerRecord (trigger: interval[0:05:00], next run at: 2017-10-02 17:24:27 PDT) updateRain (trigger: interval[0:05:00], next run at: 2017-10-02 17:24:27 PDT) checkForShutdown (trigger: interval[0:05:00], next run at: 2017-10-02 17:24:27 PDT) sampleWeather (trigger: interval[0:15:00], next run at: 2017-10-02 17:34:27 PDT) sampleSunAirPlus (trigger: interval[0:15:00], next run at: 2017-10-02 17:34:27 PDT) doAllGraphs (trigger: interval[0:15:00], next run at: 2017-10-02 17:34:27 PDT) WLAN_check (trigger: interval[0:30:00], next run at: 2017-10-02 17:49:27 PDT) ----------------- ----------------- Local WeatherRack Weather Sensors Sampling ----------------- Rain Total= 0.00 in Rain Last 60 Minutes= 0.00 in Wind Speed= 0.00 MPH MPH wind_gust= 0.00 MPH No Wind Direction Available - No ADS1015 or ADS1115 Present ----------------- ----------------- DS3231 Real Time Clock Not Present ----------------- ----------------- BMP280 Barometer Not Present ----------------- ----------------- Sunlight Vi/IR/UV Sensor ----------------- ------Patting The Dog------- Sunlight Visible(Lux): 102.05 Sunlight IR(Lux): 626.64 Sunlight UV Index: 1.35 ----------------- HDC1080 Temp/Hum Not Present ----------------- ----------------- HTU21DF Temp/Hum Not Present ----------------- ----------------- ----------------- AS3935 Lightning Detector Not Present ----------------- ----------------- ----------------- AM2315 Temperature/Humidity Sensor Not Present ----------------- ----------------- ----------------- Local WeatherRack Weather Sensors Sampling ----------------- ------Patting The Dog------- Rain Total= 0.00 in Rain Last 60 Minutes= 0.00 in Wind Speed= 0.00 MPH MPH wind_gust= 0.00 MPH No Wind Direction Available - No ADS1015 or ADS1115 Present ----------------- ----------------- DS3231 Real Time Clock Not Present ----------------- ----------------- BMP280 Barometer Not Present ----------------- ----------------- Sunlight Vi/IR/UV Sensor ----------------- Sunlight Visible(Lux): 109.02 Sunlight IR(Lux): 631.15 Sunlight UV Index: 1.44 ----------------- HDC1080 Temp/Hum Not Present
|
|
|
Post by SDL on Oct 2, 2017 16:25:21 GMT -8
Try removing your other I2C devices until your system matches mine and then try it again.
BP
|
|
|
Post by jmaurin on Oct 3, 2017 17:08:44 GMT -8
Nothing, same problem. I've tested with another board and it worked (was running on RPi-2 and debian jessie). Then, I installed sensors and weatherboard on a new rpi-3 with latest version of debian, back to same problem And test program still working! If you need, I can give you access tomorrow. I'm sure is not hardware problem, since all test programs works fine for all sensors.
|
|
|
Post by SDL on Oct 5, 2017 8:09:19 GMT -8
Did you "Try removing your other I2C devices until your system matches mine and then try it again."? Your answer wasn't clear. post the results of that test.
This stuff is hard to debug remotely for sure!
BP
|
|
|
Post by jmaurin on Oct 6, 2017 16:44:03 GMT -8
Did you "Try removing your other I2C devices until your system matches mine and then try it again."? Your answer wasn't clear. post the results of that test. This stuff is hard to debug remotely for sure! BP No, I didn't because the same system (same sensors, board, etc...) worked while running in my old raspberry pi 2 with debian Jessie (now I'm using strech). Also, as I said, the sensor itself works fine, even with sample program provided in GroveWeatherPi. If was some kind of address conflit, even sample test wouldn't work. I'm just starting from scratch again with an RPi-2 and debian strech fresh-install. I also noticed that are some libraries that is not in GitHub, but you must install, or GroveWeatherPi wouldn't work. I'mm sumarize all and post here.
|
|