|
Post by Danie on Jan 16, 2019 23:47:10 GMT -8
Hello,
The specified humidity sensor for the Weatherboard is not easily available in South Africa. Is there any alternatives? Can the BMP 180 be used?
|
|
|
Post by SDL on Jan 18, 2019 9:14:26 GMT -8
I don't see why not, but you need to check the I2C address and put it on a I2C bus segment that has no conflicts.
BP
|
|
|
Post by Danie on Jul 2, 2019 11:05:11 GMT -8
Hello, The specified humidity sensor for the Weatherboard is not easily available in South Africa. Is there any alternatives? Can the BMP 180 be used? I have purchased and installed the Adafruit SHT31 humidity sensor. It appears at 0x44 on the i2c bus and by running a small python script I can read the temperature and humidity. I have not been successful integrating this into the software. It makes sense to get the humidity readings into outsideHumidity in the driver software, but i have not been able to figure out how to do this. Any help or suggestions will be much appreciated.
|
|
|
Post by SDL on Jul 3, 2019 5:04:16 GMT -8
What software are you trying to modify?
BP
|
|
|
Post by Danie on Jul 6, 2019 0:17:42 GMT -8
# Setup SHT31 # turn I2CBus 1 on if (config.TCA9545_I2CMux_Present): tca9545.write_control_register(TCA9545_CONFIG_BUS1) ############### # Detect SHT31 try: # Get I2C bus bus = smbus.SMBus(1)
# SHT31 address, 0x44(68) # Send measurement command, 0x2C(44) # 0x06(06) High repeatability measurement bus.write_i2c_block_data(0x44, 0x2C, [0x06])
time.sleep(0.5)
# SHT31 address, 0x44(68) # Read data back from 0x00(00), 6 bytes # Temp MSB, Temp LSB, Temp CRC, Humididty MSB, Humidity LSB, Humidity CRC data = bus.read_i2c_block_data(0x44, 0x00, 6)
# Convert the data temp = data[0] * 256 + data[1] outsideTemperature = -45 + (175 * temp / 65535.0) fTemp = -49 + (315 * temp / 65535.0) outsideHumidity = 100 * (data[3] * 256 + data[4]) / 65535.0
# Output data to screen #print "Temperature in Celsius is : %.2f C" %cTemp #print "Temperature in Fahrenheit is : %.2f F" %fTemp #print "Relative Humidity is : %.2f %%RH" %humidity
outsideTemperature, outsideHumidity = sht31.sense()
except IOError as e:
# print "I/O error({0}): {1}".format(e.errno, e.strerror)
config.SHT31_Present = False
What software are you trying to modify? BP I am trying to modify the GrovePi.py driver which supplies all the sensor information to the weewx database. The code above was inserted just before the "Setup AM2315" section but I amstill battling with syntax errors.
|
|
|
Post by SDL on Jul 6, 2019 16:38:08 GMT -8
I'm not familiar with that driver. I do know that GrovePi has an Arduino in the way of devices so things may not behave the same when driven from Pi2Grover or directly from the Pi.
BP
|
|
|
Post by Danie on Jul 7, 2019 22:44:04 GMT -8
The GrovePi driver is just a simplified version of the GroveweatherPi driver on the Switcdoc github site. There is no Arduino, my weather station uses the Grove Weather Rack board and the software runs fine.
I am trying to add the SHT31 humidity sensor which is connected to the I2C bus at address 0x44.
The software excerpt I sent you, provides temperature and humidity readings from the sensor when run from a SSH terminal.
The problem I have is to how incorporate this software in the GrovePi driver to display the readings.
|
|
|
Post by SDL on Jul 10, 2019 13:23:02 GMT -8
|
|
|
Post by Danie on Jul 14, 2019 21:42:53 GMT -8
Thank you, will do.
|
|