Skip to content

Commit

Permalink
DDF - Add support for _TZE204_cjbofhxw Ampermeter from Matsee
Browse files Browse the repository at this point in the history
  • Loading branch information
BabaIsYou committed May 29, 2023
1 parent a046d54 commit 9ec019d
Showing 1 changed file with 183 additions and 0 deletions.
183 changes: 183 additions & 0 deletions devices/tuya/_TZE204_cjbofhxw_clamp_meter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"schema": "devcap1.schema.json",
"manufacturername": "_TZE204_cjbofhxw",
"modelid": "TS0601",
"product": "Ampermeter from Matsee plus",
"sleeper": false,
"status": "Silver",
"subdevices": [{
"type": "$TYPE_CONSUMPTION_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0702"
],
"items": [{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"parse": {
"fn": "zcl",
"ep": 1,
"cl": "0x0000",
"at": "0x0001",
"script": "tuya_swversion.js"
},
"read": {
"fn": "zcl",
"ep": 1,
"cl": "0x0000",
"at": "0x0001"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/offset",
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/tuya_unlock"
},
{
"name": "config/reachable"
},
{
"name": "state/consumption",
"parse": {
"fn": "tuya",
"dpid": 101,
"eval": "Item.val = Attr.val / 1000;"
},
"read": {
"fn": "none"
},
"default": 0
},
{
"name": "state/lastupdated"
}
]
},
{
"type": "$TYPE_POWER_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0b04"
],
"items": [{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"parse": {
"fn": "zcl",
"ep": 1,
"cl": "0x0000",
"at": "0x0001",
"script": "tuya_swversion.js"
},
"read": {
"fn": "none"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/offset",
"default": 0
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/current",
"parse": {
"fn": "tuya",
"dpid": 18,
"eval": "Item.val = Attr.val / 1000;"
},
"read": {
"fn": "none"
},
"default": 0
},
{
"name": "state/voltage",
"parse": {
"fn": "tuya",
"dpid": 20,
"eval": "Item.val = Attr.val / 10;"
},
"read": {
"fn": "none"
},
"default": 0
},
{
"name": "state/power",
"parse": {
"fn": "tuya",
"dpid": 19,
"eval": "Item.val = Attr.val / 10;"
},
"read": {
"fn": "none"
},
"default": 0
}
]
}
]
}

0 comments on commit 9ec019d

Please sign in to comment.