Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ka-vaNu/ioBroker.blebox
Browse files Browse the repository at this point in the history
  • Loading branch information
ka-vaNu committed Oct 13, 2023
2 parents abe4abb + beb38bd commit 855cb61
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Aktuell werden folgende Geräte unterstützt:
* tempsensor
* gatebox
* tvlift
* multisensor - nicht mit realer Hardware getestet, es werden bis zu 4 Sensoren unterstützt

## Changelog

Expand Down
4 changes: 4 additions & 0 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
"label": "tempsensor",
"value": "tempsensor"
},
{
"label": "multisensor",
"value": "multisensor"
},
{
"label": "tvlift",
"value": "tvlift"
Expand Down
5 changes: 4 additions & 1 deletion lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ async function initIobStates (name, datapoints) {
iob.setObject(path, {
type: iobObject.type,
common: iobObject.common,
role: iobObject.role,
read: iobObject.read,
write: iobObject.write,
native: {}
});
}
Expand Down Expand Up @@ -100,7 +103,7 @@ async function setIobStates (device, values) {
}
}
} else {
if (iob.extLog) iob.log.info("setIobStates search: " + search + " not found");
if (iob.extLog) iob.log.warn("setIobStates search: " + search + " not found");
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const gatebox = require("./lib/gatebox");
const shutterbox = require("./lib/shutterbox");
const switchbox = require("./lib/switchbox");
const tempsensor = require("./lib/tempsensor");
const multisensor = require("./lib/multisensor");
const saunabox = require("./lib/saunabox");
const tvlift = require("./lib/tvlift");

Expand Down Expand Up @@ -100,6 +101,15 @@ class Blebox extends utils.Adapter {
tools.getBleboxData(device, "deviceUptime");
});
break;
case "multisensor":
multisensor.init();
tools.getBleboxData(device, "deviceState");
tools.getBleboxData(device, "multisensorExtendedState");
schedule.scheduleJob("*/10 * * * * *", function () {
tools.getBleboxData(device, "multisensorExtendedState");
tools.getBleboxData(device, "deviceUptime");
});
break;
case "saunabox":
saunabox.init();
tools.getBleboxData(device, "deviceState");
Expand Down Expand Up @@ -425,6 +435,9 @@ class Blebox extends utils.Adapter {
case "tempsensor":
locationUrl = tempsensor.getApiUrl(type, val);
break;
case "multisensor":
locationUrl = multisensor.getApiUrl(type, val);
break;

default:
break;
Expand Down Expand Up @@ -452,6 +465,8 @@ class Blebox extends utils.Adapter {
return switchbox.datapoints;
case "tempsensor":
return tempsensor.datapoints;
case "multisensor":
return multisensor.datapoints;
case "saunabox":
return saunabox.datapoints;
default:
Expand Down

0 comments on commit 855cb61

Please sign in to comment.