iobroker.influxdb 3.2.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +123 -325
- package/RetentionPolicies.md +23 -22
- package/admin/i18n/{de/translations.json → de.json} +23 -5
- package/admin/i18n/{en/translations.json → en.json} +23 -5
- package/admin/i18n/{es/translations.json → es.json} +19 -1
- package/admin/i18n/fr.json +107 -0
- package/admin/i18n/it.json +107 -0
- package/admin/i18n/{nl/translations.json → nl.json} +18 -0
- package/admin/i18n/pl.json +107 -0
- package/admin/i18n/pt.json +107 -0
- package/admin/i18n/ru.json +107 -0
- package/admin/i18n/uk.json +107 -0
- package/admin/i18n/zh-cn.json +107 -0
- package/admin/jsonConfig.json +475 -362
- package/admin/jsonCustom.json +1 -1
- package/admin/words.js +87 -87
- package/build/lib/Database.js +76 -0
- package/build/lib/Database.js.map +1 -0
- package/build/lib/DatabaseInfluxDB1x.js +194 -0
- package/build/lib/DatabaseInfluxDB1x.js.map +1 -0
- package/build/lib/DatabaseInfluxDB2x.js +252 -0
- package/build/lib/DatabaseInfluxDB2x.js.map +1 -0
- package/build/lib/aggregate.js +1398 -0
- package/build/lib/aggregate.js.map +1 -0
- package/build/main.js +3034 -0
- package/build/main.js.map +1 -0
- package/docker-compose.yaml +63 -0
- package/io-package.json +116 -78
- package/package.json +27 -18
- package/admin/i18n/fr/translations.json +0 -89
- package/admin/i18n/it/translations.json +0 -89
- package/admin/i18n/pl/translations.json +0 -89
- package/admin/i18n/pt/translations.json +0 -89
- package/admin/i18n/ru/translations.json +0 -89
- package/admin/i18n/zh-cn/translations.json +0 -89
- package/lib/Database.js +0 -30
- package/lib/DatabaseInfluxDB1x.js +0 -136
- package/lib/DatabaseInfluxDB2x.js +0 -351
- package/lib/aggregate.js +0 -968
- package/main.js +0 -2715
package/README.md
CHANGED
|
@@ -18,36 +18,36 @@ This adapter saves state history into InfluxDB.
|
|
|
18
18
|
## InfluxDB version support
|
|
19
19
|
|
|
20
20
|
### InfluxDB 1.x
|
|
21
|
-
If you have an InfluxDB 1.x installation (preferably 1.8.x or 1.9.x) then you choose "
|
|
22
|
-
You can also define a database name. The default is
|
|
21
|
+
If you have an InfluxDB 1.x installation (preferably `1.8.x` or `1.9.x`) then you choose "1.x" in the adapter configuration and enter the Host-IP and Port together with Username and Password for the Access.
|
|
22
|
+
You can also define a database name. The default is `iobroker`. On the first adapter start, this database is created.
|
|
23
23
|
|
|
24
|
-
When doing custom queries via the "query" message you can use InfluxQL to select the data you want. FluxQL with InfluxDB 1.x is not supported (and will also not be added).
|
|
24
|
+
When doing custom queries via the "query" message, you can use InfluxQL to select the data you want. FluxQL with InfluxDB 1.x is not supported (and will also not be added).
|
|
25
25
|
|
|
26
26
|
### InfluxDB 2.x
|
|
27
27
|
Since 2.0 of the adapter also InfluxDB 2.x is supported which works a bit different.
|
|
28
28
|
Here beside the Host-IP and Port the following data are required:
|
|
29
|
-
* **Organization**: You need to create an organization on the commandline and need to enter the name or ID of that organization here. If you created one Organization when doing the InfluxDB
|
|
30
|
-
* **Authentication Token**: You
|
|
29
|
+
* **Organization**: You need to create an organization on the commandline/WebUI and need to enter the name or ID of that organization here. If you created one Organization when doing the InfluxDB-setup, you have created an initial organization and can use this here, else use `influx org list` to see available organizations.
|
|
30
|
+
* **Authentication Token**: You must create an authentication token that has sufficient rights to allow the adapter to perform all necessary actions! To create a token with only minimal permissions for a single bucket, go to the WebUI and select: "API Tokens" --> "Generate API Token" --> "Custom API Token", select read/write permissions for the bucket and read permissions for "All Orgs" and "All Users". Alternatively you can generate an "All Access" token, which will grant all permissions for ALL buckets of given organization.
|
|
31
31
|
|
|
32
|
-
You can also define a database name - this is used as Bucket. The default is
|
|
32
|
+
You can also define a database name - this is used as a Bucket. The default is `iobroker`. On the first adapter start, this bucket is created in the configured organization.
|
|
33
33
|
|
|
34
|
-
When doing custom queries via the "query" message you can use Flux queries to select the data you want. Details on Flux can be found at https://docs.influxdata.com/influxdb/v2.0/reference/flux/
|
|
34
|
+
When doing custom queries via the "query" message, you can use Flux queries to select the data you want. Details on Flux can be found at https://docs.influxdata.com/influxdb/v2.0/reference/flux/
|
|
35
35
|
|
|
36
36
|
#### Store metadata information as tags instead of fields
|
|
37
|
-
For Influx 1.x state value, as well as associated metadata fields (`q`, `ack` and `from`) are stored as fields within InfluxDB. When using Flux-commands to retrieve this data (instead of InfluxQL) the data is returned in separate tables, which makes it more difficult to view the data in a joined way when using external database clients or Influx CLI `query` command. This is by design, as Influx only supports one field per data-point.
|
|
37
|
+
For `Influx 1.x` state value, as well as associated metadata fields (`q`, `ack` and `from`) are stored as fields within InfluxDB. When using Flux-commands to retrieve this data (instead of `InfluxQL`) the data is returned in separate tables, which makes it more difficult to view the data in a joined way when using external database clients or Influx CLI `query` command. This is by design, as Influx only supports one field per data-point.
|
|
38
38
|
|
|
39
|
-
With Influx 2.x it is now also possible, to store this metadata-information besides the actual value of the state as Influx Tags. Tags are indexed and allow for faster search queries. In addition, they are closely linked to the measurement stored within the db, meaning they will be returned in one table with the queried measurement which makes them much easier to handle, when used outside this adapter. There are limitations with this however:
|
|
39
|
+
With `Influx 2.x` it is now also possible, to store this metadata-information besides the actual value of the state as Influx Tags. Tags are indexed and allow for faster search queries. In addition, they are closely linked to the measurement stored within the db, meaning they will be returned in one table with the queried measurement which makes them much easier to handle, when used outside this adapter. There are limitations with this, however:
|
|
40
40
|
- The use of tags for metadata needs to be enabled under `Advanced Settings`. It is disabled by default.
|
|
41
41
|
- If you decide to use tags, you cannot continue to use old measurements that were gathered with Influx 1.x, as they are stored in fields.
|
|
42
42
|
- Attempting to use an existing database that was set up without enabling the Tag-feature will cause the adapter to fail to initialize, and you will see an error message about it in the log.
|
|
43
43
|
- This also is valid the other way: Once you start using the Tag-feature in a new database, you cannot switch back to using fields for this database.
|
|
44
|
-
- This feature is currently only available
|
|
44
|
+
- This feature is currently only available if you use Influx 2.x. And only if you use the new responsive GUI of Admin 5.
|
|
45
45
|
|
|
46
46
|
### Migration from InfluxDB 1 to 2
|
|
47
47
|
|
|
48
48
|
Please refer to the [official guides on how to migrate](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/) from InfluxDB 1.x to 2.x. Especially the [migration instructions for time series data](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/manual-upgrade/#migrate-time-series-data) have been verified to work during adapter testing. Please always create a backup of your data before performing the migration.
|
|
49
49
|
|
|
50
|
-
After the migration, the adapter is able to work with the old data (e.g. for history-queries) as well. This only applies
|
|
50
|
+
After the migration, the adapter is able to work with the old data (e.g. for history-queries) as well. This only applies if you don't decide to [use Tags for storing metadata fields](#Store-metadata-information-as-tags-instead-of-fields).
|
|
51
51
|
|
|
52
52
|
## Retention Policy
|
|
53
53
|
While Influx 1.x supports the concept of multiple **retention policies** for one database, Influx 2 by design allows only one **retention period** per bucket. Therefore, it is only possible to set one policy for the whole database/bucket with this adapter via _Default Settings -> Storage retention_. The retention selected here will be applied on the fly and can be changed at any time. Retention policies set by the adapter will never be deleted, but instead altered if required, as otherwise Influx 1.x would delete all data that the policy applied to.
|
|
@@ -55,32 +55,32 @@ While Influx 1.x supports the concept of multiple **retention policies** for one
|
|
|
55
55
|
Please also read [Understanding Retention Policies](RetentionPolicies.md).
|
|
56
56
|
|
|
57
57
|
## Direct writes or buffered writes?
|
|
58
|
-
With the default configuration the adapter stores each single datapoint directly into the database and only
|
|
58
|
+
With the default configuration, the adapter stores each single datapoint directly into the database and only uses the internal buffer if the database is not available. If the database was not available, the buffer is flushed at the given interval, so it can take the defined interval till the missing points are written!
|
|
59
59
|
|
|
60
|
-
By changing the configuration it is possible to cache new data points up to a defined count or a defined maximum interval after which all points are stored into the database. This also gives better performance and less system load compared to writing the data points directly.
|
|
60
|
+
By changing the configuration, it is possible to cache new data points up to a defined count or a defined maximum interval after which all points are stored into the database. This also gives better performance and less system load compared to writing the data points directly.
|
|
61
61
|
InfluxDB has a limitation of the maximum size for writes which is at around 2MB. It should be safe to have up to 15.000 data points as buffer maximum, maybe also 20.000, but this highly depends on the length of your datapoint-IDs.
|
|
62
62
|
|
|
63
|
-
On exit of the adapter the buffer is stored on disk and reinitialized with next adapter start, so no data points should be lost and will be written after next start.
|
|
63
|
+
On exit of the adapter the buffer is stored on disk and reinitialized with the next adapter start, so no data points should be lost and will be written after the next start.
|
|
64
64
|
|
|
65
65
|
## InfluxDB and data types
|
|
66
|
-
InfluxDB is very strict on data types. The datatype for a measurement value is defined with
|
|
67
|
-
The adapter tries to write with the correct value, but if the datatype changes for the same state then there may be the write
|
|
68
|
-
|
|
66
|
+
InfluxDB is very strict on data types. The datatype for a measurement value is defined with its first write.
|
|
67
|
+
The adapter tries to write with the correct value, but if the datatype changes for the same state, then there may be the write errors in the InfluxDB.
|
|
68
|
+
The adapter detects this and will write these potential conflicting data points always directly, but write errors mean that the value is not written into the DB at all. So make sure to check the logs for such cases.
|
|
69
69
|
|
|
70
|
-
**In Version 1.x and 2.x of the adapter it could also be that some values were converted wrong when no datatype was defined. E.g. a String like
|
|
70
|
+
**In Version 1.x and 2.x of the adapter, it could also be that some values were converted wrong when no datatype was defined. E.g. a String like `37.5;foo bar` was converted to a number 37.5 in older versions. The version 3 odf the adapter will detect that this is not a valid number and will not convert this value. This could lead to type conflicts after the update. Please check these values and think if you need to store it and how (for the future).**
|
|
71
71
|
|
|
72
|
-
Additionally, InfluxDB
|
|
72
|
+
Additionally, InfluxDB does not support "null" values, so these are not written at all into the DB.
|
|
73
73
|
|
|
74
74
|
## Installation of InfluxDB
|
|
75
75
|
Please refer to the official InfluxDB pages for installation instructions depending on your OS.
|
|
76
76
|
|
|
77
77
|
* InfluxDB 1.x: https://docs.influxdata.com/influxdb/v1.8/introduction/install/
|
|
78
|
-
* InfluxDB 2.x: https://docs.influxdata.com/influxdb/v2.
|
|
78
|
+
* InfluxDB 2.x: https://docs.influxdata.com/influxdb/v2.2/install/
|
|
79
79
|
|
|
80
80
|
### Setup authentication for InfluxDB 1.x (optional)
|
|
81
81
|
**NOTE:** Influx DB V2.x relies on organization/token login, instead of username/password! This is only applicable for InfluxDB 1.x
|
|
82
82
|
|
|
83
|
-
If you use DB locally you may leave authentication disabled and skip this part.
|
|
83
|
+
If you use DB locally, you may leave authentication disabled and skip this part.
|
|
84
84
|
|
|
85
85
|
- Start service: ``` service influxdb start ```
|
|
86
86
|
- Go to admin page: http://<ip>:8083
|
|
@@ -91,7 +91,8 @@ CREATE USER "user" WITH PASSWORD '<userpassword>'
|
|
|
91
91
|
CREATE DATABASE "iobroker"
|
|
92
92
|
GRANT ALL ON "iobroker" TO "user"
|
|
93
93
|
```
|
|
94
|
-
|
|
94
|
+
|
|
95
|
+
Enable authentication by editing /etc/influxdb/influxdb.conf:
|
|
95
96
|
```
|
|
96
97
|
[http]
|
|
97
98
|
enabled = true
|
|
@@ -105,28 +106,34 @@ Enable authentication, by editing /etc/influxdb/influxdb.conf:
|
|
|
105
106
|
```
|
|
106
107
|
- Restart service: ``` service influxdb restart ```
|
|
107
108
|
|
|
109
|
+
## Self-hosted docker image for InfluxDB
|
|
110
|
+
This version of the adapter could start a self-hosted docker image of InfluxDB 2.x.
|
|
111
|
+
It is not opened for the network and only accessible from localhost. Of course, the docker environment must be installed and running on the host.
|
|
112
|
+
|
|
113
|
+
The `iobroker` user must have access to the docker CLI. To fix the rights start `iob fix`.
|
|
114
|
+
|
|
108
115
|
## Installation of Grafana (Charting Tool)
|
|
109
|
-
There is additional charting tool for InfluxDB - Grafana.
|
|
116
|
+
There is an additional charting tool for InfluxDB - Grafana.
|
|
110
117
|
It must be installed additionally.
|
|
111
118
|
|
|
112
119
|
Install a current version of Grafana 3.x+ because InfluxDB support is enhanced there in comparison to earlier Grafana versions.
|
|
113
120
|
|
|
114
121
|
Under debian you can install it as described at http://docs.grafana.org/installation/debian/ .
|
|
115
|
-
For ARM platforms
|
|
122
|
+
For ARM platforms you can check vor v3.x at https://github.com/fg2it/grafana-on-raspberry.
|
|
116
123
|
|
|
117
124
|
Explanation for other OS can be found [here](http://docs.grafana.org/installation/).
|
|
118
125
|
|
|
119
|
-
After the Grafana is installed, follow [this](http://docs.grafana.org/datasources/influxdb/) to create connection.
|
|
126
|
+
After the Grafana is installed, follow [this](http://docs.grafana.org/datasources/influxdb/) to create a connection.
|
|
120
127
|
|
|
121
128
|
## Default Settings
|
|
122
129
|
- **Debounce Time** - Protection against unstable values to make sure that only stable values are logged when the value did not change in the defined amount of Milliseconds. ATTENTION: If values change more often then this setting effectively no value will be logged (because any value is unstable)
|
|
123
130
|
- **Blocktime** - Defines for how long after storing the last value no further value is stored. When the given time in Milliseconds is over then the next value that fulfills all other checks is logged.
|
|
124
|
-
- **Record changes only** - This function
|
|
131
|
+
- **Record changes only** - This function makes sure that only changed values are logged if they fulfill other checks (see below). Same values will not be logged.
|
|
125
132
|
- **still record the same values (seconds)** - When using "Record changes only" you can set a time interval in seconds here after which also unchanged values will be re-logged into the DB. You can detect the values re-logged by the adapter with the "from" field.
|
|
126
133
|
- **Minimum difference from last value** - When using "Record changes only" you can define the required minimum difference between the new value and the last value. If this is not reached the value is not recorded.
|
|
127
134
|
- **ignore 0 or null values (==0)** - You can define if 0 or null values should be ignored.
|
|
128
135
|
- **ignore values below zero (<0)** - You can define if values below zero should be ignored.
|
|
129
|
-
- **Disable charting optimized logging of skipped values** - By default the adapter tries to record the values for optimized charting. This can mean that additional values (that e.g. not fulfilled all checks above) are logged automatically. If this is not wanted, you can disable this feature.
|
|
136
|
+
- **Disable charting optimized logging of skipped values** - By default, the adapter tries to record the values for optimized charting. This can mean that additional values (that e.g. not fulfilled all checks above) are logged automatically. If this is not wanted, you can disable this feature.
|
|
130
137
|
- **Alias-ID** - You can define an alias for the ID. This is useful if you have changed a device and want to have continuous data logging. Please consider switching to real alias States in teh future!
|
|
131
138
|
- **Storage retention** - How many values in the past will be stored on disk. Data are deleted when the time is reached as soon as new data should be stored for a datapoint.
|
|
132
139
|
- **Enable enhanced debug logs for the datapoint** - If you want to see more detailed logs for this datapoint, you can enable this option. You still need to enable "debug" loglevel for these additional values to be visible! This helps in debugging issues or understanding why the adapter is logging a value (or not).
|
|
@@ -172,8 +179,8 @@ sendTo('influxdb.0', 'getHistory', {
|
|
|
172
179
|
```
|
|
173
180
|
|
|
174
181
|
Possible options:
|
|
175
|
-
- **start** - (optional) time in ms -
|
|
176
|
-
- **end** - (optional) time in ms -
|
|
182
|
+
- **start** - (optional) time in ms - `Date.now()`
|
|
183
|
+
- **end** - (optional) time in ms - `Date.now()`. The default value is `now + 5000 seconds`
|
|
177
184
|
- **step** - (optional) used in aggregate (max, min, average, total, ...) step in ms of intervals
|
|
178
185
|
- **count** - number of values if aggregate is 'onchange' or number of intervals if other aggregate method. Count will be ignored if step is set, else default is 500 if not set
|
|
179
186
|
- **from** - if *from* field should be included in answer
|
|
@@ -183,7 +190,7 @@ Possible options:
|
|
|
183
190
|
- **limit** - do not return more entries than limit
|
|
184
191
|
- **round** - round result to number of digits after decimal point
|
|
185
192
|
- **ignoreNull** - if null values should be included (false), replaced by last not null value (true) or replaced with 0 (0)
|
|
186
|
-
- **removeBorderValues** - By default additional border values are returned to optimize charting. Set this option to true if this is not wanted (e.g. for script data processing)
|
|
193
|
+
- **removeBorderValues** - By default, additional border values are returned to optimize charting. Set this option to true if this is not wanted (e.g. for script data processing)
|
|
187
194
|
- **returnNewestEntries** - The returned data are always sorted by timestamp ascending. When using aggregate "none" and also providing "count" or "limit" this means that normally the oldest entries are returned (unless no start data is provided). Set this option to true to get the newest entries instead.
|
|
188
195
|
- **aggregate** - aggregate method (Default: 'average'):
|
|
189
196
|
- *minmax* - used special algorithm. Splice the whole time range in small intervals and find for every interval max, min, start and end values.
|
|
@@ -192,30 +199,30 @@ Possible options:
|
|
|
192
199
|
- *average* - Same as max, but take average value.
|
|
193
200
|
- *total* - Same as max, but calculate total value.
|
|
194
201
|
- *count* - Same as max, but calculate number of values (nulls will be calculated).
|
|
195
|
-
- *percentile* - Calculate n-th percentile (n is given in options.percentile or defaults to 50 if not provided).
|
|
202
|
+
- *percentile* - Calculate n-th percentile (n is given in `options.percentile` or defaults to 50 if not provided).
|
|
196
203
|
- *quantile* - Calculate n quantile (n is given in options.quantile or defaults to 0.5 if not provided).
|
|
197
204
|
- *integral* - Calculate integral (additional parameters see below).
|
|
198
|
-
- *none* - No aggregation at all. Only raw values in given period.
|
|
205
|
+
- *none* - No aggregation at all. Only raw values in the given period.
|
|
199
206
|
- **percentile** - (optional) when using aggregate method "percentile" defines the percentile level (0..100)(defaults to 50)
|
|
200
207
|
- **quantile** - (optional) when using aggregate method "quantile" defines the quantile level (0..1)(defaults to 0.5)
|
|
201
|
-
- **integralUnit** - (optional) when using aggregate method "integral" defines the unit in seconds (
|
|
208
|
+
- **integralUnit** - (optional) when using aggregate method "integral" defines the unit in seconds (default to 60s). e.g. to get integral in hours for Wh or such, set to 3600.
|
|
202
209
|
- **integralInterpolation** - (optional) when using aggregate method "integral" defines the interpolation method (defaults to "none").
|
|
203
210
|
- *linear* - linear interpolation
|
|
204
211
|
- *none* - no/stepwise interpolation
|
|
205
212
|
|
|
206
|
-
The first and last points will be calculated for aggregations, except aggregation
|
|
207
|
-
If you manually request some aggregation you should ignore first and last values, because they are calculated from values outside of period.
|
|
213
|
+
The first and last points will be calculated for aggregations, except aggregation `none`.
|
|
214
|
+
If you manually request some aggregation, you should ignore first and last values, because they are calculated from values outside of the period.
|
|
208
215
|
|
|
209
|
-
When raw data are selected without using
|
|
210
|
-
As soon as step is used the returned fields are ts and val.
|
|
216
|
+
When raw data are selected without using `step`, the returned fields are `ts`, `val`, `ack`, `q` and `from`.
|
|
217
|
+
As soon as a step is used, the returned fields are ts and val.
|
|
211
218
|
|
|
212
219
|
Interpolated values will be marked as `i=true`, like: `{i: true, val: 4.7384845, ts: 29892365723652}`.
|
|
213
220
|
|
|
214
221
|
Please hold in mind that InfluxDB aggregates on "rounded time boundaries" (see https://docs.influxdata.com/influxdb/v0.11/troubleshooting/frequently_encountered_issues/#understanding-the-time-intervals-returned-from-group-by-time-queries)
|
|
215
222
|
|
|
216
223
|
InfluxDB is very strict when it comes to data types. This has effects for aggregator functions, e.g.:
|
|
217
|
-
* average (MEAN)
|
|
218
|
-
* average (MEAN)
|
|
224
|
+
* average (MEAN) cannot be used for boolean values (true/false), only MIN or MAX works here
|
|
225
|
+
* average (MEAN) cannot be used for string values (text), no aggregator makes sense here at all
|
|
219
226
|
* ...
|
|
220
227
|
|
|
221
228
|
## Custom queries
|
|
@@ -228,7 +235,7 @@ That's why the result is always an array with one numbered index for each query.
|
|
|
228
235
|
### Influx 1.x
|
|
229
236
|
Example with one query:
|
|
230
237
|
|
|
231
|
-
```
|
|
238
|
+
```javascript
|
|
232
239
|
sendTo('influxdb.0', 'query', 'SELECT * FROM iobroker.global."system.adapter.admin.0.memRss" LIMIT 100', function (result) {
|
|
233
240
|
if (result.error) {
|
|
234
241
|
console.error(result.error);
|
|
@@ -240,7 +247,7 @@ sendTo('influxdb.0', 'query', 'SELECT * FROM iobroker.global."system.adapter.adm
|
|
|
240
247
|
```
|
|
241
248
|
Two queries:
|
|
242
249
|
|
|
243
|
-
```
|
|
250
|
+
```javascript
|
|
244
251
|
sendTo('influxdb.0', 'query', 'SELECT * FROM iobroker.global."system.adapter.admin.0.memRss" LIMIT 100; SELECT * FROM iobroker.global."system.adapter.admin.0.memHeapUsed" LIMIT 100', function (result) {
|
|
245
252
|
if (result.error) {
|
|
246
253
|
console.error(result.error);
|
|
@@ -254,11 +261,11 @@ sendTo('influxdb.0', 'query', 'SELECT * FROM iobroker.global."system.adapter.adm
|
|
|
254
261
|
**NOTE:** The values are coming back in the result array in filename "value" (instead of "val" as normal in ioBroker)
|
|
255
262
|
|
|
256
263
|
### Influx 2.x
|
|
257
|
-
In InfluxDB v2.0 onwards the SQL-based query language *InfluxQL* is deprecated in favour of *Flux*. For more information please refer to [the offical InfluxDB 2.0 documentation](https://docs.influxdata.com/influxdb/v2.0/reference/flux/).
|
|
264
|
+
In InfluxDB v2.0 onwards, the SQL-based query language *InfluxQL* is deprecated in favour of *Flux*. For more information, please refer to [the offical InfluxDB 2.0 documentation](https://docs.influxdata.com/influxdb/v2.0/reference/flux/).
|
|
258
265
|
|
|
259
266
|
Example with one query:
|
|
260
267
|
|
|
261
|
-
```
|
|
268
|
+
```javascript
|
|
262
269
|
sendTo('influxdb.0', 'query', 'from(bucket: "iobroker") |> range(start: -3h)', function (result) {
|
|
263
270
|
if (result.error) {
|
|
264
271
|
console.error(result.error);
|
|
@@ -269,44 +276,43 @@ sendTo('influxdb.0', 'query', 'from(bucket: "iobroker") |> range(start: -3h)', f
|
|
|
269
276
|
});
|
|
270
277
|
```
|
|
271
278
|
Two queries:
|
|
272
|
-
**NOTE:** By default you cannot execute 2 queries at once via Flux-language, as there is no delimiter available. This adapter emulates this behaviour by defining
|
|
279
|
+
**NOTE:** By default, you cannot execute 2 queries at once via Flux-language, as there is no delimiter available. This adapter emulates this behaviour by defining `;` as delimiter, so you can still run two queries in one statement.
|
|
273
280
|
|
|
274
|
-
```
|
|
281
|
+
```javascript
|
|
275
282
|
sendTo('influxdb.0', 'query', 'from(bucket: "iobroker") |> range(start: -3h); from(bucket: "iobroker") |> range(start: -1h)" LIMIT 100', function (result) {
|
|
276
283
|
if (result.error) {
|
|
277
284
|
console.error(result.error);
|
|
278
285
|
} else {
|
|
279
286
|
// show result
|
|
280
|
-
console.log('Rows First: ' + JSON.stringify(result.result[0])); //Values from last 3 hours
|
|
281
|
-
console.log('Rows Second: ' + JSON.stringify(result.result[1])); //Values from last hour
|
|
287
|
+
console.log('Rows First: ' + JSON.stringify(result.result[0])); // Values from last 3 hours
|
|
288
|
+
console.log('Rows Second: ' + JSON.stringify(result.result[1])); // Values from last hour
|
|
282
289
|
}
|
|
283
290
|
});
|
|
284
291
|
```
|
|
285
292
|
**NOTE:** The values are coming back in the result array in filename "value" (instead of "val" as normal in ioBroker)
|
|
286
293
|
|
|
287
|
-
|
|
288
294
|
## storeState
|
|
289
|
-
If you want to write other data into the InfluxDB you can use the build in system function **storeState**.
|
|
295
|
+
If you want to write other data into the InfluxDB, you can use the build in system function **storeState**.
|
|
290
296
|
This function can also be used to convert data from other History adapters like History or SQL.
|
|
291
297
|
|
|
292
|
-
A successful response
|
|
298
|
+
A successful response does not mean that the data is really written out to the disk. It just means that they were processed.
|
|
293
299
|
|
|
294
|
-
The given ids are not checked against the ioBroker database and do not need to be set up or enabled there. If own IDs are used without settings then the "rules" parameter is not supported and will result in an error. The default "Maximal number of stored in RAM values" is used for such IDs.
|
|
300
|
+
The given ids are not checked against the ioBroker database and do not need to be set up or enabled there. If own IDs are used without settings, then the "rules" parameter is not supported and will result in an error. The default "Maximal number of stored in RAM values" is used for such IDs.
|
|
295
301
|
|
|
296
302
|
The Message can have one of the following three formats:
|
|
297
303
|
* one ID and one state object
|
|
298
304
|
|
|
299
|
-
```
|
|
300
|
-
sendTo('
|
|
305
|
+
```javascript
|
|
306
|
+
sendTo('influxdb.0', 'storeState', {
|
|
301
307
|
id: 'mbus.0.counter.xxx',
|
|
302
308
|
state: {ts: 1589458809352, val: 123, ack: false, from: 'system.adapter.whatever.0', ...}
|
|
303
|
-
|
|
309
|
+
}, result => console.log('added'));
|
|
304
310
|
```
|
|
305
311
|
|
|
306
312
|
* one ID and array of state objects
|
|
307
313
|
|
|
308
|
-
```
|
|
309
|
-
sendTo('
|
|
314
|
+
```javascript
|
|
315
|
+
sendTo('influxdb.0', 'storeState', {
|
|
310
316
|
id: 'mbus.0.counter.xxx',
|
|
311
317
|
state: [
|
|
312
318
|
{ts: 1589458809352, val: 123, ack: false, from: 'system.adapter.whatever.0', ...},
|
|
@@ -317,21 +323,21 @@ sendTo('history.0', 'storeState', {
|
|
|
317
323
|
|
|
318
324
|
* array of multiple IDs with one state object each
|
|
319
325
|
|
|
320
|
-
```
|
|
321
|
-
sendTo('
|
|
326
|
+
```javascript
|
|
327
|
+
sendTo('influxdb.0', 'storeState', [
|
|
322
328
|
{id: 'mbus.0.counter.xxx', state: {ts: 1589458809352, val: 123, ack: false, from: 'system.adapter.whatever.0', ...}},
|
|
323
329
|
{id: 'mbus.0.counter.yyy', state: {ts: 1589458809353, val: 123, ack: false, from: 'system.adapter.whatever.0', ...}}
|
|
324
330
|
], result => console.log('added'));
|
|
325
331
|
```
|
|
326
332
|
|
|
327
|
-
Additionally, you can add attribute `rules: true` in message to activate all rules, like `counter`, `changesOnly`, `de-bounce` and so on
|
|
333
|
+
Additionally, you can add attribute `rules: true` in a message to activate all rules, like `counter`, `changesOnly`, `de-bounce` and so on
|
|
328
334
|
|
|
329
|
-
In case of errors an array with all single error messages is returned and also a successCount to see how many entries were stored successfully.
|
|
335
|
+
In case of errors, an array with all single error messages is returned and also a successCount to see how many entries were stored successfully.
|
|
330
336
|
|
|
331
337
|
## delete state
|
|
332
|
-
If you want to delete entry from the Database you can use the build in system function
|
|
338
|
+
If you want to delete entry from the Database, you can use the build in system function `delete`:
|
|
333
339
|
|
|
334
|
-
```
|
|
340
|
+
```javascript
|
|
335
341
|
sendTo('influxdb.0', 'delete', [
|
|
336
342
|
{id: 'mbus.0.counter.xxx', state: {ts: 1589458809352}},
|
|
337
343
|
{id: 'mbus.0.counter.yyy', state: {ts: 1589458809353}}
|
|
@@ -340,7 +346,7 @@ sendTo('influxdb.0', 'delete', [
|
|
|
340
346
|
|
|
341
347
|
To delete ALL history data for some data point execute:
|
|
342
348
|
|
|
343
|
-
```
|
|
349
|
+
```javascript
|
|
344
350
|
sendTo('influxdb.0', 'deleteAll', [
|
|
345
351
|
{id: 'mbus.0.counter.xxx'},
|
|
346
352
|
{id: 'mbus.0.counter.yyy'}
|
|
@@ -349,7 +355,7 @@ sendTo('influxdb.0', 'deleteAll', [
|
|
|
349
355
|
|
|
350
356
|
To delete history data for some data point and for some range, execute:
|
|
351
357
|
|
|
352
|
-
```
|
|
358
|
+
```javascript
|
|
353
359
|
sendTo('influxdb.0', 'deleteRange', [
|
|
354
360
|
{id: 'mbus.0.counter.xxx', start: '2019-01-01T00:00:00.000Z', end: '2019-12-31T23:59:59.999'},
|
|
355
361
|
{id: 'mbus.0.counter.yyy', start: 1589458809352, end: 1589458809353}
|
|
@@ -361,33 +367,32 @@ Time could be ms since epoch or ans string, that could be converted by javascrip
|
|
|
361
367
|
Values will be deleted including defined limits. `ts >= start AND ts <= end`
|
|
362
368
|
|
|
363
369
|
## change state
|
|
364
|
-
If you want to change entry's value, quality or acknowledge flag in the database you can use the build in system function
|
|
370
|
+
If you want to change entry's value, quality or acknowledge flag in the database, you can use the build in system function `update`:
|
|
365
371
|
|
|
366
|
-
```
|
|
372
|
+
```javascript
|
|
367
373
|
sendTo('influxdb.0', 'update', [
|
|
368
374
|
{id: 'mbus.0.counter.xxx', state: {ts: 1589458809352, val: 15, ack: true, q: 0}},
|
|
369
375
|
{id: 'mbus.0.counter.yyy', state: {ts: 1589458809353, val: 16, ack: true, q: 0}}
|
|
370
376
|
], result => console.log('deleted'));
|
|
371
377
|
```
|
|
372
378
|
|
|
373
|
-
`ts` is mandatory. At least one other
|
|
379
|
+
`ts` is mandatory. At least one other flag must be included in a state object.
|
|
374
380
|
|
|
375
381
|
## Flush Buffers
|
|
376
|
-
If you want to flush the buffers for one or all
|
|
382
|
+
If you want to flush the buffers for one or all data points to the Database, you can use the build in system function `flushBuffer`:
|
|
377
383
|
|
|
384
|
+
```javascript
|
|
385
|
+
sendTo('influxdb.0', 'flushBuffer', {id: 'mbus.0.counter.xxx'}, result => console.log('deleted, error: ' + result.error));
|
|
378
386
|
```
|
|
379
|
-
|
|
380
|
-
, result => console.log('deleted, error: ' + result.error));
|
|
381
|
-
```
|
|
382
|
-
if no id is provided all buffers will be flushed.
|
|
387
|
+
if no id is provided, all buffers will be flushed.
|
|
383
388
|
|
|
384
389
|
## History Logging Management via Javascript
|
|
385
390
|
The adapter supports enabling and disabling of history logging via JavaScript and also retrieving the list of enabled data points with their settings.
|
|
386
391
|
|
|
387
392
|
### enable
|
|
388
|
-
The message requires
|
|
393
|
+
The message requires having the `id` of the datapoint. Additionally, optional `options` to define the datapoint specific settings:
|
|
389
394
|
|
|
390
|
-
```
|
|
395
|
+
```javascript
|
|
391
396
|
sendTo('influxdb.0', 'enableHistory', {
|
|
392
397
|
id: 'system.adapter.influxdb.0.memRss',
|
|
393
398
|
options: {
|
|
@@ -409,9 +414,9 @@ sendTo('influxdb.0', 'enableHistory', {
|
|
|
409
414
|
```
|
|
410
415
|
|
|
411
416
|
### disable
|
|
412
|
-
The message requires
|
|
417
|
+
The message requires having the `id` of the datapoint.
|
|
413
418
|
|
|
414
|
-
```
|
|
419
|
+
```javascript
|
|
415
420
|
sendTo('influxdb.0', 'disableHistory', {
|
|
416
421
|
id: 'system.adapter.influxdb.0.memRss',
|
|
417
422
|
}, function (result) {
|
|
@@ -427,22 +432,22 @@ sendTo('influxdb.0', 'disableHistory', {
|
|
|
427
432
|
### get List
|
|
428
433
|
The message has no parameters.
|
|
429
434
|
|
|
430
|
-
```
|
|
435
|
+
```javascript
|
|
431
436
|
sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
|
|
432
|
-
//result is object like:
|
|
433
|
-
{
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
437
|
+
// result is an object like:
|
|
438
|
+
console.log(JSON.stringify({
|
|
439
|
+
'system.adapter.influxdb.0.memRss': {
|
|
440
|
+
changesOnly: true,
|
|
441
|
+
debounce: 0,
|
|
442
|
+
retention: 31536000,
|
|
443
|
+
maxLength: 3,
|
|
444
|
+
changesMinDelta: 0.5,
|
|
445
|
+
enabled: true,
|
|
446
|
+
changesRelogInterval: 0,
|
|
447
|
+
aliasId: ''
|
|
443
448
|
}
|
|
444
|
-
...
|
|
445
|
-
}
|
|
449
|
+
/// ...
|
|
450
|
+
}));
|
|
446
451
|
});
|
|
447
452
|
```
|
|
448
453
|
|
|
@@ -452,252 +457,45 @@ sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
|
|
|
452
457
|
-->
|
|
453
458
|
|
|
454
459
|
## Changelog
|
|
460
|
+
### 5.0.1 (2026-08-15)
|
|
461
|
+
* (@GermanBluefox) Completely refactored the code to TypeScript and ES6
|
|
462
|
+
* (@GermanBluefox) Added possibility to start docker containers directly from the adapter
|
|
463
|
+
* (mcm1957) Adapter requires admin >= 7.7.2 now
|
|
464
|
+
* (arteck) Fixed the connection handling for InfluxDB 1.x: the health check (ping) and the automatic reconnect were never started
|
|
465
|
+
* (arteck) Fixed the loss of buffered values if the writing was running while new values arrived or if the write failed
|
|
466
|
+
* (arteck) Values are no longer written twice if they are written directly (buffer size 0 or conflicting points)
|
|
467
|
+
* (arteck) State IDs and database names are now escaped in the queries
|
|
468
|
+
* (arteck) The password/token is no longer written into the log by the connection test
|
|
469
|
+
* (arteck) The settings "request timeout" and "validate SSL" are now used for InfluxDB 1.x too
|
|
470
|
+
* (arteck) Fixed the cache file name if more than one instance runs in the compact mode
|
|
471
|
+
* (arteck) Fixed the aggregation for `percentile: 100`/`quantile: 1` and the last value of `integralTotal`
|
|
472
|
+
* (bluefox) Fixed empty charts for the aggregation `onchange` ("raw" in e-charts): it was run through the interval aggregation and returned only `null` values
|
|
473
|
+
* (@GermanBluefox) Minimal node.js version is 22
|
|
474
|
+
|
|
475
|
+
### 4.0.3 (2024-05-16)
|
|
476
|
+
* (bluefox) Some packages were updated
|
|
477
|
+
|
|
478
|
+
### 4.0.2 (2024-01-03)
|
|
479
|
+
* (bluefox) Corrected JSON config
|
|
480
|
+
* (Marc-Berg) Corrected filter function in booleanTypeCheckQuery
|
|
481
|
+
* (Marc-Berg) Allowed the self-signed certificates using "test connection" button
|
|
482
|
+
* (Marc-Berg) The deletion of data from DB was implemented for V2
|
|
483
|
+
* (bluefox) Added support for `count` aggregate type on getHistory
|
|
484
|
+
* (bluefox) minimal supported node.js version is 16 now
|
|
485
|
+
|
|
455
486
|
### 3.2.0 (2022-09-19)
|
|
456
487
|
* (Apollon77) Adjust cache file to be different per instance when having multiple instances
|
|
457
488
|
|
|
458
489
|
### 3.1.8 (2022-08-13)
|
|
459
490
|
* (Apollon77) Fix crash cases reported by Sentry
|
|
460
491
|
|
|
461
|
-
|
|
462
|
-
* (Apollon77) Allow to remove a configuration value for "round" in config again
|
|
463
|
-
|
|
464
|
-
### 3.1.6 (2022-06-27)
|
|
465
|
-
* (Apollon77) When not count is provided for aggregate "none" or "onchange" then the limit (default 2000) is used as count to define the number of data to return.
|
|
466
|
-
|
|
467
|
-
### 3.1.5 (2022-06-12)
|
|
468
|
-
* (Apollon77) Make sure debug log is active according to the settings
|
|
469
|
-
|
|
470
|
-
### 3.1.4 (2022-06-08)
|
|
471
|
-
* (Apollon77) Performance optimizations for GetHistory calls, especially for "minmax" aggregate method
|
|
472
|
-
* (Apollon77) Prevent crash case reported by Sentry
|
|
473
|
-
|
|
474
|
-
### 3.1.3 (2022-06-01)
|
|
475
|
-
* (Apollon77) Corrected issue when testing connection to InfluxDBv1 with weird passwords
|
|
476
|
-
|
|
477
|
-
### 3.1.2 (2022-05-31)
|
|
478
|
-
* (Apollon77) Workaround an admin issue when testing connection to InfluxDB
|
|
479
|
-
|
|
480
|
-
### 3.1.0 (2022-05-27)
|
|
481
|
-
* (Apollon77) Data are not converted to number if they are other data types on getHistory to respect the saved data formats as defined in the datapoint settings for storage.
|
|
482
|
-
* (Apollon77) Fix retention change to lower checkbox in UI
|
|
483
|
-
* (Apollon77) Allow storeState again to write to InfluxDB for "unknown state ids" - "rules" usage is not supported in for this and storeState would be silently discarded in this case!
|
|
484
|
-
* (Apollon77) Fix several crash cases reported by Sentry
|
|
485
|
-
* (Apollon77) Make sure disabling "Log changes only" also really do not log the changes anymore
|
|
486
|
-
* (Apollon77) Allow storeState and GetHistory also to be called for "unknown ids"
|
|
487
|
-
|
|
488
|
-
### 3.0.2 (2022-05-12)
|
|
489
|
-
* (Apollon77) handle an empty Path for InfluxDB 2.0 correctly in all cases
|
|
490
|
-
|
|
491
|
-
### 3.0.1 (2022-05-11)
|
|
492
|
-
* (Apollon77) BREAKING: Configuration is only working in the new Admin 5 UI!
|
|
493
|
-
* (Apollon77) Did bigger adjustments to the recording logic and added a lot of new Features. Please refer to Changelog and Forum post for details.
|
|
494
|
-
|
|
495
|
-
### 3.0.0 (2022-05-11)
|
|
496
|
-
* (Apollon77) Breaking: Configuration is only working in the new Admin 5 UI!
|
|
497
|
-
* (Apollon77) Breaking! Did bigger adjustments to the recording logic. Debounce is refined and blockTime is added to differentiate between the two checks
|
|
498
|
-
* (Apollon77) Breaking! GetHistory requests now need to deliver the ts in milliseconds! Make sure to use up to date scripts and Charting UIs
|
|
499
|
-
* (Apollon77) New setting added to disable the "logging of additional values for charting optimization" - then only the expected data are logged
|
|
500
|
-
* (Apollon77) Add new Debug flag to enable/disable debug logging on datapoint level (default is false) to optimize performance
|
|
501
|
-
* (Apollon77) Add flag returnNewestEntries for GetHistory to determine which records to return when more entries as "count" are existing for aggregate "none"
|
|
502
|
-
* (Apollon77) Flush the buffer for the datapoint which is queried by GetHistory before the query is done, so that all data are in the database
|
|
503
|
-
* (Apollon77) make sure id is always returned on GetHistory when addId is set
|
|
504
|
-
* (Apollon77) Add aggregate method "percentile" to calculate the percentile (0..100) of the values (requires options.percentile with the percentile level, defaults to 50 if not provided). Basically same as Quantile just different levels are used. Calculation will be done by InfluxDB
|
|
505
|
-
* (Apollon77) Add aggregate method "quantile" to calculate the quantile (0..1) of the values (requires options.quantile with the quantile level, defaults to 0.5 if not provided). Basically same as Percentile just different levels are used. Calculation will be done by InfluxDB
|
|
506
|
-
* (Apollon77) Add (experimental) method "integral" to calculate the integral of the values. Requires options.integralUnit with the time duration of the integral in seconds, defaults to 60s if not provided. Optionally a linear interpolation can be done by setting options.integralInterpolation to "linear". Calculation will be done byInfluxDB (except for InfluxDB 1 and interpolation "linear", this is done by adapter on raw data)
|
|
507
|
-
* (Apollon77) When request contains flag removeBorderValues: true, the result then cut the additional pre and post border values out of the results
|
|
508
|
-
* (Apollon77) Enhance the former "Ignore below 0" feature and now allow specifying to ignore below or above specified values. The old setting is converted to the new one
|
|
509
|
-
* (Apollon77) Allow to specify custom retention duration in days
|
|
510
|
-
* (Apollon77) Add a new message flushBuffer to flush complete buffers or for a given id
|
|
511
|
-
* (Apollon77) Allow to specify an additional path for the InfluxDB URL, when Reverse proxies are used or such
|
|
512
|
-
* (Apollon77) Make sure that min change delta allows numbers entered with comma (german notation) in all cases
|
|
513
|
-
* (Apollon77) Add support to specify how to round numbers on query per datapoint
|
|
514
|
-
* (Apollon77) Allow to specify if the last value of a state is logged on startup
|
|
515
|
-
|
|
516
|
-
### 2.6.3 (2022-03-07)
|
|
517
|
-
* (Apollon77) Fix potential crash cases (Sentry IOBROKER-INFLUXDB-4Q)
|
|
518
|
-
|
|
519
|
-
### 2.6.2 (2022-03-03)
|
|
520
|
-
* (Apollon77) Correctly handle db names with hyphens for InfluxDB 1
|
|
521
|
-
* (Apollon77) Fix getHistory for non boolean fields
|
|
522
|
-
* (Apollon77) Adjust shard group duration to influxdb proposals
|
|
523
|
-
|
|
524
|
-
### 2.6.1 (2022-02-28)
|
|
525
|
-
* (Excodibur) Address issue with updating retention policy for influxDB 1
|
|
526
|
-
|
|
527
|
-
### 2.6.0 (2022-02-24)
|
|
528
|
-
* (Excodibur) Make request timeout configurable - defaults to 30s
|
|
529
|
-
* (Apollon77) Add option to also accept self signed ssl certificates for InfluxDB 2.x
|
|
530
|
-
|
|
531
|
-
### 2.5.2 (2022-02-22)
|
|
532
|
-
* (bluefox) Marked interpolated data with `i=true`
|
|
533
|
-
|
|
534
|
-
### 2.5.0 (2022-02-14)
|
|
535
|
-
* (bluefox) Added new messages: 'update', 'delete', 'deleteRange', 'deleteAll' (only for influxdb v1)
|
|
536
|
-
* (bluefox) Corrected aggregation of data
|
|
537
|
-
|
|
538
|
-
### 2.4.0 (2021-12-19)
|
|
539
|
-
* (Excodibur) Added expert settings to deactivate health checks for Influx 2 db (There are no health checks for Influx 1)
|
|
540
|
-
* (Excodibur) Hide settings not relevant when "log changes only" is not used
|
|
541
|
-
* (Apollon77) Allow all number values for debounce again
|
|
542
|
-
* (Apollon77) InfluxDB also do not like Infinite values, so ignore them too
|
|
543
|
-
|
|
544
|
-
### 2.3.0 (2021-12-14)
|
|
545
|
-
* (bluefox) Support only `js.controller` >= 3.3.x
|
|
546
|
-
* (bluefox) Used system/custom view for collecting the objects
|
|
547
|
-
* (bluefox) Implemented option to ignore zero- or/and below zero- values
|
|
548
|
-
|
|
549
|
-
### 2.2.0 (2021-08-25)
|
|
550
|
-
* (Excodibur) Added option to store metadata (q, ack, from) as tags instead of fields for Influx 2.x - see README!
|
|
551
|
-
* (Excodibur) Failure to update/set retention policy will now cause warning instead of error/restart, to support more restrictive DB setups
|
|
552
|
-
* (Excodibur/Apollon77) Bug fixes and adjustments
|
|
553
|
-
|
|
554
|
-
### 2.1.1 (2021-08-13)
|
|
555
|
-
* IMPORTANT: You need to re-enter the password after installing this version!
|
|
556
|
-
* IMPORTANT: The adapter now requires Admin 5.1.15+ and js-controller 3.3+! For other admin or js-controller versions please use the former v1.9.5 of thi adapter.
|
|
557
|
-
* (Excodibur) Added InfluxDB 2.0 support
|
|
558
|
-
* (Excodibur) Adjust Retention handling on Database level to work for InfluxDB 1.x and 2.x
|
|
559
|
-
* (Excodibur) Removed retention options on datapoint level because never worked and also not supported really by InfluxDB anymore
|
|
560
|
-
|
|
561
|
-
### 1.9.5 (2021-04-19)
|
|
562
|
-
* (bluefox) Added the support of Admin5
|
|
563
|
-
|
|
564
|
-
### 1.9.4 (2021-01-17)
|
|
565
|
-
* (Apollon77) Optimize stop handling
|
|
566
|
-
|
|
567
|
-
### 1.9.3 (2020-11-07)
|
|
568
|
-
* (Apollon77) Crash case prevented (Sentry IOBROKER-INFLUXDB-T, IOBROKER-INFLUXDB-Y)
|
|
569
|
-
|
|
570
|
-
### 1.9.2 (2020-08-06)
|
|
571
|
-
* (Apollon77) crash prevented (Sentry IOBROKER-INFLUXDB-G)
|
|
572
|
-
|
|
573
|
-
### 1.9.1 (2020-07-22)
|
|
574
|
-
* (Apollon77) crash prevented (Sentry IOBROKER-INFLUXDB-E)
|
|
575
|
-
|
|
576
|
-
### 1.9.0 (2020-07-21)
|
|
577
|
-
* (Apollon77) Optimize handling in case of write errors and host unavailabilities
|
|
578
|
-
|
|
579
|
-
### 1.8.8 (2020-07-18)
|
|
580
|
-
* (Apollon77) Some errors prevented
|
|
581
|
-
* (Apollon77) Set timeouts for influxdb connections to make sure connectioens do not run forever
|
|
582
|
-
|
|
583
|
-
### 1.8.7 (2020-05-14)
|
|
584
|
-
* (bluefox) added command to read supported features
|
|
585
|
-
|
|
586
|
-
### 1.8.6 (2020-05-11)
|
|
587
|
-
* (Apollon77) make sure disabling of data points while starting adapter do not crash adapter (Sentry IOBROKER-INFLUXDB-7)
|
|
588
|
-
* (Apollon77) Make sure all start values are processed correctly
|
|
589
|
-
* (Apollon77) More checks to make sure to not crash when states are disabled while data are processed (Sentry IOBROKER-INFLUXDB-8)
|
|
590
|
-
|
|
591
|
-
### 1.8.5 (2020-05-08)
|
|
592
|
-
* (bluefox) set default history if not yet set
|
|
593
|
-
|
|
594
|
-
### 1.8.4 (2020-05-02)
|
|
595
|
-
* (Apollon77) make sure disabling of data points do not crash adapter (Sentry IOBROKER-INFLUXDB-4)
|
|
596
|
-
|
|
597
|
-
### 1.8.3 (2020-04-29)
|
|
598
|
-
* (Apollon77) Fix pot crash case when deleting objects while saving values (Sentry)
|
|
599
|
-
|
|
600
|
-
### 1.8.2 (2020-04-19)
|
|
601
|
-
* __Requires js-controller >= 2.0.0__
|
|
602
|
-
* (Apollon77) removed usage of adapter.objects
|
|
603
|
-
* (Apollon77) check if objects have changed and ignore unchanged
|
|
604
|
-
* (Apollon77) Add Sentry for Error Reporting with js-controller 3.0
|
|
605
|
-
* (Apollon77) Make sure value undefined is ignored
|
|
606
|
-
|
|
607
|
-
### 1.4.2 (2017-03-02)
|
|
608
|
-
* (Apollon77) Add option to define storage datatype per datapoint inclusing converting the value if needed
|
|
609
|
-
|
|
610
|
-
### 1.3.4 (2017-02-22)
|
|
611
|
-
* (Apollon77) Small fix for older configurations
|
|
612
|
-
|
|
613
|
-
### 1.3.3 (2017-02-08)
|
|
614
|
-
* (Apollon77) Enhance handling of DB outages with mass writes afterwards
|
|
615
|
-
* (Apollon77) Small fix for older configurations
|
|
616
|
-
|
|
617
|
-
### 1.3.2
|
|
618
|
-
* (Apollon77) Enhance Min-Delta logic for data points from type mixed
|
|
619
|
-
|
|
620
|
-
### 1.3.1 (2017-01-16)
|
|
621
|
-
* (bluefox) Fix handling of float values in Adapter config and Datapoint config.
|
|
622
|
-
|
|
623
|
-
### 1.3.0 (2016-12-02)
|
|
624
|
-
* (Apollon77) Add messages enableHistory/disableHistory
|
|
625
|
-
* (Apollon77) add support to log changes only if value differs a minimum value for numbers
|
|
626
|
-
|
|
627
|
-
### 1.2.1 (2016-11)
|
|
628
|
-
* (Apollon77) small enhancements and fixes
|
|
629
|
-
|
|
630
|
-
### 1.2.0 (2016-11-05)
|
|
631
|
-
* (Apollon77) support re-logging also for states that are not updated often (timed relog using relog-Interval)
|
|
632
|
-
* (Apollon77) try to solve easy type conflicts and convert float <--> boolean if needed
|
|
633
|
-
* (Apollon77) enhance getHistory to retrieve also boundary values better by selecting also points outside of the given time boundaries
|
|
634
|
-
|
|
635
|
-
### 1.1.1 (2016-11-03)
|
|
636
|
-
* (Apollon77) small final change on custom dialog
|
|
637
|
-
|
|
638
|
-
### 1.1.0 (2016-10-29)
|
|
639
|
-
* (Apollon77) optimizations and enhancements for high traffic situations
|
|
640
|
-
* (Apollon77) Bugfix if InfluxDB is unavailable
|
|
641
|
-
* (Apollon77) add functions getConflictingPoints and resetConflictingPoints
|
|
642
|
-
* (Apollon77) add option to re-log unchanged values to make it easier for visualization
|
|
643
|
-
|
|
644
|
-
### 1.0.1 (2016-10-18)
|
|
645
|
-
* (Apollon77) changed storing values to asynchronous way
|
|
646
|
-
* (Apollon77) add support for „minmax“ aggregate type on getHistory
|
|
647
|
-
|
|
648
|
-
### 1.0.0 (2016-10-10)
|
|
649
|
-
* (Apollon77) bulk write into DB
|
|
650
|
-
* (Apollon77) buffer values if no connection to DB
|
|
651
|
-
* (bluefox) connection indication
|
|
652
|
-
|
|
653
|
-
### 0.5.3 (2016-09-30)
|
|
654
|
-
* (Apollon77) enhance and correct documentation
|
|
655
|
-
* (Apollon77) implement "step" calculation for aggregation if only "count" is set
|
|
656
|
-
|
|
657
|
-
### 0.5.2 (2016-09-25)
|
|
658
|
-
* (Apollon77) change custom queries. Fix delete DB
|
|
659
|
-
|
|
660
|
-
### 0.5.1 (2016-09-20)
|
|
661
|
-
* (Apollon77) Step is given as Milliseconds and not Seconds!
|
|
662
|
-
|
|
663
|
-
### 0.5.0 (2016-08-30)
|
|
664
|
-
* (bluefox) Compatible only with new admin
|
|
665
|
-
|
|
666
|
-
### 0.4.0 (2016-08-27)
|
|
667
|
-
* (bluefox) change name of object from "history" to "custom"
|
|
668
|
-
|
|
669
|
-
### 0.3.1 (2016-06-07)
|
|
670
|
-
* (bluefox) better error handling
|
|
671
|
-
|
|
672
|
-
### 0.3.1 (2016-06-05)
|
|
673
|
-
* (bluefox) no support of influxDB 0.8 (please update)
|
|
674
|
-
|
|
675
|
-
### 0.3.0 (2016-05-18)
|
|
676
|
-
* (bluefox) make name of DB configurable
|
|
677
|
-
|
|
678
|
-
### 0.2.0 (2016-04-30)
|
|
679
|
-
* (bluefox) support of milliseconds instead of seconds
|
|
680
|
-
|
|
681
|
-
### 0.1.2 (2015-12-19)
|
|
682
|
-
* (bluefox) make onchange work
|
|
683
|
-
|
|
684
|
-
### 0.1.1 (2015-12-19)
|
|
685
|
-
* (bluefox) retention policy for 0.9.x
|
|
686
|
-
|
|
687
|
-
### 0.1.0 (2015-12-19)
|
|
688
|
-
* (bluefox) supported InfluxDB version 0.9.x and 0.8.x
|
|
689
|
-
|
|
690
|
-
### 0.0.2 (2015-12-14)
|
|
691
|
-
* (bluefox) change supported InfluxDB version to 0.9.x
|
|
692
|
-
|
|
693
|
-
### 0.0.1 (2015-12-12)
|
|
694
|
-
* (bluefox) initial commit
|
|
492
|
+
[Older changelogs can be found there](CHANGELOG_OLD.md)
|
|
695
493
|
|
|
696
494
|
## License
|
|
697
495
|
|
|
698
496
|
The MIT License (MIT)
|
|
699
497
|
|
|
700
|
-
Copyright (c) 2015-
|
|
498
|
+
Copyright (c) 2015-2026 bluefox, apollon77
|
|
701
499
|
|
|
702
500
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
703
501
|
of this software and associated documentation files (the "Software"), to deal
|