Skip to content

Commit

Permalink
[KiwiHC16] Integration prise Aqara Smart Plug EU : consommation ne re…
Browse files Browse the repository at this point in the history
…monte pas dans l eq. #2671
  • Loading branch information
www-data authored and KiwiHC16 committed Dec 5, 2023
1 parent d0ea9ce commit d2639c0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 33 deletions.
49 changes: 18 additions & 31 deletions core/config/devices/plug.maeu01/plug.maeu01.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,48 +14,33 @@
"energy": "1"
},
"commands": {
"Status": {
"use": "inf_zbAttr-0006-OnOff",
"isVisible": 1
},
"On": {
"use": "act_zbCmdC-0006-On",
"isVisible": 1
},
"Off": {
"use": "act_zbCmdC-0006-Off",
"isVisible": 1
},
"Get-Status": {
"use": "act_zbReadAttribute",
"params": "clustId=0006&attrId=0000"
},
"Status": {
"use": "inf_zbAttr-0006-OnOff",
"isVisible": 1,
"nextLine": "after"
},
"Bind-01-0006-ToZigate": {
"use": "act_zbBindToZigate",
"params": "ep=01&clustId=0006",
"execAtCreation": "Yes"
},
"SetReporting-01-0006-0000": {
"use": "act_zbConfigureReporting2",
"params": "clustId=0006&attrType=10&attrId=0000",
"execAtCreation": "Yes"
"Power": {
"use": "inf_zbAttr-000C-PresentValue",
"params": "ep=15",
"isVisible": 1
},
"Total power": {
"Consommation": {
"use": "inf_zbAttr-0702-CurrentSummationDelivered",
"params": "ep=01&div=10",
"params": "ep=01&div=1",
"unit": "KWh",
"isVisible": 1
},
"Bind-01-0702-ToZigate": {
"use": "act_zbBindToZigate",
"params": "ep=01&clustId=0702",
"execAtCreation": "Yes"
},
"ActivePower": {
"use": "inf_zbAttr-000C-PresentValue",
"params": "ep=15",
"isVisible": 1
"Get-Status": {
"use": "act_zbReadAttribute",
"params": "clustId=0006&attrId=0000"
}
},
"private": {
Expand All @@ -66,13 +51,15 @@
"info": "0006-01-0000"
},
"95-39": {
"func": "raw",
"func": "numberMult",
"mult": "1",
"info": "0702-01-0000"
}
}
},
"comment": "https://github.com/KiwiHC16/Abeille/issues/1578",
"comment2": "https://github.com/KiwiHC16/Abeille/issues/2665",
"comment3": "https://github.com/KiwiHC16/Abeille/issues/2670"
"comment3": "https://github.com/KiwiHC16/Abeille/issues/2670",
"comment4": "https://github.com/KiwiHC16/Abeille/issues/2671"
}
}
}
6 changes: 4 additions & 2 deletions core/php/AbeilleParser-Xiaomi.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
// }

function xiaomiDecodeFunction($addr, $valueHex, $value, $m, $map, &$attrReportN = null) {
parserLog2('debug', $addr, " BEN valueHex: ".json_encode($valueHex). ", value: ".json_encode($value)." mgs: ".$m );

$value2 = $value;
$mapTxt = ' ==> ';

Expand Down Expand Up @@ -124,7 +126,7 @@ function xiaomiDecodeTags($net, $addr, $clustId, $attrId, $pl, &$attrReportN = n
if (isset($mapping[$idx]))
xiaomiDecodeFunction($addr, $valueHex, $value, $m, $mapping[$idx], $attrReportN);
else {
$m .= ' => '.$value.' (ignored)';
$m .= ' => '.$value.' (ignored (1))';
parserLog2('debug', $addr, $m);
// $toMon[] = $m;
}
Expand Down Expand Up @@ -397,7 +399,7 @@ function xiaomiReportAttribute($net, $addr, $clustId, $attr, &$attrReportN = nul
if (isset($private[$idx]))
xiaomiDecodeFunction($valueHex, $value, $m, $private[$idx], $attrReportN);
else {
$m .= ' => '.$value.' (ignored)';
$m .= ' => '.$value.' (ignored (2))';
parserLog2('debug', $addr, $m);
}

Expand Down

0 comments on commit d2639c0

Please sign in to comment.