Giter VIP home page Giter VIP logo

esp8266influxclient's Introduction

ESP8266InfluxClient

A simple way to log data from your ESP8266 to an InfluxDB server using the HTTP API. Designed for use in the ESP8266 Core for Arduino enviroment.

Does it work? It seems to! Please open an issue / contribute a pull request if you have fixes, features, optomizations, issues, etc.

#TODO:

  • Update multiple fields at once
  • Authentication support
  • More update functions for various data types
  • Better support for floats

How to use:

Create a database object with some info about your database!

const char * host = "192.168.1.152";  // ip or domain name
uint16_t port = 8086; // Port your server is listening for data on. Default is 8086

ESP8266InfluxClient influx_server = ESP8266InfluxClient(host, port);

Create a Measurement struct with the settings for the specific field you want to update.
If you're logging multiple measurements, create multiple structs with the relevant info for each.

Measurement bedroom_temp = {
  "house_iot_data",  // Database name
  "bedroom",   // Measurement name
  "fahrenheit",      // Field key
  "bedroom-esp8266-01", // Host name (A name or unique id for the sensor)
  "us-east"     // Region
};

Pass that function, and a value, to the update function!

influx_server.update(bedroom_temp, read_temp());

Example:

See data_logger.ino

esp8266influxclient's People

Contributors

djbeadle avatar

Stargazers

 avatar

Watchers

 avatar

esp8266influxclient's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.