# \[APP\]\[Pro\] InfluxDb

**URL:** <https://community.homey.app/t/app-pro-influxdb/32405>\
**Category:** Apps\
**Tags:** app\
**Created:** [July 15, 2020, 5:21am UTC](https://community.homey.app/t/app-pro-influxdb/32405 "2020-07-15T05:21:40Z")\
**Posts on this page:** 1\
**Showing post:** 102

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 14, 2023, 10:20pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/102 "2023-03-14T22:20:11Z")

</div>

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](https://bitbucket.org/QlusterIT/nl.qluster-it.betterlogic/issues/12/be-able-to-save-numeric-values-to-influxdb)

[[APP][Pro] Better Logic Library - Just some better logic, variable and library management - Apps - Homey Community Forum](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/305)

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](https://homey.app/nl-nl/app/nl.qluster-it.DeviceCapabilities/Device-Capabilities/).

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

```auto
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.

---

_[View the full topic](https://community.homey.app/t/app-pro-influxdb/32405)._
