Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions devices/generic/constants.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"$TYPE_CARBONMONOXIDE_SENSOR": "ZHACarbonMonoxide",
"$TYPE_FORMALDEHYDE_SENSOR": "ZHAFormaldehyde",
"$TYPE_PARTICULATEMATTER_SENSOR": "ZHAParticulateMatter",
"$TYPE_CONTROL_SENSOR": "ZHAControl",
"$TYPE_ALARM_SENSOR": "ZHAAlarm",
"$TYPE_ANCILLARY_CONTROL": "ZHAAncillaryControl",
"$TYPE_BATTERY_SENSOR": "ZHABattery",
Expand Down
8 changes: 8 additions & 0 deletions devices/generic/items/config_learnkey_item.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"schema": "resourceitem1.schema.json",
"id": "config/learnkey",
"datatype": "String",
"access": "RW",
"public": true,
"description": "Memorise code."
}
8 changes: 8 additions & 0 deletions devices/generic/items/config_sendkey_item.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"schema": "resourceitem1.schema.json",
"id": "config/sendkey",
"datatype": "String",
"access": "RW",
"public": true,
"description": "Send a code."
}
17 changes: 17 additions & 0 deletions devices/generic/subdevices/control_sensor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"schema": "subdevice1.schema.json",
"type": "$TYPE_CONTROL_SENSOR",
"name": "ZHAControl",
"restapi": "/sensors",
"order": 20,
"uuid": [
"$address.ext",
"0x01",
"0xFC82"
],
"items": [
"config/on",
"config/reachable",
"state/lastupdated"
]
}
72 changes: 72 additions & 0 deletions devices/heiman/HS2IRC_IR_control.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"schema": "devcap1.schema.json",
"manufacturername": "HEIMAN",
"modelid": "IRControl-EM",
"vendor": "HEIMAN",
"product": "HS2IRC",
"sleeper": false,
"status": "Gold",
"subdevices": [
{
"type": "$ZHAControl",
Comment thread
Smanar marked this conversation as resolved.
Outdated
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0xFC82"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/sendkey",
"write": {
"fn": "zcl:cmd",
"ep": "0x01",
"cl": "0xfc82",
"cmd": "0xf0",
"eval": "('0'+parseInt(Item.val.split(',')[0]).toString(16)).slice(-2) + ('0'+parseInt(Item.val.split(',')[1]).toString(16)).slice(-2);"
}
},
{
"name": "config/learnkey",
"write": {
"fn": "zcl:cmd",
"ep": "0x01",
"cl": "0xfc82",
"cmd": "0xf1",
"eval": "('0'+parseInt(Item.val.split(',')[0]).toString(16)).slice(-2) + ('0'+parseInt(Item.val.split(',')[1]).toString(16)).slice(-2);"
}
},
{
"name": "config/reachable"
}
]
}
]
}
63 changes: 63 additions & 0 deletions general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5253,6 +5253,69 @@ These devices can operate on either battery or mains power, and can have a wide
</server>
</cluster>

<!-- HEIMAN -->
<cluster id="0xfc82" name="Heiman specific" mfcode="0x120b">
<description>Heiman specific attributes for the device HS2IRC.</description>
<server>
<command id="0xf4" dir="recv" name="Create ID" required="m" response="0xf5">
<description>Create model ID</description>
<payload>
<attribute id="0x0000" name="Model type" type="u8" default="0" required="m"></attribute>
</payload>
</command>
<command id="0xf1" dir="recv" name="Learn key" required="m" response="0xf2">
<description>Learn new code</description>
<payload>
<attribute id="0x0000" name="Id" type="u8" default="0" required="m"></attribute>
<attribute id="0x0001" name="Keycode" type="u8" default="0" required="m"></attribute>
</payload>
</command>
<command id="0xf0" dir="recv" name="Send key" required="m">
<description>Send a key</description>
<payload>
<attribute id="0x0000" name="Id" type="u8" default="0" required="m"></attribute>
<attribute id="0x0001" name="Keycode" type="u8" default="0" required="m"></attribute>
</payload>
</command>
<command id="0xf3" dir="recv" name="Delete key" required="m">
<description>Delete a key</description>
<payload>
<attribute id="0x0000" name="Id" type="u8" default="0" required="m"></attribute>
<attribute id="0x0001" name="Keycode" type="u8" default="0" required="m"></attribute>
</payload>
</command>
<command id="0xf6" dir="recv" name="Get list" required="m" response="0xf7">
<description>Get list code</description>
</command>
</server>
<client>
<command id="0xf2" dir="recv" name="Learn key response" required="m">
<description>The Response to the learn key request.</description>
<payload>
<attribute id="0x0000" type="u8" name="Id" required="m" default="0x00"></attribute>
<attribute id="0x0001" type="u8" name="Key Code" required="m" default="0x00"></attribute>
<attribute id="0x0002" type="u8" name="Result" required="m" default="0x00"></attribute>
</payload>
</command>
<command id="0xf7" dir="recv" name="Get list response" required="m">
<description>The Response to the Get list request.</description>
<payload>
<attribute id="0x0000" type="u8" name="Total" required="m" default="0x00"></attribute>
<attribute id="0x0001" type="u8" name="Number" required="m" default="0x00"></attribute>
<attribute id="0x0002" type="u8" name="Length" required="m" default="0x00"></attribute>
<attribute id="0x0003" type="ostring" name="Payload" required="m"></attribute>
</payload>
</command>
<command id="0xf5" dir="recv" name="Create model response" required="m">
<description>The Response to the Create model request.</description>
<payload>
<attribute id="0x0000" type="u8" name="ID" required="m" default="0x00"></attribute>
<attribute id="0x0001" type="u8" name="Model type" required="m" default="0x00"></attribute>
</payload>
</command>
</client>
</cluster>

<!-- Tuya -->
<cluster id="0xe001" name="Tuya specific" mfcode="0x1141">
<description>Tuya Specific switch mode cluster.</description>
Expand Down