pyupm_t3311 module¶
-
class
pyupm_t3311.
T3311
(*args)[source]¶ Bases:
object
UPM API for the T3311 MODBUS Temperature and Humidity Sensor.
ID: t3311
Name: Temperature and Humidity Probe
Category: temp
Manufacturer: comet
Connection: uart
Link:http://www.cometsystem.com/products/reg-T3311 This module implements support for the Comet System T3311 Temperature and Humidity transmitter. It uses MODBUS over an RS232 serial port. You must have libmodbus v3.1.2 (or greater) installed to compile and use this driver.
This module was developed using libmodbus 3.1.2, and T3311 Firmware revison 2.66 connected via a Prolific RS232 Serial to USB adaptor. You cannot use the built in TTL UART pins for accessing this device you must use a full serial RS232 interface connected via USB.
C++ includes: t3311.hpp
-
REG_ABS_HUMIDITY
= 53¶
-
REG_COMPUTED
= 50¶
-
REG_DEW_POINT
= 52¶
-
REG_FW_HI
= 12288¶
-
REG_FW_LO
= 12289¶
-
REG_HUMIDITY
= 49¶
-
REG_MIXING_RATIO
= 55¶
-
REG_SERIAL_HI
= 4148¶
-
REG_SERIAL_LO
= 4149¶
-
REG_SPECIFIC_ENTHALPY
= 56¶
-
REG_SPECIFIC_HUMIDITY
= 54¶
-
REG_TEMPERATURE
= 48¶
-
REG_UNIT_SETTINGS
= 8255¶
-
extendedDataAvailable
()[source]¶ bool extendedDataAvailable()
Indicate whether the attached sensor supports extended Computed Data registers. Firmware versions at, or higher than 2.44 provide this data.
true if Extended Data is available, false otherwise
-
getAbsoluteHumidity
()[source]¶ float getAbsoluteHumidity()
Get the current absolute humidity. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
The last absolute humidity reading in g/m3 (grams per cubic meter).
-
getComputedValue
()[source]¶ float getComputedValue()
Get the current computed value. update() must have been called prior to calling this method. This value is configured via the configuration of the sensor using the sensors configuration utility, and can represent several different computed values. The default value from the factory is the current Dew Point Temperature.
Since the actual value configured is unknown (and unknowable) to this driver, the units represented depend on how you have configured the device. This function simply returns the value without any conversion or interpretation, other than the default scaling.
The last Computed Value
-
getDewPointTemperature
(fahrenheit=False)[source]¶ float getDewPointTemperature(bool fahrenheit=false)
Get the current dew point temperature. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
fahrenheit: true to return the temperature in degrees fahrenheit, false to return the temperature in degrees celsius. The default is false (degrees Celsius).
The last dew point temperature reading in Celsius or Fahrenheit
-
getFirmwareMajor
()[source]¶ int getFirmwareMajor()
Get the firmware revision major number.
The firmware revsion major number.
-
getFirmwareMinor
()[source]¶ int getFirmwareMinor()
Get the firmware revision minor number.
The firmware revsion minor number.
-
getHumidity
()[source]¶ float getHumidity()
Get the current relative humidity. update() must have been called prior to calling this method.
The last humidity reading
-
getMixingRatio
()[source]¶ float getMixingRatio()
Get the current mixing ratio. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
The last mixing ratio reading in g/kg (grams per kilogram).
-
getSerialNumber
()[source]¶ std::string getSerialNumber()
Get the serial number of the sensor.
The serial number
-
getSpecificEnthalpy
()[source]¶ float getSpecificEnthalpy()
Get the current specific enthalopy, a measure of energy density. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
The last specific enthalopy reading in kJ/kg (kilojoules per kilogram).
-
getSpecificHumidity
()[source]¶ float getSpecificHumidity()
Get the current specific humidity. update() must have been called prior to calling this method. This information is only available if the sensor supports Extended Data (ie: extendedDataAvailable() returns true).
The last specific humidity reading in g/kg (grams per kilogram).
-
getTemperature
(fahrenheit=False)[source]¶ float getTemperature(bool fahrenheit=false)
Get the current temperature. update() must have been called prior to calling this method.
fahrenheit: true to return the temperature in degrees fahrenheit, false to return the temperature in degrees celsius. The default is false (degrees Celsius).
The last temperature reading in Celsius or Fahrenheit
-