1
+ """
2
+ This module contains the data types used when sending data to the Cayenne server.
3
+ """
4
+
5
+ # Data types
6
+ TYPE_ACCELERATION = 'accel' # Acceleration, units: UNIT_G
7
+ TYPE_ANALOG_ACTUATOR = 'analog_actuator' # Analog Actuator, units: UNIT_ANALOG
8
+ TYPE_ANALOG_SENSOR = 'analog_sensor' # Analog Sensor, units: UNIT_ANALOG
9
+ TYPE_BAROMETRIC_PRESSURE = 'bp' # Barometric pressure, units: UNIT_PASCAL, UNIT_HECTOPASCAL
10
+ TYPE_BATTERY = 'batt' # Battery, units: UNIT_PERCENT, UNIT_RATIO, UNIT_VOLTS
11
+ TYPE_CO2 = 'co2' # Carbon Dioxide, units: UNIT_PPM
12
+ TYPE_COUNTER = 'counter' # Counter, units: UNIT_ANALOG
13
+ TYPE_CURRENT = 'current' # Current, units: UNIT_AMP, UNIT_MAMP
14
+ TYPE_DIGITAL_ACTUATOR = 'digital_actuator' # Digital Actuator, units: UNIT_DIGITAL
15
+ TYPE_DIGITAL_SENSOR = 'digital_sensor' # Digital Sensor, units: UNIT_DIGITAL
16
+ TYPE_ENERGY = 'energy' # Energy, units: UNIT_KWH
17
+ TYPE_EXT_WATERLEAK = 'ext_wleak' # External Waterleak, units: UNIT_ANALOG
18
+ TYPE_FREQUENCY = 'freq' # Frequency, units: UNIT_HERTZ
19
+ TYPE_GPS = 'gps' # GPS, units: UNIT_GPS
20
+ TYPE_GYROSCOPE = 'gyro' # Gyroscope, units: UNIT_ROTATION_PER_MINUTE, UNIT_DEGREE_PER_SEC
21
+ TYPE_LUMINOSITY = 'lum' # Luminosity, units: UNIT_LUX, UNIT_VOLTS, UNIT_PERCENT, UNIT_RATIO
22
+ TYPE_MOTION = 'motion' # Motion, units: UNIT_DIGITAL
23
+ TYPE_POWER = 'pow' # Power, units: UNIT_WATT, UNIT_KILOWATT
24
+ TYPE_PROXIMITY = 'prox' # Proximity, units: UNIT_CENTIMETER, UNIT_METER, UNIT_DIGITAL
25
+ TYPE_RAIN_LEVEL = 'rain_level' # Rain Level, units: UNIT_CENTIMETER, UNIT_MILLIMETER
26
+ TYPE_RELATIVE_HUMIDITY = 'rel_hum' # Relative Humidity, units: UNIT_PERCENT, UNIT_RATIO
27
+ TYPE_RESISTANCE = 'res' # Resistance, units: UNIT_OHM
28
+ TYPE_RSSI = 'rssi' # Received signal strength indicator, units: UNIT_DBM
29
+ TYPE_SNR = 'snr' # Signal Noise Ratio, units: UNIT_DB
30
+ TYPE_SOIL_MOISTURE = 'soil_moist' # Soil Moisture, units: UNIT_PERCENT
31
+ TYPE_SOIL_PH = 'soil_ph' # Soil pH, units: UNIT_ANALOG
32
+ TYPE_SOIL_WATER_TENSION = 'soil_w_ten' # Soil Water Tension, units: UNIT_KILOPASCAL, UNIT_PASCAL
33
+ TYPE_TANK_LEVEL = 'tl' # Tank Level, units: UNIT_ANALOG
34
+ TYPE_TEMPERATURE = 'temp' # Temperature, units: UNIT_FAHRENHEIT, UNIT_CELSIUS, UNIT_KELVIN
35
+ TYPE_VOLTAGE = 'voltage' # Voltage, units: UNIT_VOLTS, UNIT_MILLIVOLTS
36
+ TYPE_WIND_SPEED = 'wind_speed' # Wind Speed, units: UNIT_KM_PER_H
37
+
38
+ # Unit types
39
+ UNIT_UNDEFINED = 'null' # Undefined unit type
40
+ UNIT_AMP = 'a' # Ampere
41
+ UNIT_ANALOG = 'null' # Analog
42
+ UNIT_CELSIUS = 'c' # Celsius
43
+ UNIT_CENTIMETER = 'cm' # Centimeter
44
+ UNIT_DB = 'db' # Decibels
45
+ UNIT_DBM = 'dbm' # dBm
46
+ UNIT_DEGREE_PER_SEC = 'dps' # Degree per second
47
+ UNIT_DIGITAL = 'd' # Digital (0/1)
48
+ UNIT_FAHRENHEIT = 'f' # Fahrenheit
49
+ UNIT_G = 'g' # Acceleration
50
+ UNIT_GPS = 'm' # GPS
51
+ UNIT_HECTOPASCAL = 'hpa' # Hectopascal
52
+ UNIT_HERTZ = 'hz' # Hertz
53
+ UNIT_KELVIN = 'k' # Kelvin
54
+ UNIT_KILOPASCAL = 'kpa' # Kilopascal
55
+ UNIT_KILOWATT = 'kw' # Kilowatts
56
+ UNIT_KM_PER_H = 'kmh' # Kilometer per hour
57
+ UNIT_KWH = 'kwh' # Killowatt Hour
58
+ UNIT_LUX = 'lux' # Lux
59
+ UNIT_MAMP = 'ma' # Milliampere
60
+ UNIT_METER = 'm' # Meter
61
+ UNIT_MILLIMETER = 'mm' # Millimeter
62
+ UNIT_MILLIVOLTS = 'mv' # Millivolts
63
+ UNIT_OHM = 'ohm' # Ohm
64
+ UNIT_PASCAL = 'pa' # Pascal
65
+ UNIT_PERCENT = 'p' # Percent (%)
66
+ UNIT_PPM = 'ppm' # Parts per million
67
+ UNIT_RATIO = 'r' # Ratio
68
+ UNIT_ROTATION_PER_MINUTE = 'rpm' # Rotation per minute
69
+ UNIT_VOLTS = 'v' # Volts
70
+ UNIT_WATT = 'w' # Watts
0 commit comments