Skip to content

Commit

Permalink
Merge pull request #3 from mplogas/issue/1
Browse files Browse the repository at this point in the history
huh wild. the main part of the pr was missing :D
  • Loading branch information
mplogas authored Sep 8, 2024
2 parents ff0c0ad + d6f6894 commit 90e3ca9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
13 changes: 10 additions & 3 deletions src/Ecowitt.Controller/Mapping/ApiDataExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,22 @@ public static Gateway Map(this GatewayApiData gatewayApiData, bool isMetric = tr
double value;
double maxVoltage;
double minVoltage;

/*
*
wh90batt - voltage of the AA batteries
ws90cap_volt - voltage of the capacitor battery (solar charged)
*/
if (propertyName.Equals("wh90batt", StringComparison.InvariantCultureIgnoreCase))
{
maxVoltage = 5.3;
minVoltage = 2.0;
maxVoltage = 3.0;
minVoltage = 2.2;
value = doubleVal / 100;
}
else
{
minVoltage = 1.2;
minVoltage = 1.1;
maxVoltage = 1.5;
value = doubleVal / 10;
}
Expand Down
15 changes: 2 additions & 13 deletions src/Ecowitt.Controller/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,14 @@
"user": "",
"password": "",
"port": 1883,
"basetopic": "ecowitt-dev",
"basetopic": "ec-dev",
"clientId": "ecowitt-controller",
"reconnect": true,
"reconnectAttemps": 5
},
"ecowitt": {
"pollingInterval": 3,
"autodiscovery": true,
"retries": 2,
"gateways": [
{
"name": "Garten",
"ip": "192.168.103.162"
},
{
"name": "Haus",
"ip": "192.168.103.241"
}
]
"autodiscovery": true
},
"controller": {
"precision": 2,
Expand Down

0 comments on commit 90e3ca9

Please sign in to comment.