supla-device
Loading...
Searching...
No Matches
events.h
1/*
2 Copyright (C) AC SOFTWARE SP. Z O.O.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15*/
16
17#ifndef SRC_SUPLA_EVENTS_H_
18#define SRC_SUPLA_EVENTS_H_
19
20namespace Supla {
21
22enum Event {
23 // Supla::Control::Button events
24 ON_PRESS, // Triggered on transition to valueOnPress()
25 ON_RELEASE, // Triggered on transition from valueOnPress()
26 ON_CHANGE, // Triggered on all transitions
27 ON_HOLD, // Triggered when button is hold
28 ON_CLICK_1, // ON_MULTI_x is triggered when multiclick is detected
29 ON_CLICK_2,
30 ON_CLICK_3,
31 ON_CLICK_4,
32 ON_CLICK_5,
33 ON_CLICK_6,
34 ON_CLICK_7,
35 ON_CLICK_8,
36 ON_CLICK_9,
37 ON_CLICK_10,
38 ON_CRAZY_CLICKER, // triggered on >= 10 clicks
39 ON_SEQUENCE_MATCH, // triggered by SequenceButton
40 ON_SEQUENCE_DOESNT_MATCH, // triggered by SequenceButton
41 ON_TURN_ON,
42 ON_TURN_OFF,
43 ON_SECONDARY_CHANNEL_CHANGE,
44 ON_LONG_CLICK_0,
45 ON_LONG_CLICK_1,
46 ON_LONG_CLICK_2,
47 ON_LONG_CLICK_3,
48 ON_LONG_CLICK_4,
49 ON_LONG_CLICK_5,
50 ON_LONG_CLICK_6,
51 ON_LONG_CLICK_7,
52 ON_LONG_CLICK_8,
53 ON_LONG_CLICK_9,
54 ON_LONG_CLICK_10,
55 // Conditional events are triggered only when no on_hold was send
56 // and we are not in the middle of muliclick detection.
57 // Otherwise they work as standard events.
58 // Conditional on_press is send on first press in multiclick detection
59 // and on_release is send only after first button release in multiclick
60 // detection (when no on_hold was send)
61 CONDITIONAL_ON_PRESS,
62 CONDITIONAL_ON_RELEASE,
63 CONDITIONAL_ON_CHANGE,
64
65 // SuplaDeviceClass events
66 ON_DEVICE_STATUS_CHANGE,
67
68 // Html TextCmdInputParameter
69 ON_EVENT_1,
70 ON_EVENT_2,
71 ON_EVENT_3,
72 ON_EVENT_4,
73 ON_EVENT_5,
74 ON_EVENT_6,
75 ON_EVENT_7,
76 ON_EVENT_8,
77 ON_EVENT_9,
78 ON_EVENT_10,
79
80 // RGBW/DIMMER events
81 ON_DIMMER_TURN_ON, // when "brightness" changes from 0 to non-0
82 ON_DIMMER_TURN_OFF, // when "brightness" changes from non-0 to 0
83 ON_DIMMER_BRIGHTNESS_CHANGE, // on every change of "brightness"
84 ON_COLOR_TURN_ON, // when "color brightness" changes from 0 to non-0
85 ON_COLOR_TURN_OFF, // when "color brightness" changes from non-0 to 0
86 ON_COLOR_BRIGHTNESS_CHANGE, // on every change of "color brightness"
87 ON_RED_TURN_ON, // when "red" changes from 0 to non-0
88 ON_RED_TURN_OFF, // when "red" changes from non-0 to 0
89 ON_RED_CHANGE, // on every change of "red"
90 ON_GREEN_TURN_ON, // when "green" changes from 0 to non-0
91 ON_GREEN_TURN_OFF, // when "green" changes from non-0 to 0
92 ON_GREEN_CHANGE, // on every change of "green"
93 ON_BLUE_TURN_ON, // when "blue" changes from 0 to non-0
94 ON_BLUE_TURN_OFF, // when "blue" changes from non-0 to 0
95 ON_BLUE_CHANGE, // on every change of "blue"
96
97 ON_CHANNEL_OFFLINE,
98 ON_CHANNEL_ONLINE,
99
100 ON_HVAC_HEATING,
101 ON_HVAC_COOLING,
102 ON_HVAC_STANDBY,
103 ON_HVAC_WEEKLY_SCHEDULE_ENABLED,
104 ON_HVAC_WEEKLY_SCHEDULE_DISABLED,
105 ON_HVAC_MODE_OFF,
106 ON_HVAC_MODE_HEAT,
107 ON_HVAC_MODE_COOL,
108 ON_HVAC_MODE_HEAT_COOL,
109
110 ON_ERROR,
111 ON_ERROR_CLEAR,
112
113 // Container events
114 ON_CONTAINER_ALARM_ACTIVE,
115 ON_CONTAINER_ALARM_INACTIVE,
116 ON_CONTAINER_WARNING_ACTIVE,
117 ON_CONTAINER_WARNING_INACTIVE,
118 ON_CONTAINER_INVALID_SENSOR_STATE_ACTIVE,
119 ON_CONTAINER_INVALID_SENSOR_STATE_INACTIVE,
120 ON_CONTAINER_SOUND_ALARM_ACTIVE,
121 ON_CONTAINER_SOUND_ALARM_INACTIVE,
122 ON_CONTAINER_SENSOR_OFFLINE_ACTIVE,
123 ON_CONTAINER_SENSOR_OFFLINE_INACTIVE,
124 ON_CONTAINER_SOUND_ALARM_MUTED,
125
126 // Valve events
127 ON_OPEN,
128 ON_CLOSE,
129 ON_FLOODING_ACTIVE,
130 ON_FLOODING_INACTIVE,
131 ON_VALVE_MANUALLY_CLOSED_ACTIVE,
132 ON_VALVE_MANUALLY_CLOSED_INACTIVE,
133 ON_MOTOR_PROBLEM_ACTIVE,
134 ON_MOTOR_PROBLEM_INACTIVE,
135
136 ON_SUBDEVICE_PAIRING_START,
137 ON_SUBDEVICE_PAIRING_END,
138};
139
140}; // namespace Supla
141
142#endif // SRC_SUPLA_EVENTS_H_