Skip to content

Commit

Permalink
Merge pull request #48 from mhzawadi/0.1.6
Browse files Browse the repository at this point in the history
0.1.6/new vars
  • Loading branch information
mhzawadi authored May 5, 2024
2 parents da1d66a + 744dd81 commit 18c43f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/model/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public function process_data($mqtt_topic, $foxess_data, $collected_data, $total_
$this->log('Post '.$value.' of '.$name.' to MQTT', 1);

}
}elseif(strstr($option, 'currentFault') !== false ||
strstr($option, 'currentFaultCount') !== false){ // only Faults
$this->mqtt->post_mqtt(''.$mqtt_topic.'/'.$deviceSN.'/'.$name, $data['value']);
$this->log('Post '.$data['value'].' of '.$name.' to MQTT', 1);
}elseif(strstr($option, 'runningState') !== false){ // only runningState
$data = $collected_data[$device]['result'][0]['datas'][$i];
switch($data['value']){
Expand Down

0 comments on commit 18c43f2

Please sign in to comment.