Installed weewx 3.8.2 using the script on my raspberry pi
I would like to add a co2 sensor to my weather station.
im using acurite sensors and rtl_433 currently

I have a Cozir gc-0017 co2 sensor 20% range
serial sensor connected to usb to TTL cable
here is how the data comes from the sensor 

pi@raspberrypi:~ $ python cozir.py
Python progam to run a Cozir Sensor
CO2 PPM =  40.0
CO2 PPM =  450.0
CO2 PPM =  450.0
CO2 PPM =  450.0
CO2 PPM =  450.0

#Python progam to run a Cozir Sensor
import serial
import time
multiplier = 10 # 20% sensors requires a multiplier
ser = serial.Serial("/dev/ttyUSB0")
print "Python progam to run a Cozir Sensor\n"
ser.write("M 4\r\n") # set display mode to show only CO2
ser.write("K 2\r\n") # set  operating mode
# K sets the mode,  2 sets streaming instantaneous CO2 output
# \r\n is CR and LF
ser.flushInput()
time.sleep(1)
while True:
    ser.write("Z\r\n")
    resp = ser.read(10)
    resp = resp[:8]
    fltCo2 = float(resp[2:])
    print "CO2 PPM = ", fltCo2  * multiplier
    time.sleep(1)

 
i have been reading up on file parse but im in a little over my head.

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to