Skip to content

Commit 0724305

Browse files
InovelliUSAInovelliUSA
andauthored
WWSTCERT-8354 Add support for Inovelli mmWave switch VZM32-SN (#2228)
* Add support for Inovelli mmWave switch * Fix for measurement unit being cm (not mm) * Configure illuminance reporting and fix p101-106 unit incorrect * adjusting lux reporting. remove p117 as mmwave param and updated its options * initializing values for occupancy, illuminance, and binding to occupancy cluster * add ability to reset energy meter * add ability to reset energy meter * adjusting some default parameters and adding ota image notify for firmware update process during certification * adding missing OTAUpgrade declaration * removing unused capability * turning on notification child device when color set * fix mmwave reset command * adding ota image select preference * making some modificastions requested by ST * using default illuminance handler * removing some preferences and changing illuminance calculation method * removing extra line and white space * Making some code more efficient and adding unit test files. * Fix linter errors * Fixing more linter errors * adding more unit tests for energy, power, and illuminance reporting * adding unit tests for occupancy. Fix some linter errors * small linter errors fix * adding more unit tests * Fix minor linter error * combining inovelli vzm31 and vzm32 drivers. Add test unit for vzm31 * removing unused files * fix linter errors * remove test unit file * add more unit tests --------- Co-authored-by: InovelliUSA <[email protected]>
1 parent 08ea8eb commit 0724305

File tree

14 files changed

+2820
-886
lines changed

14 files changed

+2820
-886
lines changed

drivers/SmartThings/zigbee-switch/fingerprints.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,6 +2364,11 @@ zigbeeManufacturer:
23642364
manufacturer: Inovelli
23652365
model: VZM31-SN
23662366
deviceProfileName: inovelli-vzm31-sn
2367+
- id: "Inovelli/VZM32-SN"
2368+
deviceLabel: "Inovelli mmWave Dimmer Blue Series"
2369+
manufacturer: Inovelli
2370+
model: VZM32-SN
2371+
deviceProfileName: inovelli-vzm32-sn
23672372
- id: "LAISIAO/BATH"
23682373
deviceLabel: Laisiao Bathroom Heater
23692374
manufacturer: LAISIAO
Lines changed: 355 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,355 @@
1+
name: inovelli-vzm32-sn
2+
components:
3+
- id: main
4+
capabilities:
5+
- id: switch
6+
version: 1
7+
- id: switchLevel
8+
version: 1
9+
- id: motionSensor
10+
version: 1
11+
- id: illuminanceMeasurement
12+
version: 1
13+
config:
14+
values:
15+
- key: "illuminance.value"
16+
range: [0, 5000]
17+
- id: powerMeter
18+
version: 1
19+
- id: energyMeter
20+
version: 1
21+
- id: refresh
22+
version: 1
23+
- id: firmwareUpdate
24+
version: 1
25+
categories:
26+
- name: Switch
27+
- id: button1
28+
label: Down Button
29+
capabilities:
30+
- id: button
31+
version: 1
32+
categories:
33+
- name: RemoteController
34+
- id: button2
35+
label: Up Button
36+
capabilities:
37+
- id: button
38+
version: 1
39+
categories:
40+
- name: RemoteController
41+
- id: button3
42+
label: Config Button
43+
capabilities:
44+
- id: button
45+
version: 1
46+
categories:
47+
- name: RemoteController
48+
preferences:
49+
- name: "notificationChild"
50+
title: "Add Child Device - Notification"
51+
description: "Create Separate Child Device for Notification Control"
52+
required: false
53+
preferenceType: boolean
54+
definition:
55+
default: false
56+
- name: "notificationType"
57+
title: "Notification Effect"
58+
description: "This is the notification effect used by the notification child device"
59+
required: false
60+
preferenceType: enumeration
61+
definition:
62+
options:
63+
"255": "Clear"
64+
"1": "Solid"
65+
"2": "Fast Blink"
66+
"3": "Slow Blink"
67+
"4": "Pulse"
68+
"5": "Chase"
69+
"6": "Open/Close"
70+
"7": "Small-to-Big"
71+
"8": "Aurora"
72+
"9": "Slow Falling"
73+
"10": "Medium Falling"
74+
"11": "Fast Falling"
75+
"12": "Slow Rising"
76+
"13": "Medium Rising"
77+
"14": "Fast Rising"
78+
"15": "Medium Blink"
79+
"16": "Slow Chase"
80+
"17": "Fast Chase"
81+
"18": "Fast Siren"
82+
"19": "Slow Siren"
83+
default: 1
84+
- name: "parameter258"
85+
title: "258. Switch Mode"
86+
description: "Use as a Dimmer or an On/Off switch"
87+
required: false
88+
preferenceType: enumeration
89+
definition:
90+
options:
91+
"0": "Dimmer (default)"
92+
"1": "On/Off"
93+
default: 0
94+
- name: "parameter52"
95+
title: "52. Smart Bulb Mode"
96+
description: "For use with Smart Bulbs that need constant power and are controlled via commands rather than power. Smart Bulb Mode does not work in Dumb 3-Way Switch mode."
97+
required: false
98+
preferenceType: enumeration
99+
definition:
100+
options:
101+
"0": "Disabled (default)"
102+
"1": "Smart Bulb Mode"
103+
default: 0
104+
- name: "parameter1"
105+
title: "1. Dimming Speed (Remote)"
106+
description: "This changes the speed that the light dims up when controlled from the hub. A setting of '0' turns the light immediately on. Increasing the value slows down the transition speed. Value is multiplied by 100ms.
107+
Default=25 (2500ms or 2.5s)"
108+
required: false
109+
preferenceType: number
110+
definition:
111+
minimum: 0
112+
maximum: 126
113+
default: 25
114+
- name: "parameter2"
115+
title: "2. Dimming Speed (Local)"
116+
description: "This changes the speed that the light dims up when controlled at the switch. A setting of '0' turns the light immediately on. Increasing the value slows down the transition speed. Value is multiplied by 100ms.
117+
(i.e 25 = 2500ms or 2.5s) Default=127 (Sync with parameter 1)"
118+
required: false
119+
preferenceType: number
120+
definition:
121+
minimum: 0
122+
maximum: 127
123+
default: 127
124+
- name: "parameter3"
125+
title: "3. Ramp Rate (Remote)"
126+
description: "This changes the speed that the light turns on when controlled from the hub. A setting of '0' turns the light immediately on. Increasing the value slows down the transition speed. Value is multiplied by 100ms.
127+
(i.e 25 = 2500ms or 2.5s) Default=127 (Sync with parameter 1)"
128+
required: false
129+
preferenceType: number
130+
definition:
131+
minimum: 0
132+
maximum: 127
133+
default: 127
134+
- name: "parameter4"
135+
title: "4. Ramp Rate (Local)"
136+
description: "This changes the speed that the light turns on when controlled at the switch. A setting of '0' turns the light immediately on. Increasing the value slows down the transition speed. Value is multiplied by 100ms.
137+
(i.e 25 = 2500ms or 2.5s) Default=127 (Sync with parameter 3)"
138+
required: false
139+
preferenceType: number
140+
definition:
141+
minimum: 0
142+
maximum: 127
143+
default: 127
144+
- name: "parameter9"
145+
title: "9. Minimum Level"
146+
description: "The minimum level that the light can be dimmed. Useful when the user has a light that does not turn on or flickers at a lower level."
147+
required: false
148+
preferenceType: number
149+
definition:
150+
minimum: 1
151+
maximum: 99
152+
default: 1
153+
- name: "parameter10"
154+
title: "10. Maximum Level"
155+
description: "The maximum level that the light can be dimmed. Useful when the user wants to limit the maximum brighness."
156+
required: false
157+
preferenceType: number
158+
definition:
159+
minimum: 2
160+
maximum: 100
161+
default: 100
162+
- name: "parameter15"
163+
title: "15. Level After Power Restored"
164+
description: "The level the switch will return to when power is restored after power failure.
165+
0=Off
166+
1-100=Set Level
167+
101=Use previous level."
168+
required: false
169+
preferenceType: number
170+
definition:
171+
minimum: 0
172+
maximum: 101
173+
default: 101
174+
- name: "parameter95"
175+
title: "95. LED Indicator Color (w/On)"
176+
description: "Set the color of the Full LED Indicator when the load is on."
177+
required: false
178+
preferenceType: enumeration
179+
definition:
180+
options:
181+
"0": "Red"
182+
"7": "Orange"
183+
"28": "Lemon"
184+
"64": "Lime"
185+
"85": "Green"
186+
"106": "Teal"
187+
"127": "Cyan"
188+
"148": "Aqua"
189+
"170": "Blue (default)"
190+
"190": "Violet"
191+
"212": "Magenta"
192+
"234": "Pink"
193+
"255": "White"
194+
default: 170
195+
- name: "parameter96"
196+
title: "96. LED Indicator Color (w/Off)"
197+
description: "Set the color of the Full LED Indicator when the load is off."
198+
required: false
199+
preferenceType: enumeration
200+
definition:
201+
options:
202+
"0": "Red"
203+
"7": "Orange"
204+
"28": "Lemon"
205+
"64": "Lime"
206+
"85": "Green"
207+
"106": "Teal"
208+
"127": "Cyan"
209+
"148": "Aqua"
210+
"170": "Blue (default)"
211+
"190": "Violet"
212+
"212": "Magenta"
213+
"234": "Pink"
214+
"255": "White"
215+
default: 170
216+
- name: "parameter97"
217+
title: "97. LED Indicator Intensity (w/On)"
218+
description: "Set the intensity of the Full LED Indicator when the load is on."
219+
required: false
220+
preferenceType: number
221+
definition:
222+
minimum: 0
223+
maximum: 100
224+
default: 50
225+
- name: "parameter98"
226+
title: "98. LED Indicator Intensity (w/Off)"
227+
description: "Set the intensity of the Full LED Indicator when the load is off."
228+
required: false
229+
preferenceType: number
230+
definition:
231+
minimum: 0
232+
maximum: 100
233+
default: 5
234+
- name: "parameter101"
235+
title: "101. mmWave Height Minimum (Floor)"
236+
description: "Minimum range of the Z-Axis in cm"
237+
required: true
238+
preferenceType: number
239+
definition:
240+
minimum: -600
241+
maximum: 600
242+
default: -300
243+
- name: "parameter102"
244+
title: "102. mmWave Height Maximum (Ceiling)"
245+
description: "Maximum range of the Z-Axis in cm"
246+
required: true
247+
preferenceType: number
248+
definition:
249+
minimum: -600
250+
maximum: 600
251+
default: 300
252+
- name: "parameter103"
253+
title: "103. mmWave Width Minimum (Left)"
254+
description: "Minimum range of the X-Axis in cm"
255+
required: true
256+
preferenceType: number
257+
definition:
258+
minimum: -600
259+
maximum: 600
260+
default: -600
261+
- name: "parameter104"
262+
title: "104. mmWave Width Maximum (Right)"
263+
description: "Maximum range of the X-Axis in cm"
264+
required: true
265+
preferenceType: number
266+
definition:
267+
minimum: -600
268+
maximum: 600
269+
default: 600
270+
- name: "parameter105"
271+
title: "105. mmWave Depth Minimum (Near)"
272+
description: "Minimum range of the Y-Axis in cm"
273+
required: true
274+
preferenceType: number
275+
definition:
276+
minimum: 0
277+
maximum: 600
278+
default: 0
279+
- name: "parameter106"
280+
title: "106. mmWave Depth Maximum (Far)"
281+
description: "Maximum range of the Y-Axis in cm"
282+
required: true
283+
preferenceType: number
284+
definition:
285+
minimum: 0
286+
maximum: 600
287+
default: 600
288+
- name: "parameter110"
289+
title: "110. Light On Presence Behavior"
290+
description: "When presence is detected, choose how to control the light load"
291+
required: true
292+
preferenceType: enumeration
293+
definition:
294+
options:
295+
"0": "Disabled"
296+
"1": "Auto On/Off when occupied (default)"
297+
"2": "Auto Off when vacant"
298+
"3": "Auto On when occupied"
299+
"4": "Auto On/Off when Vacant"
300+
"5": "Auto On when Vacant"
301+
"6": "Auto Off when Occupied"
302+
default: 1
303+
- name: "parameter111"
304+
title: "111. mmWave Control Commands"
305+
description: "Advanced commands to send to the mmWave Module (Please see documentation)"
306+
required: false
307+
preferenceType: enumeration
308+
definition:
309+
options:
310+
"1": "Set Interference Area"
311+
"3": "Clear Interference Area"
312+
"0": "Factory Reset Module"
313+
default: 3
314+
- name: "parameter112"
315+
title: "112. mmWave Detection Sensitivity"
316+
description: "Adjust the sensitivity of the mmWave sensor. 0-Low, 1-Medium, 2-High."
317+
required: false
318+
preferenceType: enumeration
319+
definition:
320+
options:
321+
"0": "Low"
322+
"1": "Medium"
323+
"2": "High (default)"
324+
default: 2
325+
- name: "parameter113"
326+
title: "113. mmWave Detection Delay"
327+
description: "The time from detecting a person to triggering an action. 0-Low (5s), 1-Medium (1s), 2-Fast (0.2s)."
328+
required: false
329+
preferenceType: enumeration
330+
definition:
331+
options:
332+
"0": "5 seconds"
333+
"1": "1 second"
334+
"2": "0.2 seconds (default)"
335+
default: 2
336+
- name: "parameter114"
337+
title: "114. mmWave Time Out"
338+
description: "Adjust the timeout after presence is no longer detected. After the timeout the load will turn off."
339+
required: false
340+
preferenceType: number
341+
definition:
342+
minimum: 0
343+
maximum: 4294967295
344+
default: 30
345+
- name: "parameter34"
346+
title: "34. OTA Image Type"
347+
description: "Which endpoint should the switch advertise for OTA update (Zigbee, mmWave, or both)."
348+
required: true
349+
preferenceType: enumeration
350+
definition:
351+
options:
352+
"0": "Zigbee (default)"
353+
"1": "mmWave"
354+
"2": "Alternating"
355+
default: 0

drivers/SmartThings/zigbee-switch/src/init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ local zigbee_switch_driver_template = {
8484
capabilities.colorTemperature,
8585
capabilities.powerMeter,
8686
capabilities.energyMeter,
87-
capabilities.motionSensor
87+
capabilities.motionSensor,
88+
capabilities.illuminanceMeasurement,
8889
},
8990
sub_drivers = {
9091
lazy_load_if_possible("non_zigbee_devices"),
@@ -112,7 +113,7 @@ local zigbee_switch_driver_template = {
112113
lazy_load_if_possible("bad_on_off_data_type"),
113114
lazy_load_if_possible("robb"),
114115
lazy_load_if_possible("wallhero"),
115-
lazy_load_if_possible("inovelli-vzm31-sn"),
116+
lazy_load_if_possible("inovelli"), -- Combined driver for both VZM31-SN and VZM32-SN
116117
lazy_load_if_possible("laisiao"),
117118
lazy_load_if_possible("tuya-multi"),
118119
lazy_load_if_possible("frient")

0 commit comments

Comments
 (0)