# \[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:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [July 15, 2020, 5:21am UTC](https://community.homey.app/t/app-pro-influxdb/32405/1 "2020-07-15T05:21:40Z")

</div>

# InfluxDb support for Athom Homey

This app will log all numeric, boolean and enum capabilities to a InfluxDb database.

[App store](https://homey.app/a/homey.influxdb/)

[Source](https://github.com/balmli/homey-influxdb)

## Install:

The IP address, port number and database for the InfluxDb must be entered in app settings.

For InfluxDB 2.x, the organization ID and token must be set. For InfluxDB 1.x they must not be set.

## Release Notes:

#### 1.1.0

- Support for storing enum capabilities
- Added ‘Write boolean’, ‘Write number’ and ‘Write text’ actions

#### 1.0.0

- Updated to SDK3
- Updated settings

#### 0.9.14

- Can select between Homey and app metrics, or just Homey metrics

#### 0.9.13

- Added flows to enable/disable metrics and set write interval

#### 0.9.12

- Fixed escaping of non-breaking spaces

#### 0.9.11

- Added tag\_2 for export of CPU usage

#### 0.9.10

- Added triggers for online and offline events
- Added export of CPU usage per app
- Name for measurements can be prefixed

#### 0.9.9

- Handle adding several devices at the same time
- Updated Athom api.

#### 0.9.8

- Handle adding several devices at the same time

#### 0.9.7

- Name standard for measurements can be changed
- Zone id and name as tags

#### 0.9.6

- Support for InfluxDB v2 and InfluxDb Cloud

#### 0.9.5

- Minor fixes on the settings page

#### 0.9.3

- Improved settings page

#### 0.9.2

- Added logging of Homey metrics
- Added protocol, username and password to settings

#### 0.9.1

- Fixed timestamp for measurements

#### 0.9.0

- First version

## Disclaimer:

Use at your own risk. I accept no responsibility for any damages caused by using this app.

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [July 23, 2020, 10:52am UTC](https://community.homey.app/t/app-pro-influxdb/32405/2 "2020-07-23T10:52:52Z")

</div>

v. 0.9.6 with support for InfluxDb v2 and InfluxDb cloud, is now ready for testing:

> **[InfluxDb](https://homey.app/en-us/app/homey.influxdb/InfluxDb/test/)**
>
> Metrics exporter for InfluxDb

Please test 🙂

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [July 23, 2020, 11:15am UTC](https://community.homey.app/t/app-pro-influxdb/32405/3 "2020-07-23T11:15:32Z")

</div>

To use the InfluxDb Cloud, go to [https://www.influxdata.com/](https://www.influxdata.com/) to create an account. After you have logged in, you must create a _token_ and a _bucket_

Then in settings for the app:

- **Hostname** : go to “Data -\> Client Libraries” to find the URL. So the hostname will be something like: `eu-central-1-1.aws.cloud2.influxdata.com`.
- **Protocol** : select `https`.
- **Port number** : `443`
- **Organization ID** : go to “Organization -\> About”, to find the Organization ID.
- **Token** : paste in the token you created.
- **Username** : leave it blank.
- **Password** : leave it blank.
- **Database/bucket** : enter the name of the bucket you created.

It’s much easier to configure the app from the browser from this link, IMO:  
[https://developer.athom.com/tools/app-settings](https://developer.athom.com/tools/app-settings)

---

<div class="post-metadata">

**Author:** ![Jumpingmushroom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jumpingmushroom/32/7686_2.png) [@Jumpingmushroom](https://community.homey.app/u/Jumpingmushroom)\
**Post date:** [July 27, 2020, 1:04pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/4 "2020-07-27T13:04:58Z")

</div>

Excellent work! A lot better than my hackish MQTT Hub -\> Mosquitto -\> Telegraf -\> InfluxDB integration 😉

I’ve got a few constructive notes I was hoping you could look into.  
The naming structure seems a bit chaotic. Could I recommend this kind of structure instead:  
SELECT mean(“measure\_temperature”) FROM “Bedroom” WHERE (“name” = ‘Bedroom sensor’)  
Right it’s like this:  
SELECT mean(“measure\_temperature”) FROM “Bedroom\_sensor” WHERE (“name” = ‘Bedroom sensor’)  
Which means the Bedroom\_sensor name is used twice. Using the Zone as part of the data would make more structural sense. Let me know your thoughts on this.

Also, is it also possible to maybe have push interval part of the configuration? Or is it based on value change?

Other than that, great work and finally a way to collect metrics properly!

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [July 27, 2020, 2:42pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/5 "2020-07-27T14:42:35Z")

</div>

Thanks for the feedback !!

Right now it’s like this:

- **measurement** : name of the device, but spaces are replaced with “\_”… underscore
- **tag** : id: the id of the device
- **tag** : name: the name of the device. (",", “=” and " " escaped)
- **value**

Changing this … would mean that all existing users would have to change their dashboards…

What about adding the zone as a tag ?

All changes are buffered before written to the IndexDb. The write interval to the IndexDb is 10 seconds.

The state of the Homey itself (cpu, memory, apps) is fetched every 30 seconds.

---

<div class="post-metadata">

**Author:** ![Tangodelta](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tangodelta/32/9471_2.png) [@Tangodelta](https://community.homey.app/u/Tangodelta)\
**Post date:** [July 27, 2020, 5:51pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/6 "2020-07-27T17:51:03Z")

</div>

Thanks for this! Just installed Grafana and influxdb on my Qnap, really thinking of retiring MQTT!

---

<div class="post-metadata">

**Author:** ![Jumpingmushroom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jumpingmushroom/32/7686_2.png) [@Jumpingmushroom](https://community.homey.app/u/Jumpingmushroom)\
**Post date:** [July 28, 2020, 11:37am UTC](https://community.homey.app/t/app-pro-influxdb/32405/7 "2020-07-28T11:37:45Z")

</div>

While I agree it’s a hassle that people using the app now would have to change their dashboards, I believe it would benefit a better structure in the long run.

This would be my suggestion:

measurement - Zone name (ie. Bedroom, Bathroom, Living room etc.)  
tag - ID = UID  
tag - Name = Device name  
value - Capability (ie. measure\_temperature, measure\_current etc).

This way you would be able to create simpler queries.

Example:  
I’ve got a lot of miflora plant sensors in the living room. Each of these report the value flora\_measure\_moisture. If I were to use the current setup, I would have to create one query per device. With the measurement being a zone, I could simply itterate through all name tags returned and create a graph for the moisture of all plants in one query.

A typical request for this type of query would be:  
SELECT last(“flora\_measure\_moisture”) FROM “Living\_room” WHERE $timeFilter GROUP BY “name”

Using ALIAS BY with $tag\_flora\_measure\_moisture , I would be able to see graphing of the value for all devices in that zone.

I’m not saying you should change it if you don’t think it’s the correct way to do it. It’s always possible to work around this by creating one query per device, but with over a 100 devices in my house, and at least three values per device, we’re talking quite a lot of queries for a big dashboard.

P.S: I use grafana to poll the data from influxDB. I guess in other tools there might be other ways of doing polling which makes more sense in your configuration.

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [July 28, 2020, 1:09pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/8 "2020-07-28T13:09:29Z")

</div>

Thanks for the feedback, again 🙂

I have fixed this so you can select in settings the “name standard” for measurements: by name, by zone or by zone & name.

And this won’t ruin other users dashboards.

Install the version from test:

> **[InfluxDb](https://homey.app/en-us/app/homey.influxdb/InfluxDb/test/)**
>
> Metrics exporter for InfluxDb

And, please test 🙂

---

<div class="post-metadata">

**Author:** ![Jumpingmushroom](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jumpingmushroom/32/7686_2.png) [@Jumpingmushroom](https://community.homey.app/u/Jumpingmushroom)\
**Post date:** [July 28, 2020, 2:21pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/9 "2020-07-28T14:21:47Z")

</div>

Works like a charm! This makes it quite a lot easier to collect metrics from mutliple devices in the same Zone 😃 I just enabled the “By Zone” name standard. Thanks again for a great app, and for implementing the features.

---

<div class="post-metadata">

**Author:** ![Michel\_Helsdingen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michel_helsdingen/32/10772_2.png) [@Michel\_Helsdingen](https://community.homey.app/u/Michel_Helsdingen)\
**Post date:** [July 29, 2020, 11:40am UTC](https://community.homey.app/t/app-pro-influxdb/32405/10 "2020-07-29T11:40:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7ee412521ff984a79d2ae14dfcbdba052c4449fe.png) ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/9/59245968c7637118bb17e414b8100ae9dc946d23.png)  
Wanted to test this. Folowed the steps but no seeing any measurments yet?  
Can you help me out?

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [July 29, 2020, 11:54am UTC](https://community.homey.app/t/app-pro-influxdb/32405/11 "2020-07-29T11:54:57Z")

</div>

Check your port number. It must be **443** for access to the InfluxDb cloud servers.

---

<div class="post-metadata">

**Author:** ![Michel\_Helsdingen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michel_helsdingen/32/10772_2.png) [@Michel\_Helsdingen](https://community.homey.app/u/Michel_Helsdingen)\
**Post date:** [July 29, 2020, 12:08pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/12 "2020-07-29T12:08:39Z")

</div>

Lol I am such an idiot 🙂 Thank you!

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [August 1, 2020, 7:02pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/13 "2020-08-01T19:02:05Z")

</div>

I use [http://192.168](http://192.168).\*.x:18086 for protocol and port number, but stays disconnected.

Trying [http://192.168](http://192.168).\*.x:18086/ping in a webbrowser, and fill in the same userid and password, I get the empty page (which i should). Using this same method I can do queries as well.

I installed influxdb v1 in a docker on my Nas, and grafana as well. Grafana is able to connect as well (docket to docket and via browser.

Made a database homey\_6months and granted the user all privileges to this database.

Or could it be that this test Homey is running on version 5.

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [August 1, 2020, 9:15pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/14 "2020-08-01T21:15:17Z")

</div>

@M_a_r_c_o

Does the ping - request return status code 204 ?

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [August 2, 2020, 7:30am UTC](https://community.homey.app/t/app-pro-influxdb/32405/15 "2020-08-02T07:30:10Z")

</div>

Yes.

curl -v [http://homey:\*\*\*\*\*\*@192.168.10.2:18086/ping](http://homey: ****** @192.168.10.2:18086/ping)  
‘’‘’

- Trying 192.168.10.2…
- TCP\_NODELAY set
- Connected to 192.168.10.2 (192.168.10.2) port 18086 (#0)
- Server auth using Basic with user ‘homey’

> GET /ping HTTP/1.1  
> Host: 192.168.10.2:18086  
> Authorization: Basic aG9tZXk\*\*\*\*\*\*\*\*\*\*\*xT0h2RHZS  
> User-Agent: curl/7.54.0  
> Accept: _/_

\< **HTTP/1.1 204 No Content**  
\< Content-Type: application/json  
\< Request-Id: 21731d0b-d491-11ea-9184-0242ac110003  
\< X-Influxdb-Build: OSS  
\< X-Influxdb-Version: 1.8.1  
\< X-Request-Id: 21731d0b-d491-11ea-9184-0242ac110003  
\< Date: Sun, 02 Aug 2020 07:23:58 GMT  
\<

- Connection #0 to host 192.168.10.2 left intact

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [August 2, 2020, 7:51am UTC](https://community.homey.app/t/app-pro-influxdb/32405/16 "2020-08-02T07:51:35Z")

</div>

I’ve tested on v. 1.8.1, on a 2.0.0 - release candidate and on Influxdata cloud. So this should work.

The ping - test has a 5000ms timeout, btw.

Can you press the “create diagnostics report” - button, and I will receive a log, and might see what’s wrong.

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [August 2, 2020, 10:41am UTC](https://community.homey.app/t/app-pro-influxdb/32405/17 "2020-08-02T10:41:41Z")

</div>

Diag report: 2337ecfa-c553-4f46-b384-0e38ab9da5bf

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [August 8, 2020, 5:29pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/18 "2020-08-08T17:29:34Z")

</div>

In Insights, logic varables and betterlogic app numbers are shown, does your influxdb app support them?

Cant find them in Grafana at this moment.

---

<div class="post-metadata">

**Author:** ![BMA](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bma/32/16391_2.png) [@BMA](https://community.homey.app/u/BMA)\
**Post date:** [August 8, 2020, 7:22pm UTC](https://community.homey.app/t/app-pro-influxdb/32405/19 "2020-08-08T19:22:33Z")

</div>

Hi. This looks verry interesting, but I also get 0 measurements. Is it only new measurements it uploads? Does it take time before it uploads it to InfluxDb cloud? I’ve checked that Im using https and 443.

---

<div class="post-metadata">

**Author:** ![balmli](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/balmli/32/1308_2.png) [@balmli](https://community.homey.app/u/balmli)\
**Post date:** [August 9, 2020, 8:11am UTC](https://community.homey.app/t/app-pro-influxdb/32405/20 "2020-08-09T08:11:13Z")

</div>

No, only number and boolean capabilities that you can find here [https://developer.athom.com/tools/devices](https://developer.athom.com/tools/devices) is supported.

And Homey CPU and memory usage, and app memory and storage usage.

But if we find a way to add logic variables and betterlogic app numbers, I will add that too.

[Next page](https://community.homey.app/t/app-pro-influxdb/32405.md?page=2)
