Skip to content

Commit

Permalink
Merge branch 'main' of github.com:raschy/ioBroker.deyeidc
Browse files Browse the repository at this point in the history
  • Loading branch information
raschy committed Jan 2, 2024
2 parents 029e7c4 + 84ea2b7 commit b46b16f
Show file tree
Hide file tree
Showing 4 changed files with 218 additions and 511 deletions.
16 changes: 6 additions & 10 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,15 @@
},
{
"type": "number",
"trim": false,
"attr": "rules",
"width": "15%",
"title": "rule",
"default": ""
},
{
"type": "text",
"trim": false,
"attr": "key",
"trim": true,
"width": "20%",
"title": "key",
"default": "",
Expand All @@ -131,7 +130,7 @@
},
{
"type": "text",
"trim": false,
"trim": true,
"attr": "name",
"width": "30%",
"title": "name",
Expand All @@ -141,23 +140,21 @@
},
{
"type": "text",
"trim": false,
"trim": true,
"attr": "unit",
"width": "15%",
"title": "unit",
"default": ""
},
{
"type": "number",
"trim": false,
"attr": "factor",
"width": "15%",
"title": "factor",
"default": 0
},
{
"type": "checkbox",
"trim": false,
"attr": "nullable",
"width": "15%",
"title": "nullable",
Expand Down Expand Up @@ -205,23 +202,22 @@
},
{
"type": "text",
"trim": false,
"trim": true,
"attr": "name",
"width": "30%",
"title": "name",
"default": ""
},
{
"type": "text",
"trim": false,
"trim": true,
"attr": "unit",
"width": "15%",
"title": "unit",
"default": ""
},
{
"type": "number",
"trim": false,
"attr": "factor",
"width": "15%",
"title": "factor",
Expand All @@ -240,4 +236,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class Deyeidc extends utils.Adapter {
//this.log.debug('Connection error');
this.connectionActive = false;
this.setState('info.connection', { val: this.connectionActive, ack: true });
if (error.message.indexOf('EHOSTUNREACH') > 1 || error.message.indexOf('ECONRESET')) {
if (error.message.indexOf('EHOSTUNREACH') > 1 || error.message.indexOf('ECONRESET') > 1) {
this.log.debug(`No connection to inverter: '${error.message}'`);
this.offlineReset();
} else {
Expand Down Expand Up @@ -243,7 +243,7 @@ class Deyeidc extends utils.Adapter {
const req = 0;
const powerControlRegister = 40;
const data = [];
if (state.val > 100) {
if (state.val < 1 || state.val > 100) {
data[0] = 100;
} else {
data[0] = state.val;
Expand Down
Loading

0 comments on commit b46b16f

Please sign in to comment.