# Input data to Influxdb

**URL:** https://discourse.nodered.org/t/input-data-to-influxdb/53324
**Category:** General
**Tags:** database
**Created:** [7 November 2021 09:58 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324 "2021-11-07T09:58:20Z")
**Posts on this page:** 16
**Page:** 2

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [8 November 2021 20:48 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/21 "2021-11-08T20:48:06Z")

</div>

Thank you,, I read the help text and configured the node, when i run the flow i get an http404error , pretty sure its a config and or permissions issue, with influxdb so i have to look into that, thank you for your help .

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 November 2021 21:39 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/22 "2021-11-08T21:39:11Z")

</div>

Which version of Influxdb are you using and how have you configured the influx server node?

---

<div class="post-metadata">

### Author: ![JbmDk](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@JbmDk](https://discourse.nodered.org/u/JbmDk)
#### Post date: [8 November 2021 21:52 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/23 "2021-11-08T21:52:19Z")

</div>

Hi picklerick  
off topic.  
I’m interested in how are you getting the mqtt data from the morningstar ?  
J

---

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [8 November 2021 22:06 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/24 "2021-11-08T22:06:29Z")

</div>

Influx 1.8.5

heres a copy of the influxdb node

```auto
    {
        "id": "5fbcc4def204bf4d",
        "type": "influxdb out",
        "z": "a8781b5b58ce12b5",
        "influxdb": "4c0472df79128008",
        "name": "",
        "measurement": "voltage",
        "precision": "",
        "retentionPolicy": "",
        "database": "sunsaver",
        "precisionV18FluxV20": "ms",
        "retentionPolicyV18Flux": "one_week",
        "org": "organisation",
        "bucket": "bucket",
        "x": 640,
        "y": 100,
        "wires": []
    },
    {
        "id": "4c0472df79128008",
        "type": "influxdb",
        "hostname": "192.168.1.11",
        "port": "8086",
        "protocol": "http",
        "database": "database",
        "name": "sunsaver",
        "usetls": false,
        "tls": "",
        "influxdbVersion": "1.8-flux",
        "url": "http://localhost:8086/sunsaver",
        "rejectUnauthorized": false,
        "credentials": {}
    }
]

```

---

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [8 November 2021 22:13 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/25 "2021-11-08T22:13:16Z")

</div>

I have this C program running on a raspberry pi with a usb to meterbus connecting to the sunsaver.

heres the code

> **[GitHub - anschoewe/morningstar-sunsaver-mppt](https://github.com/anschoewe/morningstar-sunsaver-mppt)**
>
> Contribute to anschoewe/morningstar-sunsaver-mppt development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 November 2021 22:20 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/26 "2021-11-08T22:20:52Z")

</div>

Can you connect to influx using the influx command line s/w?

---

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [8 November 2021 22:29 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/27 "2021-11-08T22:29:44Z")

</div>

Yes, I have created a Database sunsaver, and when i input  
$ influx  
it comes up  
Connected to [http://localhost:8086](http://localhost:8086) version 1.8.5  
InfluxDB shell version: 1.8.5

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 November 2021 07:11 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/28 "2021-11-09T07:11:11Z")

</div>

Can you access the sunsaver database via the command line?

Did you run the influx command line on the same computer that runs node red?

Don't specify flux in the influx node unless you want to use the flux query language, though that should not cause 404 error.

---

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [9 November 2021 08:10 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/29 "2021-11-09T08:10:46Z")

</div>

Yes i can access sunsaver database by the command line.  
Yes the influx CL and node red are on the same computer  
noted on the flux in the influx node, i will switch back to v1.x

---

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [9 November 2021 08:20 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/30 "2021-11-09T08:20:24Z")

</div>

here is a copy of the http section of the /etc/influxdb/influxdb.conf

[http]

# Determines whether HTTP endpoint is enabled.

# enabled = true

# Determines whether the Flux query endpoint is enabled.

# flux-enabled = false

# Determines whether the Flux query logging is enabled.

# flux-log-enabled = false

# The bind address used by the HTTP service.

# bind-address = ":8086"

# Determines whether user authentication is enabled over HTTP/HTTPS.

# auth-enabled = false

# The default realm sent back when issuing a basic auth challenge.

# realm = "InfluxDB"

# Determines whether HTTP request logging is enabled.

# log-enabled = true

# Determines whether the HTTP write request logs should be suppressed when the log is enabled.

# suppress-write-log = false

# When HTTP request logging is enabled, this option specifies the path where

# log entries should be written. If unspecified, the default is to write to stderr, which

# intermingles HTTP logs with internal InfluxDB logging.

# 

# If influxd is unable to access the specified path, it will log an error and fall back to writing

# the request log to stderr.

# access-log-path = ""

# Filters which requests should be logged. Each filter is of the pattern NNN, NNX, or NXX where N is

# a number and X is a wildcard for any number. To filter all 5xx responses, use the string 5xx.

# If multiple filters are used, then only one has to match. The default is to have no filters which

# will cause every request to be printed.

# access-log-status-filters =

# Determines whether detailed write logging is enabled.

# write-tracing = false

# Determines whether the pprof endpoint is enabled. This endpoint is used for

# troubleshooting and monitoring.

# pprof-enabled = true

# Enables authentication on pprof endpoints. Users will need admin permissions

# to access the pprof endpoints when this setting is enabled. This setting has

# no effect if either auth-enabled or pprof-enabled are set to false.

# pprof-auth-enabled = false

# Enables a pprof endpoint that binds to localhost:6060 immediately on startup.

# This is only needed to debug startup issues.

# debug-pprof-enabled = false

# Enables authentication on the /ping, /metrics, and deprecated /status

# endpoints. This setting has no effect if auth-enabled is set to false.

# ping-auth-enabled = false

# Determines whether HTTPS is enabled.

# https-enabled = false

# The SSL certificate to use when HTTPS is enabled.

# https-certificate = "/etc/ssl/influxdb.pem"

# Use a separate private key location.

# https-private-key = ""

# The JWT auth shared secret to validate requests using JSON web tokens.

# shared-secret = ""

# The default chunk size for result sets that should be chunked.

# max-row-limit = 0

# The maximum number of HTTP connections that may be open at once. New connections that

# would exceed this limit are dropped. Setting this value to 0 disables the limit.

# max-connection-limit = 0

# Enable http service over unix domain socket

# unix-socket-enabled = false

# The path of the unix domain socket.

# bind-socket = "/var/run/influxdb.sock"

# The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit.

# max-body-size = 25000000

# The maximum number of writes processed concurrently.

# Setting this to 0 disables the limit.

# max-concurrent-write-limit = 0

# The maximum number of writes queued for processing.

# Setting this to 0 disables the limit.

# max-enqueued-write-limit = 0

# The maximum duration for a write to wait in the queue to be processed.

# Setting this to 0 or setting max-concurrent-write-limit to 0 disables the limit.

# enqueued-write-timeout = 0

```
# User supplied HTTP response headers
#
# [http.headers]
# X-Header-1 = "Header Value 1"
# X-Header-2 = "Header Value 2"

```

I dont understand enough about permissions to know if all this is ok. I tried changing the HTTPs to enabled yesterday but ended up failing to connect so i undid it and searched for more info

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 November 2021 08:44 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/31 "2021-11-09T08:44:39Z")

</div>

> [@picklerick](#):
>
> i will switch back to v1.x

Also I note that you have specified an IP address there. Try it with version 1.x and `localhost` for the server.

---

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [9 November 2021 13:17 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/32 "2021-11-09T13:17:35Z")

</div>

Fantastic that worked,, I can now see in influx the database sunsaver with voltage and value.

Thank you very much. I really appreciate the time you have taken to help me with this.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 November 2021 13:28 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/33 "2021-11-09T13:28:38Z")

</div>

Which change fixed it? The 1.x or the IP?

---

<div class="post-metadata">

### Author: ![picklerick](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/picklerick/32/49793_2.png) [@picklerick](https://discourse.nodered.org/u/picklerick)
#### Post date: [9 November 2021 14:51 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/34 "2021-11-09T14:51:08Z")

</div>

the change to 1.x

I never imagined that i needed to set it to 1.x as i have influxdb v1.8.5 so wrongly assumed that 1.8flux was the right one, now i have learnt that flux is a whole other ball game.

but i have also changed the ip to localhost as this will prevent any problems if the ip changes in future.  
Thanks again

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 November 2021 15:04 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/35 "2021-11-09T15:04:24Z")

</div>

V1.8 can handle the old style query language but also the Flux query language (which is used in V2), so you have to tell it which one you want to use. You are not the first to be confused by the node setting, but it is not obvious how it could be improved.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [8 January 2022 15:05 UTC](https://discourse.nodered.org/t/input-data-to-influxdb/53324/36 "2022-01-08T15:05:17Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/input-data-to-influxdb/53324.md?page=1)
