Skip to content

Commit

Permalink
remove unneded config and code
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm1957 committed Dec 12, 2024
1 parent 747c458 commit 3fc2f69
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 173 deletions.
144 changes: 0 additions & 144 deletions admin/OLD_index_m.html

This file was deleted.

3 changes: 1 addition & 2 deletions admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"ipaddress": "Ip address",
"on save adapter restarts with new config immediately": "On save adapter restarts with new config immediately",
"ipaddress": "IP address",
"password": "Password",
"pollinterval": "Polling interval"
}
13 changes: 0 additions & 13 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,6 @@
"md": 6,
"lg": 4,
"xl": 4
},
"staticTextNote": {
"type": "staticText",
"label": "on save adapter restarts with new config immediately",
"style": {
"fontSize": 16
},
"newLine": true,
"xs": 12,
"sm": 12,
"md": 6,
"lg": 6,
"xl": 6
}
}
}
4 changes: 2 additions & 2 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
"condition": {
"operand": "and",
"rules": [
"oldVersion<1.0.2",
"newVersion>=1.0.2"
"oldVersion<2.0.0",
"newVersion>=2.0.0"
]
},
"title": {
Expand Down
25 changes: 13 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,28 @@ function startAdapter(options) {
} else {
adapter.log.info('[START] Starting Rain Bird adapter V' + adapterVersion + '' + patchVersion);
adapter.setState('info.connection', true, true);
adapter.getForeignObject('system.config', (err, obj) => {
// adapter.getForeignObject('system.config', (err, obj) => {

//Not necessary any more after changing to jsonconfig and password stored encrypted in io-packages.json:
/*if (obj && obj.native && obj.native.secret) {
//noinspection JSUnresolvedVariable
//adapter.config.password = ioBLib.decrypt(obj.native.secret, adapter.config.password);
// //Not necessary any more after changing to jsonconfig and password stored encrypted in io-packages.json:
// /*if (obj && obj.native && obj.native.secret) {
// //noinspection JSUnresolvedVariable
// //adapter.config.password = ioBLib.decrypt(obj.native.secret, adapter.config.password);

} else {
//noinspection JSUnresolvedVariable
//adapter.config.password = ioBLib.decrypt('Zgfr56gFe87jJOM', adapter.config.password);
}*/
// } else {
// //noinspection JSUnresolvedVariable
// //adapter.config.password = ioBLib.decrypt('Zgfr56gFe87jJOM', adapter.config.password);
// }*/

main();
});
// main();
// });

main();
}
});

return adapter;
}


function main() {
deviceIpAdress = adapter.config.ipaddress;
devicePassword = adapter.config.password;
Expand Down

0 comments on commit 3fc2f69

Please sign in to comment.