Coder Social home page Coder Social logo

jalinei / esp32-edge-firmware Goto Github PK

View Code? Open in Web Editor NEW

This project forked from libresolar/esp32-edge-firmware

0.0 0.0 0.0 778 KB

Firmware for CAN/UART to WiFi/BLE gateway using ESP32

License: Apache License 2.0

C 67.89% CMake 0.86% JavaScript 4.05% HTML 0.41% Vue 20.31% C++ 6.49%

esp32-edge-firmware's Introduction

Libre Solar ESP32 Edge Firmware

Firmware for CAN and UART to WiFi or Bluetooth gateway based on ESP32-IDF v4.0.

Warning: This firmware is at a very early stage. Expect bugs and report them in the issues :)

Concept Overview

The firmware should support multiple use-cases to connect Libre Solar devices with other networks (incl. the internet).

ESP32 acting as an Edge Gateway to the cloud

In this application, the ESP32 is integrated in a separate device (like the Libre Solar Data Manager) and communicates with the other devices like the charge controller via CAN bus.

The ThingSet protocol on the CAN bus can translated to MQTT in order to push data to a cloud. For local access, the ESP32 can directly serve a website or provide a Bluetooth Low Energy interface for a mobile phone app.

Edge Gateway Application

ESP32 integrated in device (e.g. charge controller)

The ESP32 board can also be directly integrated in a charge controller or other devices and communicate with the host device via UART interface (again using the ThingSet protocol).

The data can be accessed in the same way as described above.

Application with ESP32 integrated in device

Supported devices

  • Libre Solar Data Manager
  • Sparkfun ESP32thing
  • Most other ESP32-based boards

Firmware features

  • Written in C using ESP-IDF and PlatformIO
  • Data input from Libre Solar devices via
  • Local communication via ThingSet Protocol
  • Data access via HTTP JSON API
  • Publishing of monitoring data via WiFi to
    • Open Energy Monitor Emoncms
    • MQTT server (ToDo)
  • Data logging on SD card (ToDo)

Usage

Getting the firmware

This firmware repository contains git submodules, so you need to clone (download) it by calling:

git clone --recursive https://github.com/LibreSolar/esp32-edge-firmware

Unfortunately, the green GitHub "Clone or download" button does not include submodules. If you cloned the repository already and want to pull the submodules, run git submodule update --init --recursive.

Building the webapp

To be able to build the esp32-edge-firmware you need to build the webapp first. To do so, go into the webapp folder

    cd esp32-edge-firmware/webapp

and run

    npm install
    npm run build

You are now able to build the firmware itself.

ESP-IDF toolchain

The ESP-IDF is the native toolchain for ESP32 microcontrollers by Espressif. Follow this guide to install it.

After installation run the following commands:

idf.py build            # compile the firmware
idf.py flash            # flash it to the device

PlatformIO

You can use PlatformIO for easy building and flashing. However, the PlatformIO packages for ESP-IDF are not updated as frequently as the official repositories.

Configuration

The firmware is configured using Kconfig integrated into ESP-IDF.

The most convenient way is to run idf.py menuconfig after the ESP-IDF was successfully installed. If ESP-IDF is not available and PlatformIO is used, configuration can be changed manually in the generated sdkconfig file.

Wifi Connection

The firmware supports provisioning via bluetooth. You can download the espressif BLE provisioning app in the iOS or android app store and scan this QR code:

Provisioning QR Code

You can also scan for the device manually in the app, the data manager should be found as device PROV_LS-DM, the service pin is LibreSolar.

esp32-edge-firmware's People

Contributors

dependabot[bot] avatar gretel5x avatar martinjaeger avatar rbtnx avatar tobiasfrahm avatar

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.