@@ -32,16 +32,106 @@ typedef enum {
32
32
C_STREAM = 4 // For Firmware and other larger chunks of data that need to be divided into pieces.
33
33
} mysensor_command;
34
34
35
+ // Type of sensor (used when presenting sensors)
36
+ typedef enum {
37
+ S_DOOR, // Door sensor, V_TRIPPED, V_ARMED
38
+ S_MOTION, // Motion sensor, V_TRIPPED, V_ARMED
39
+ S_SMOKE, // Smoke sensor, V_TRIPPED, V_ARMED
40
+ S_LIGHT, // Binary light or relay, V_STATUS (or V_LIGHT), V_WATT
41
+ S_BINARY=3 , // Binary light or relay, V_STATUS (or V_LIGHT), V_WATT (same as S_LIGHT)
42
+ S_DIMMER, // Dimmable light or fan device, V_STATUS (on/off), V_DIMMER (dimmer level 0-100), V_WATT
43
+ S_COVER, // Blinds or window cover, V_UP, V_DOWN, V_STOP, V_DIMMER (open/close to a percentage)
44
+ S_TEMP, // Temperature sensor, V_TEMP
45
+ S_HUM, // Humidity sensor, V_HUM
46
+ S_BARO, // Barometer sensor, V_PRESSURE, V_FORECAST
47
+ S_WIND, // Wind sensor, V_WIND, V_GUST
48
+ S_RAIN, // Rain sensor, V_RAIN, V_RAINRATE
49
+ S_UV, // Uv sensor, V_UV
50
+ S_WEIGHT, // Personal scale sensor, V_WEIGHT, V_IMPEDANCE
51
+ S_POWER, // Power meter, V_WATT, V_KWH
52
+ S_HEATER, // Header device, V_HVAC_SETPOINT_HEAT, V_HVAC_FLOW_STATE
53
+ S_DISTANCE, // Distance sensor, V_DISTANCE
54
+ S_LIGHT_LEVEL, // Light level sensor, V_LIGHT_LEVEL (uncalibrated in percentage), V_LEVEL (light level in lux)
55
+ S_ARDUINO_NODE, // Used (internally) for presenting a non-repeating Arduino node
56
+ S_ARDUINO_REPEATER_NODE, // Used (internally) for presenting a repeating Arduino node
57
+ S_LOCK, // Lock device, V_LOCK_STATUS
58
+ S_IR, // Ir device, V_IR_SEND, V_IR_RECEIVE
59
+ S_WATER, // Water meter, V_FLOW, V_VOLUME
60
+ S_AIR_QUALITY, // Air quality sensor, V_LEVEL
61
+ S_CUSTOM, // Custom sensor
62
+ S_DUST, // Dust sensor, V_LEVEL
63
+ S_SCENE_CONTROLLER, // Scene controller device, V_SCENE_ON, V_SCENE_OFF.
64
+ S_RGB_LIGHT, // RGB light. Send color component data using V_RGB. Also supports V_WATT
65
+ S_RGBW_LIGHT, // RGB light with an additional White component. Send data using V_RGBW. Also supports V_WATT
66
+ S_COLOR_SENSOR, // Color sensor, send color information using V_RGB
67
+ S_HVAC, // Thermostat/HVAC device. V_HVAC_SETPOINT_HEAT, V_HVAC_SETPOINT_COLD, V_HVAC_FLOW_STATE, V_HVAC_FLOW_MODE
68
+ S_MULTIMETER, // Multimeter device, V_VOLTAGE, V_CURRENT, V_IMPEDANCE
69
+ S_SPRINKLER, // Sprinkler, V_STATUS (turn on/off), V_TRIPPED (if fire detecting device)
70
+ S_WATER_LEAK, // Water leak sensor, V_TRIPPED, V_ARMED
71
+ S_SOUND, // Sound sensor, V_TRIPPED, V_ARMED, V_LEVEL (sound level in dB)
72
+ S_VIBRATION, // Vibration sensor, V_TRIPPED, V_ARMED, V_LEVEL (vibration in Hz)
73
+ S_MOISTURE, // Moisture sensor, V_TRIPPED, V_ARMED, V_LEVEL (water content or moisture in percentage?)
74
+ } mysensor_sensor;
75
+
35
76
// Type of sensor data (for set/req/ack messages)
36
77
typedef enum {
37
- V_TEMP,V_HUM, V_LIGHT, V_DIMMER, V_PRESSURE, V_FORECAST, V_RAIN,
38
- V_RAINRATE, V_WIND, V_GUST, V_DIRECTION, V_UV, V_WEIGHT, V_DISTANCE,
39
- V_IMPEDANCE, V_ARMED, V_TRIPPED, V_WATT, V_KWH, V_SCENE_ON, V_SCENE_OFF,
40
- V_HEATER, V_HEATER_SW, V_LIGHT_LEVEL, V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5,
41
- V_UP, V_DOWN, V_STOP, V_IR_SEND, V_IR_RECEIVE, V_FLOW, V_VOLUME, V_LOCK_STATUS,
42
- V_DUST_LEVEL, V_VOLTAGE, V_CURRENT
78
+ V_TEMP, // S_TEMP
79
+ V_HUM, // S_HUM
80
+ V_STATUS, // S_LIGHT, S_DIMMER, S_SPRINKLER, Used for setting binary (on/off) status. 1=on, 0=off
81
+ V_LIGHT=2 , // S_LIGHT, S_DIMMER. Same as V_STATUS
82
+ V_PERCENTAGE, // S_DIMMER. Used for sending a percentage value (0-100).
83
+ V_DIMMER=3 , // S_DIMMER. Same as V_PERCENTAGE.
84
+ V_PRESSURE, // S_BARO
85
+ V_FORECAST, // S_BARO
86
+ V_RAIN, // S_RAIN
87
+ V_RAINRATE, // S_RAIN
88
+ V_WIND, // S_WIND
89
+ V_GUST, // S_WIND
90
+ V_DIRECTION, // S_WIND
91
+ V_UV, // S_UV
92
+ V_WEIGHT, // S_WEIGHT
93
+ V_DISTANCE, // S_DISTANCE
94
+ V_IMPEDANCE, // S_MULTIMETER, S_WEIGHT
95
+ V_ARMED, // S_DOOR, S_MOTION, S_SMOKE, S_SPRINKLER
96
+ V_TRIPPED, // S_DOOR, S_MOTION, S_SMOKE, S_SPRINKLER (for sprinklers with fire detection)
97
+ V_WATT, // S_POWER, S_LIGHT, S_DIMMER
98
+ V_KWH, // S_POWER
99
+ V_SCENE_ON, // S_SCENE_CONTROLLER
100
+ V_SCENE_OFF, // S_SCENE_CONTROLLER
101
+ V_HEATER, // Deprecated. Use V_HVAC_FLOW_STATE instead.
102
+ V_HVAC_FLOW_STATE=21 , // HVAC flow state ("Off", "HeatOn", "CoolOn", or "AutoChangeOver"). S_HEATER, S_HVAC
103
+ V_HVAC_SPEED, // HVAC/Heater fan speed ("Min", "Normal", "Max", "Auto")
104
+ V_LIGHT_LEVEL, // S_LIGHT_LEVEL (light level in uncalibrated percentage) or S_LEVEL (light level in lux)
105
+ V_VAR1, V_VAR2, V_VAR3, V_VAR4, V_VAR5,
106
+ V_UP, // S_COVER
107
+ V_DOWN, // S_COVER
108
+ V_STOP, // S_COVER
109
+ V_IR_SEND, // S_IR
110
+ V_IR_RECEIVE, // S_IR
111
+ V_FLOW, // S_WATER
112
+ V_VOLUME, // S_WATER
113
+ V_LOCK_STATUS, // S_LOCK
114
+ V_LEVEL, // S_DUST, S_AIR_QUALITY, S_SOUND (dB), S_VIBRATION (hz), S_LIGHT_LEVEL (lux)
115
+ V_VOLTAGE, // S_MULTIMETER
116
+ V_CURRENT, // S_MULTIMETER
117
+ V_RGB, // S_RGB_LIGHT, S_COLOR_SENSOR.
118
+ // Used for sending color information for multi color LED lighting or color sensors.
119
+ // Sent as ASCII hex: RRGGBB (RR=red, GG=green, BB=blue component)
120
+ V_RGBW, // S_RGBW_LIGHT
121
+ // Used for sending color information to multi color LED lighting.
122
+ // Sent as ASCII hex: RRGGBBWW (WW=while component)
123
+ V_ID, // S_TEMP
124
+ // Used for sending in sensors hardware ids (i.e. OneWire DS1820b).
125
+ V_UNIT_PREFIX, // Allows sensors to send in a string representing the
126
+ // unit prefix to be displayed in GUI, not parsed by controller! E.g. cm, m, km, inch.
127
+ // Can be used for S_DISTANCE or gas concentration (S_DUST, S_AIR_QUALITY)
128
+ V_HVAC_SETPOINT_COLD, // HVAC cold setpoint (Integer between 0-100). S_HVAC
129
+ V_HVAC_SETPOINT_HEAT, // HVAC/Heater setpoint (Integer between 0-100). S_HEATER, S_HVAC
130
+ V_HVAC_FLOW_MODE, // Flow mode for HVAC ("Auto", "ContinuousOn", "PeriodicOn"). S_HVAC
131
+
43
132
} mysensor_data;
44
133
134
+
45
135
// Type of internal messages (for internal messages)
46
136
typedef enum {
47
137
I_BATTERY_LEVEL, I_TIME, I_VERSION, I_ID_REQUEST, I_ID_RESPONSE,
@@ -50,13 +140,6 @@ typedef enum {
50
140
I_REBOOT, I_GATEWAY_READY
51
141
} mysensor_internal;
52
142
53
- // Type of sensor (for presentation message)
54
- typedef enum {
55
- S_DOOR, S_MOTION, S_SMOKE, S_LIGHT, S_DIMMER, S_COVER, S_TEMP, S_HUM, S_BARO, S_WIND,
56
- S_RAIN, S_UV, S_WEIGHT, S_POWER, S_HEATER, S_DISTANCE, S_LIGHT_LEVEL, S_ARDUINO_NODE,
57
- S_ARDUINO_REPEATER_NODE, S_LOCK, S_IR, S_WATER, S_AIR_QUALITY, S_CUSTOM, S_DUST,
58
- S_SCENE_CONTROLLER
59
- } mysensor_sensor;
60
143
61
144
// Type of data stream (for streamed message)
62
145
typedef enum {
0 commit comments