diff --git a/packages/config/config/devices/0x015f/mh-c321.json b/packages/config/config/devices/0x015f/mh-c321.json new file mode 100644 index 000000000000..28d17ec8f725 --- /dev/null +++ b/packages/config/config/devices/0x015f/mh-c321.json @@ -0,0 +1,115 @@ +{ + "manufacturer": "McoHome Technology Co., Ltd.", + "manufacturerId": "0x015f", + "label": "MH-C321", + "description": "Shutter Panel", + "devices": [ + { + "productType": "0xc321", + "productId": "0x5102" + } + ], + "firmwareVersion": { + "min": "0.0", + "max": "255.255" + }, + "paramInformation": [ + { + "#": "1", + "$import": "templates/mcohome_template.json#w_report_interval" + }, + { + "#": "2", + "$import": "templates/mcohome_template.json#kwh_report_interval" + }, + { + "#": "5", + "$import": "templates/mcohome_template.json#level_report_mode" + }, + { + "#": "8", + "$import": "templates/mcohome_template.json#backlight_brightness" + }, + { + "#": "7", + "$import": "templates/mcohome_template.json#demo_trip" + }, + { + "#": "10", + "$import": "templates/mcohome_template.json#auto_calibrate" + }, + { + "#": "9", + "$import": "templates/mcohome_template.json#demo_trip_and_calibrate" + }, + { + "#": "11", + "$import": "templates/mcohome_template.json#min_shutter_level" + }, + { + "#": "12", + "$import": "templates/mcohome_template.json#max_shutter_level" + }, + { + "#": "13", + "label": "External Switch Type", + "valueSize": 1, + "defaultValue": 0, + "allowManualEntry": false, + "options": [ + { + "label": "Button (Momentary buttons)", + "value": 0 + }, + { + "label": "Toggle (2-State switches)", + "value": 1 + } + ] + }, + { + "#": "14", + "label": "External Switch Input", + "valueSize": 1, + "defaultValue": 0, + "allowManualEntry": false, + "options": [ + { + "label": "Function disabled", + "value": 0 + }, + { + "label": "External switch wired to S1", + "value": 1 + }, + { + "label": "External switch wired to S2", + "value": 2 + }, + { + "label": "Switches wired to S1 and S2, each control both directions", + "value": 3 + }, + { + "label": "Switches wired to S1 and S2, S1 for open, S2 for close", + "value": 4 + } + ] + }, + { + "#": "255", + "$import": "templates/mcohome_template.json#factory_reset" + } + ], + "compat": { + "commandClasses": { + "add": { + "Multilevel Switch": { + // This is a roller shutter, but it responds to the CC version request with 0 + "isSupported": true, + "version": 1 + } + } + } + } +} diff --git a/packages/config/config/devices/0x015f/mh-c421.json b/packages/config/config/devices/0x015f/mh-c421.json index 9fa0a0fef8a0..61167f58dead 100644 --- a/packages/config/config/devices/0x015f/mh-c421.json +++ b/packages/config/config/devices/0x015f/mh-c421.json @@ -2,7 +2,7 @@ "manufacturer": "McoHome Technology Co., Ltd.", "manufacturerId": "0x015f", "label": "MH-C421", - "description": "MCO HOME Micro Shutter", + "description": "Shutter Panel", "devices": [ { "productType": "0xc421", @@ -16,114 +16,39 @@ "paramInformation": [ { "#": "1", - "label": "Watt Meter Report Period", - "valueSize": 2, - "unit": "5 seconds", - "minValue": 1, - "maxValue": 32767, - "defaultValue": 720 + "$import": "templates/mcohome_template.json#w_report_interval" }, { "#": "2", - "label": "kWh Meter Report Period", - "valueSize": 2, - "unit": "10 minutes", - "minValue": 1, - "maxValue": 32767, - "defaultValue": 6 + "$import": "templates/mcohome_template.json#kwh_report_interval" }, { "#": "5", - "label": "Level Report Trigger", - "valueSize": 1, - "defaultValue": 2, - "allowManualEntry": false, - "options": [ - { - "label": "Report every 5 seconds", - "value": 1 - }, - { - "label": "Report every 10% change", - "value": 2 - } - ] - }, - { - "#": "7", - "label": "Read Motor Data On First Use", - "description": "Run the motor for 3 seconds to read motor data", - "valueSize": 1, - "defaultValue": 1, - "allowManualEntry": false, - "options": [ - { - "label": "Disable", - "value": 0 - }, - { - "label": "Enable", - "value": 1 - } - ] + "$import": "templates/mcohome_template.json#level_report_mode" }, { "#": "8", - "label": "LED Backlight Brightness", - "valueSize": 1, - "minValue": 0, - "maxValue": 10, - "defaultValue": 10 + "$import": "templates/mcohome_template.json#backlight_brightness" }, { - "#": "9", - "label": "Read Motor Data and Auto Calibrate", - "valueSize": 1, - "defaultValue": 0, - "allowManualEntry": false, - "options": [ - { - "label": "Normal operation", - "value": 0 - }, - { - "label": "Activate", - "value": 1 - } - ] + "#": "7", + "$import": "templates/mcohome_template.json#demo_trip" }, { "#": "10", - "label": "Auto Calibrate", - "valueSize": 1, - "defaultValue": 0, - "allowManualEntry": false, - "options": [ - { - "label": "Normal operation", - "value": 0 - }, - { - "label": "Activate", - "value": 1 - } - ] + "$import": "templates/mcohome_template.json#auto_calibrate" + }, + { + "#": "9", + "$import": "templates/mcohome_template.json#demo_trip_and_calibrate" }, { "#": "11", - "label": "Min Level Shutter Close", - "valueSize": 1, - "minValue": 0, - "maxValue": 98, - "defaultValue": 0 + "$import": "templates/mcohome_template.json#min_shutter_level" }, { "#": "12", - "label": "Max Level Shutter Open", - "valueSize": 1, - "minValue": 1, - "maxValue": 99, - "defaultValue": 99 + "$import": "templates/mcohome_template.json#max_shutter_level" }, { "#": "13", @@ -173,20 +98,7 @@ }, { "#": "255", - "label": "Factory Reset", - "valueSize": 1, - "defaultValue": 0, - "allowManualEntry": false, - "options": [ - { - "label": "Normal operation", - "value": 0 - }, - { - "label": "Reset", - "value": 85 - } - ] + "$import": "templates/mcohome_template.json#factory_reset" } ], "compat": { diff --git a/packages/config/config/devices/0x015f/mh-c521.json b/packages/config/config/devices/0x015f/mh-c521.json new file mode 100644 index 000000000000..0dbbd407ad46 --- /dev/null +++ b/packages/config/config/devices/0x015f/mh-c521.json @@ -0,0 +1,69 @@ +{ + "manufacturer": "McoHome Co., Ltd.", + "manufacturerId": "0x015f", + "label": "MH-C521", + "description": "Shutter Panel", + "devices": [ + { + "productType": "0xc521", + "productId": "0x5106" + } + ], + "firmwareVersion": { + "min": "0.0", + "max": "255.255" + }, + "paramInformation": [ + { + "#": "1", + "$import": "templates/mcohome_template.json#w_report_interval" + }, + { + "#": "2", + "$import": "templates/mcohome_template.json#kwh_report_interval" + }, + { + "#": "5", + "$import": "templates/mcohome_template.json#level_report_mode" + }, + { + "#": "8", + "$import": "templates/mcohome_template.json#backlight_brightness" + }, + { + "#": "7", + "$import": "templates/mcohome_template.json#demo_trip" + }, + { + "#": "10", + "$import": "templates/mcohome_template.json#auto_calibrate" + }, + { + "#": "9", + "$import": "templates/mcohome_template.json#demo_trip_and_calibrate" + }, + { + "#": "11", + "$import": "templates/mcohome_template.json#min_shutter_level" + }, + { + "#": "12", + "$import": "templates/mcohome_template.json#max_shutter_level" + }, + { + "#": "255", + "$import": "templates/mcohome_template.json#factory_reset" + } + ], + "compat": { + "commandClasses": { + "add": { + "Multilevel Switch": { + // This is a roller shutter, but it responds to the CC version request with 0 + "isSupported": true, + "version": 1 + } + } + } + } +} diff --git a/packages/config/config/devices/0x015f/mh-c621.json b/packages/config/config/devices/0x015f/mh-c621.json new file mode 100644 index 000000000000..32db63f6d8c0 --- /dev/null +++ b/packages/config/config/devices/0x015f/mh-c621.json @@ -0,0 +1,69 @@ +{ + "manufacturer": "McoHome Co., Ltd.", + "manufacturerId": "0x015f", + "label": "MH-C621", + "description": "Shutter Panel", + "devices": [ + { + "productType": "0xc621", + "productId": "0x5106" + } + ], + "firmwareVersion": { + "min": "0.0", + "max": "255.255" + }, + "paramInformation": [ + { + "#": "1", + "$import": "templates/mcohome_template.json#w_report_interval" + }, + { + "#": "2", + "$import": "templates/mcohome_template.json#kwh_report_interval" + }, + { + "#": "5", + "$import": "templates/mcohome_template.json#level_report_mode" + }, + { + "#": "8", + "$import": "templates/mcohome_template.json#backlight_brightness" + }, + { + "#": "7", + "$import": "templates/mcohome_template.json#demo_trip" + }, + { + "#": "10", + "$import": "templates/mcohome_template.json#auto_calibrate" + }, + { + "#": "9", + "$import": "templates/mcohome_template.json#demo_trip_and_calibrate" + }, + { + "#": "11", + "$import": "templates/mcohome_template.json#min_shutter_level" + }, + { + "#": "12", + "$import": "templates/mcohome_template.json#max_shutter_level" + }, + { + "#": "255", + "$import": "templates/mcohome_template.json#factory_reset" + } + ], + "compat": { + "commandClasses": { + "add": { + "Multilevel Switch": { + // This is a roller shutter, but it responds to the CC version request with 0 + "isSupported": true, + "version": 1 + } + } + } + } +} diff --git a/packages/config/config/devices/0x015f/mh-s521.json b/packages/config/config/devices/0x015f/mh-s521.json deleted file mode 100644 index d0d14bee5a18..000000000000 --- a/packages/config/config/devices/0x015f/mh-s521.json +++ /dev/null @@ -1,305 +0,0 @@ -{ - "manufacturer": "McoHome Technology Co., Ltd.", - "manufacturerId": "0x015f", - "label": "MH-S521", - "description": "Shutter Panel", - "devices": [ - { - "productType": "0xc321", - "productId": "0x5102" - }, - { - "productType": "0xc521", - "productId": "0x5101" - } - ], - "firmwareVersion": { - "min": "0.0", - "max": "255.255" - }, - "paramInformation": [ - { - "#": "2", - "$import": "~/templates/master_template.json#state_after_power_failure_off_prev" - }, - { - "#": "3", - "label": "ALL ON/ALL OFF", - "valueSize": 1, - "defaultValue": 255, - "unsigned": true, - "allowManualEntry": false, - "options": [ - { - "label": "Forbid all on, forbid all off", - "value": 0 - }, - { - "label": "Forbid all on, allow all off", - "value": 1 - }, - { - "label": "Allow all on, forbid all off", - "value": 2 - }, - { - "label": "Allow all on, allow all off", - "value": 255 - } - ] - }, - { - "#": "4", - "label": "LED Backlit Brightness Level", - "valueSize": 1, - "minValue": 0, - "maxValue": 10, - "defaultValue": 10 - }, - { - "#": "5", - "label": "Key Mode", - "valueSize": 1, - "defaultValue": 0, - "allowManualEntry": false, - "options": [ - { - "label": "Single click to switch on/off status", - "value": 0 - }, - { - "label": "Key default as off state", - "value": 1 - }, - { - "label": "Key default as on state", - "value": 2 - }, - { - "label": "Hold >3s then key is on, and off once released", - "value": 3 - }, - { - "label": "Single click + hold >3s then key is on", - "value": 4 - } - ] - }, - { - "#": "6", - "label": "Key On Duration", - "valueSize": 2, - "unit": "seconds", - "minValue": 0, - "maxValue": 65535, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "8", - "label": "Basic CC Integration Setting", - "valueSize": 1, - "minValue": 0, - "maxValue": 3, - "defaultValue": 0 - }, - { - "#": "16", - "label": "Scene Respond", - "valueSize": 1, - "minValue": 0, - "maxValue": 0, - "defaultValue": 0 - }, - { - "#": "17", - "label": "Key1 Scene Activate Mode Setting", - "valueSize": 1, - "defaultValue": 0, - "allowManualEntry": false, - "options": [ - { - "label": "Scene activate function disabled", - "value": 0 - }, - { - "label": "One click key1 always activate scene ID1", - "value": 1 - }, - { - "label": "Only activate scene ID1 when key1's relay open", - "value": 2 - }, - { - "label": "Only activate scene ID1 when key1's relay closed", - "value": 3 - } - ] - }, - { - "#": "18", - "label": "Key1 Activate Scene ID", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "19", - "label": "Key1 Activate Scene Duration", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "20", - "label": "Key2 Scene Activate Mode Setting", - "valueSize": 1, - "defaultValue": 0, - "allowManualEntry": false, - "options": [ - { - "label": "Scene activate function disabled", - "value": 0 - }, - { - "label": "Always activate scene ID1", - "value": 1 - }, - { - "label": "Only activate scene ID1 when key2's relay open", - "value": 2 - }, - { - "label": "Nly activate scene ID1 when key2's relay closed", - "value": 3 - } - ] - }, - { - "#": "21", - "label": "Key2 Activate Scene ID", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "22", - "label": "Key2 Activate Scene Duration", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "23", - "label": "Key3 Scene Activate Mode Setting", - "valueSize": 1, - "defaultValue": 0, - "allowManualEntry": false, - "options": [ - { - "label": "Scene activate function disabled", - "value": 0 - }, - { - "label": "Always activate scene ID1", - "value": 1 - }, - { - "label": "Only activate scene ID1 when key3's relay open", - "value": 2 - }, - { - "label": "Only activate scene ID1 when key3's relay closed", - "value": 3 - } - ] - }, - { - "#": "24", - "label": "Key3 Activate Scene ID", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "25", - "label": "Key3 Activate Scene Duration", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "32", - "label": "Scene Respond ID 1-50", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "33", - "label": "Scene Respond ID 51-100", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "34", - "label": "Scene Respond ID 101-150", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "35", - "label": "Scene Respond ID 151-200", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "36", - "label": "Scene Respond ID 201-250", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true - }, - { - "#": "255", - "label": "Factory Reset", - "valueSize": 1, - "minValue": 0, - "maxValue": 255, - "defaultValue": 0, - "unsigned": true, - "writeOnly": true, - "options": [ - { - "label": "Restore factory setting", - "value": 85 - } - ] - } - ] -} diff --git a/packages/config/config/devices/0x015f/templates/mcohome_template.json b/packages/config/config/devices/0x015f/templates/mcohome_template.json new file mode 100644 index 000000000000..d17ff4d907dc --- /dev/null +++ b/packages/config/config/devices/0x015f/templates/mcohome_template.json @@ -0,0 +1,126 @@ +{ + "w_report_interval": { + "label": "Power (W) Report Interval", + "valueSize": 2, + "unit": "5 seconds", + "minValue": 1, + "maxValue": 32767, + "defaultValue": 720 + }, + "kwh_report_interval": { + "label": "Energy (kWh) Report Interval", + "valueSize": 2, + "unit": "10 minutes", + "minValue": 1, + "maxValue": 32767, + "defaultValue": 6 + }, + "level_report_mode": { + "label": "Level Report Mode", + "valueSize": 1, + "defaultValue": 2, + "allowManualEntry": false, + "options": [ + { + "label": "Every 5 seconds while moving", + "value": 1 + }, + { + "label": "Every 10% change", + "value": 2 + } + ] + }, + "backlight_brightness": { + "label": "Backlight Brightness", + "valueSize": 1, + "minValue": 0, + "maxValue": 10, + "defaultValue": 10, + "options": [ + { + "label": "Disable", + "value": 0 + } + ] + }, + "demo_trip": { + "label": "Demo Trip", + "description": "Run the motor for 3 seconds to read motor data", + "valueSize": 1, + "defaultValue": 0, + "allowManualEntry": false, + "options": [ + { + "label": "Idle", + "value": 0 + }, + { + "label": "Activate", + "value": 1 + } + ] + }, + "auto_calibrate": { + "label": "Auto Calibrate", + "valueSize": 1, + "defaultValue": 0, + "allowManualEntry": false, + "options": [ + { + "label": "Idle", + "value": 0 + }, + { + "label": "Activate", + "value": 1 + } + ] + }, + "demo_trip_and_calibrate": { + "label": "Demo Trip and Auto Calibrate", + "valueSize": 1, + "defaultValue": 0, + "allowManualEntry": false, + "options": [ + { + "label": "Idle", + "value": 0 + }, + { + "label": "Activate", + "value": 1 + } + ] + }, + "min_shutter_level": { + "label": "Minimum Shutter Level (Closed)", + "valueSize": 1, + "minValue": 0, + "maxValue": 98, + "defaultValue": 0 + }, + "max_shutter_level": { + "label": "Maximum Shutter Level (Open)", + "valueSize": 1, + "minValue": 1, + "maxValue": 99, + "defaultValue": 99 + }, + "factory_reset": { + "label": "Factory Reset", + "valueSize": 1, + "defaultValue": 0, + "allowManualEntry": false, + "options": [ + { + "label": "Normal operation", + "value": 0 + }, + { + "label": "Reset", + "value": 85 + } + ] + } +}