Send data from ESP32 to InfluxDB Cloud

Hi!
I want to send data from ESP32 using the Arduino libraries to InfluxDB Azure cloud. In order to check connections and getting familiar with Influx I first tried to use the basic example provided in the Data Arduino source section. Unfortunately sending data does not work. Connecting to influx database looks fine and seems to work!
The message Log of the serial monitor shows this:
> 17:34:54.870 β†’ rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
> 17:34:54.870 β†’ configsip: 0, SPIWP:0xee
> 17:34:54.870 β†’ clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
> 17:34:54.870 β†’ mode:DIO, clock div:1
> 17:34:54.917 β†’ load:0x3fff0018,len:4
> 17:34:54.917 β†’ load:0x3fff001c,len:1216
> 17:34:54.917 β†’ ho 0 tail 12 room 4
> 17:34:54.917 β†’ load:0x40078000,len:9720
> 17:34:54.917 β†’ ho 0 tail 12 room 4
> 17:34:54.917 β†’ load:0x40080400,len:6352
> 17:34:54.917 β†’ entry 0x400806b8
> 17:34:55.291 β†’ Connecting to wifi
> 17:34:57.162 β†’ Syncing time.
> 17:34:57.667 β†’ Synchronized time: Tue Nov 3 17:34:57 2020
*> 17:34:57.667 β†’ *
> 17:34:58.604 β†’ Connected to InfluxDB: https://westeurope-1.azure.cloud2.influxdata.com
> 17:34:58.604 β†’ Writing: wifi_status,device=ESP32,SSID=WLAN\ AP\ 2,4GHz rssi=-49i
*> 17:34:59.568 β†’ InfluxDB write failed: *
> 17:34:59.568 β†’ Wait 10s
> 17:35:09.540 β†’ Writing: wifi_status,device=ESP32,SSID=WLAN\ AP\ 2,4GHz rssi=-51i
*> 17:35:10.542 β†’ InfluxDB write failed: *
> 17:35:10.542 β†’ Wait 10s

Data are not visible in the database. There’s also no error message shown.
#define INFLUXDB_CLIENT_DEBUG is uncommented but with no results as shown above.

Has anyone an idea?
BR

Hi Tobias.

Since the β€œInfluxDB write failed” I would check the role of the token / API key that the role has write access into the DB or bucket.

Hi!
Access data like token, orga or bucket are definitivly correct. It is possible to write data into my database via β€œinfluxdb-client-csharp” from Windows PC. But not by β€œInfluxDB-Client-for-Arduino” which should support ESP32. I also checked using different data types for fields (simple integer), without success.
I assume that write functions of that Arduino Client are outdated or not supported/compatible any more with InfluxDB cloud.
Could anybody confirm?
BR

Issue solved!
For β€œInfluxDB-Client-for-Arduino” it is necessay to use NO special characters for Bucket Name and ORGA name at InfluxDB!! Characters like β€œ@” or β€œ'” even whitespaces are causing obviously problems in URL encoding with this lib!
BR

1 Like