rch-goldsnaker / thingsboard-rpc-tutorial

5 stars 4 forks source link

πŸ’» Thingsboard RPC tutorial | with ESP32

Project Banner

πŸ“‹ Table of Contents

  1. πŸ€– Introduction
  2. βš™οΈ Tech Stack
  3. πŸ”‹ Features
  4. πŸ’» Youtube tutorial
  5. 🀸 Quick Start

πŸ€– Introduction

This repository is designed to offer a quick guide on RPC (Remote Procedure Calls) for ThingsBoard. Inside, you'll find code for programming an ESP32 and a simple Node.js app. The Node.js app communicates with the ThingsBoard API and uses RPC services.

Reference Link:

βš™οΈ Tech Stack

πŸ’Ž ESP32

πŸ’Ž NodeJs

πŸ’Ž Thingsboard

πŸ”‹ Features

πŸ‘‰ ESP32 Connection

πŸ‘‰ Receiving RPC Data

πŸ‘‰ Sending RPC Data

🎬 Youtube tutorial

See tutorial video here

🀸 Quick Start

Follow these steps to set up the project locally on your machine.

Prerequisites

Make sure you have the following installed on your machine:

For Esp32 install library:

For NodeJs App, install Node.js>= 12

Cloning the Repository

git clone https://github.com/rch-goldsnaker/thingsboard-rpc-tutorial
cd thingsboard-rpc-tutorial

For Node Js App

Create a .env file inside NodeJs folder.

Installation

Go to NodeJs folder and install the project dependencies using npm:

npm install

Set Up Environment Variables

Create a new file named .env inside of NodeJs folder and add the following content:

TB_API_URL=https://thingsboard.cloud
TB_USERNAME=your@mail.com
TB_PASSWORD=yourPass

Running the Project

npm run start

For Esp 32

Copy the code to Arduino IDE | Wokwi | Platformio and Upload