Hey @balmli ,
I have a request for BLL variables to be saved to the InfluxDB.
QlusterIT / nl.qluster-it.BetterLogic / issues / #12 - Be able to save numeric values to InfluxDB — Bitbucket
When using flows for this, the flow will be killed when it gets executed to many times.
The solution for this i have just finished building and am using in the Device Capabilities App.
It would be great if you could implement this variable listener in the InfluxDB app ![]()
If so, you would just need to execute these few steps:
- run
npm install betterlogiclibrary - add
"permissions": ["homey:app:net.i-dev.betterlogic"]to the app.json - import BL in the app.js
const { BL } = require('betterlogiclibrary'); - init the BL in your app.oninit and set the BL.onVariableUpdate
await BL.init({ homey: this.homey });
BL.onVariableUpdate = async ({ variable, formattedDate }) => {
if (!variable.remove) return;
switch (variable.type) {
case "number":
case "trigger":
writeToInfluxDB('number', variable.value);
break;
case "string":
writeToInfluxDB('string', variable.value);
break;
case "boolean":
writeToInfluxDB('boolean', variable.value);
break;
}
}
That’s it ![]()
Well, ofc you need to really write it to the InfluxDB, but you get the point ![]()
And perhaps you need a setting if people want to write them, or something like that.