Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data cannot be read back out from influxdb2.0 #124

Closed
thomas725 opened this issue Jul 24, 2021 · 6 comments
Closed

Data cannot be read back out from influxdb2.0 #124

thomas725 opened this issue Jul 24, 2021 · 6 comments
Assignees

Comments

@thomas725
Copy link

Describe the bug
Data written to influxdb 2.0 with this adapter cannot be read back out by iobroker.

To Reproduce
Steps to reproduce the behavior:

  1. Have a fresh (few days old) iobroker installation
  2. Install this adapter using the github link
  3. Connect it to an InfluxDB 2.0
  4. Enable saving some object to it using the object explorer
  5. Try displaying the saved data after a few changes to the variable.
  6. Instead of the real data, the UI-table only shows "[object Object]"

Expected behavior
Display the data

Screenshots & Logfiles
Debug-Log:

2021-07-24 13:18:21.140  - �[34mdebug�[39m: influxdb.0 (413113) PING OK
2021-07-24 13:18:21.524  - �[34mdebug�[39m: influxdb.0 (413113) Incoming message getHistory from system.adapter.admin.0
2021-07-24 13:18:21.524  - �[34mdebug�[39m: influxdb.0 (413113) from(bucket: "iobroker")  |> range(start: -0ms, stop: 2021-07-24T11:18:31.510Z) |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.lm-sensors.acpitz")  |> sort(columns:["_time"], desc: true) |> group() |> limit(n: 50),from(bucket: "iobroker")             |> range(start: 2021-07-24T11:18:31.510Z)             |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.lm-sensors.acpitz")             |> sort(columns: ["_time"], desc: false)             |> group()             |> limit(n: 1)
2021-07-24 13:18:21.525  - �[34mdebug�[39m: influxdb.0 (413113) Query to execute: from(bucket: "iobroker")  |> range(start: -0ms, stop: 2021-07-24T11:18:31.510Z) |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.lm-sensors.acpitz")  |> sort(columns:["_time"], desc: true) |> group() |> limit(n: 50)
2021-07-24 13:18:21.585  - �[34mdebug�[39m: influxdb.0 (413113) Query to execute: from(bucket: "iobroker")             |> range(start: 2021-07-24T11:18:31.510Z)             |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.lm-sensors.acpitz")             |> sort(columns: ["_time"], desc: false)             |> group()             |> limit(n: 1)
2021-07-24 13:18:21.593  - �[33mwarn�[39m: influxdb.0 (413113) Error in query "from(bucket: "iobroker")             |> range(start: 2021-07-24T11:18:31.510Z)             |> filter(fn: (r) => r["_measurement"] == "0_userdata.0.lm-sensors.acpitz")             |> sort(columns: ["_time"], desc: false)             |> group()             |> limit(n: 1)": HttpError: error in building plan while starting program: cannot query an empty range
2021-07-24 13:18:21.593  - �[34mdebug�[39m: influxdb.0 (413113) Parsing retrieved rows:[[],[]]

Versions:

  • Adapter version: 2.0.0
  • JS-Controller version: 3.2.16
  • Node version: v14.17.2
  • Operating system: Linux Mint 20.2, Kernel 5.4.0-80
@Apollon77
Copy link
Contributor

@Excodibur is on it already

@Excodibur
Copy link
Collaborator

@thomas725 Please update the adapter with the latest state from Github again, and give it another test.

@thomas725
Copy link
Author

thomas725 commented Jul 30, 2021

The new version doesn't start with the error:
startInstance system.adapter.influxdb.0 Invalid version of "js-controller". Installed "3.2.16", required ">=3.3.0

But iobroker upgrade self gives Host "hostname" is up to date.

UPDATE: So I found I could update js-controller the same way as installing the influxdb, via the github link https://github.com/ioBroker/ioBroker.js-controller
Now it complains instead about:
startInstance system.adapter.influxdb.0: required adapter "admin" has wrong version. Installed "4.2.2", required ">=5.1.15"!

So next instaling via link https://github.com/ioBroker/ioBroker.admin

UPDATE2: Ups. That didn't work out quite as planned ;) Now the admin web page only gives me this:

This adapter cannot be installed directly from github.
You must install it from npm.
Write for that "npm install iobroker.admin" in according directory.

Running npm install iobroker.admin in /opt/iobroker didn't change anything. Hmpf...

UPDATE3: Okey, iobroker del admin + iobroker install admin + iobroker add admin got me a working admin webinterface again, but again of version "4.2.2", which is too low for the new influxdb adapter version.

@Excodibur
Copy link
Collaborator

Excodibur commented Jul 30, 2021

@thomas725 Are you using the stable, or latest (beta) repo in iobroker for updates? As the influx-adapter in its current iteration depends on some of the releases available there, it would be easiest to switch to that repo instead and then running iobroker update && iobroker upgrade.

If you'd rather install it directly via NPM, please try it in /opt/iobroker with npm i iobroker.admin@5.1.15.

@thomas725
Copy link
Author

thomas725 commented Jul 30, 2021

Ah okey, I'll research how to switch to the beta repository. Though in the meantime since you gave me an easy command to run I'll try that one.

UPDATE: that doesn't look promising. Now the admin interface never loads beyond the color-changing dot rotating in a circle.
UPDATE2: okey stepping back to npm i iobroker.admin@4.2.2 and then deleting the default repository and only leaving the beta repository in the admin settings did the trick. Now I had some updates to install. Afterwards I can see the data in the admin interface object, table tab :)

Thank you for the fix!

@Excodibur
Copy link
Collaborator

@thomas725: Thanks for testing it! If you see any other issues, please feel free to raise them here, :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants