Skip to content

Commit

Permalink
bugfixes for converters
Browse files Browse the repository at this point in the history
  • Loading branch information
unltdnetworx committed Sep 2, 2018
1 parent b698b27 commit 3cf13b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
6 changes: 5 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"common": {
"name": "energymanager",
"version": "1.1.1",
"version": "1.1.2",
"news": {
"1.1.2": {
"en": "bugfixes for converters",
"de": "Bugfixes für Wechselrichter"
},
"1.1.1": {
"en": "support for multiple converters on one energymanager",
"de": "Unterstützung für mehrere Wechselrichter an einem Energymanager"
Expand Down
17 changes: 7 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,23 +193,20 @@ function getManagerValues() {
valValue = Math.round(valValue * 100) / 100;
}
if (valValue != null) {
let IDNameClear = content.result.items[i].tagValues.IdName.value
IDNameClear = IDNameClear
.replace(/[ ]+/g,"_")
.replace(/[\.]+/g,"")
.replace(/[\u00df]+/,"SS");
switch(content.result.items[i].deviceModel[1].deviceClass) {
case "com.kiwigrid.devices.inverter.Inverter":
case "com.kiwigrid.devices.powermeter.PowerMeter":
strGroup=translateName(content.result.items[i].deviceModel[2].deviceClass.split(".").pop()) + "_" + IDNameClear;
strGroup=translateName(content.result.items[i].deviceModel[2].deviceClass.split(".").pop()) + "_(" + IDNameClear + ")";
break;

case "com.kiwigrid.devices.location.Location":
case "com.kiwigrid.devices.pvplant.PVPlant":
let IDNameClear = content.result.items[i].tagValues.IdName.value
IDNameClear = IDNameClear
.replace(/[ ]+/g,"_")
.replace(/[\.]+/g,"")
.replace(/[\u00c4 \u00e4]+/,"AE")
.replace(/[\u00d6 \u00f6]+/,"OE")
.replace(/[\u00dc \u00fc]+/,"UE")
.replace(/[\u00df]+/,"SS");
strGroup=translateName(content.result.items[i].deviceModel[1].deviceClass.split(".").pop()) + "_" + IDNameClear;
strGroup=translateName(content.result.items[i].deviceModel[1].deviceClass.split(".").pop()) + "_(" + IDNameClear + ")";
break;

default:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.energymanager",
"version": "1.1.1",
"version": "1.1.2",
"description": "energymanager for kiwigrid powered devices",
"author": {
"name": "Michael Schuster",
Expand Down

0 comments on commit 3cf13b7

Please sign in to comment.