| ... | ... |
@@ -105,6 +105,24 @@ while (my $mqttMessage = <$SUB> ) {
|
| 105 | 105 |
addDB ($topic, "Today", $decoded->{'ENERGY'}{'Today'});
|
| 106 | 106 |
} |
| 107 | 107 |
} |
| 108 |
+ if ($queue eq "RESULT"){ # topic nou sonoff v6.2.1 sonoff bridge
|
|
| 109 |
+ my $decoded = decode_json($json); |
|
| 110 |
+ if (exists $decoded->{'RfReceived'}{'Sync'}){
|
|
| 111 |
+ addDB ($topic, "Sync", $decoded->{'RfReceived'}{'Sync'});
|
|
| 112 |
+ } |
|
| 113 |
+ if (exists $decoded->{'RfReceived'}{'Low'}){
|
|
| 114 |
+ addDB ($topic, "Low", $decoded->{'RfReceived'}{'Low'});
|
|
| 115 |
+ } |
|
| 116 |
+ if (exists $decoded->{'RfReceived'}{'High'}){
|
|
| 117 |
+ addDB ($topic, "High", $decoded->{'RfReceived'}{'High'});
|
|
| 118 |
+ } |
|
| 119 |
+ if (exists $decoded->{'RfReceived'}{'Data'}){
|
|
| 120 |
+ addDB ($topic, "Data", $decoded->{'RfReceived'}{'Data'});
|
|
| 121 |
+ } |
|
| 122 |
+ if (exists $decoded->{'RfReceived'}{'RfKey'}){
|
|
| 123 |
+ addDB ($topic, "RfKey", $decoded->{'RfReceived'}{'RfKey'});
|
|
| 124 |
+ } |
|
| 125 |
+ } |
|
| 108 | 126 |
if ($queue eq "ESP"){
|
| 109 | 127 |
my $decoded = decode_json($json); |
| 110 | 128 |
if (exists $decoded->{'Temp'}){
|
| ... | ... |
@@ -25,4 +25,7 @@ tele/1mining-7408/STATE |
| 25 | 25 |
sonoff v5.12.0<br> |
| 26 | 26 |
tele/rqx958t-1413/STATE {"Time":"2018-03-09T22:01:59",<strong>"Uptime":"0T00:25:17"</strong>,"Vcc":3.239,"POWER":"ON","Wifi":{"AP":1,"SSId":"duia","RSSI":56,"APMac":"80:8C:97:73:F4:11"}}<br>
|
| 27 | 27 |
tele/rqx958t-1413/SENSOR {"Time":"2018-03-09T22:01:59","ENERGY":{"Total":77.496,<strong>"Yesterday":0.902</strong>,<strong>"Today":0.822</strong>,"Period":3,"Power":36,"Factor":0.79,"Voltage":243,"Current":0.189}}<br>
|
| 28 |
+ |
|
| 29 |
+sonoff v6.2.1 - sonoff bridge<br> |
|
| 30 |
+tele/rqx958t-1773/RESULT {"RfReceived":<strong>{"Sync":9830</strong>,<strong>"Low":260</strong>,<strong>"High":320</strong>,<strong>"Data":"FFFFFF"</strong>,<strong>"RfKey":"None"</strong>}}
|
|
| 28 | 31 |
</p> |