Skip to content

InsulaLabs/insipp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Insipp Arduino Library

Description

C++ client library for the Insula Labs INSI service. Provides key/value storage and eventing capabilities via web service for ESP32-based IoT devices.

Installation

  1. Clone or download this repository.
  2. Place the library folder in your Arduino libraries directory (e.g., ~/Documents/Arduino/libraries/insipp).
  3. Restart the Arduino IDE if open.

Dependencies

  • ESP32 Arduino core (install via Arduino Boards Manager).
  • No external library dependencies.

Setup for Development

Mac:

brew install arduino-cli

Building and Uploading

Use the provided Makefile:

  • make setup: Install ESP32 core.
  • make build: Compile the example sketch.
  • make upload: Upload to ESP32 board (update PORT in Makefile if needed).
  • make monitor: Open serial monitor.
  • make all: Build, upload, and monitor.

VSCode Configuration

For proper IntelliSense and LSP:

  • Disable the clangd extension for this workspace if enabled (go to Extensions, search for clangd, and disable for workspace).
  • Use or update .vscode/c_cpp_properties.json with include paths for ESP32:
    • Add paths like /Users/<yourusername>/Library/Arduino15/packages/esp32/hardware/esp32/3.3.1/cores/esp32 and libraries.
    • Adjust compilerPath to your avr-gcc installation.
    • Ensure "defines" include ESP32-specific macros like "ARDUINO_ARCH_ESP32" and "ESP32".

Usage

Include the header:

#include <insipp.hpp>

Implement a logger and HTTP client (ESP32 default provided).

Example (from BasicDemo.ino):

class logger : public log_cb_if {
public:
    void on_log(const char* message) const override {
        Serial.print("[LOG] ");
        Serial.println(message);
    }
};

logger log_handler;
http_client_esp32 http;
config_s config = {
    .api_key = "your_api_key_here",
    .log_cb = &log_handler,
};
Insipp client(config, http);

// Set value
client.set_value({"test.key", "value"});

// Get value
String value;
client.get_value("test.key", value);

See examples/BasicDemo/BasicDemo.ino for full demonstration of all operations including cache, setnx, cas, bump, and iterate.

About

ESP32 C++ Client to integrate with an insi server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors