- 🤖 Introduction
- ⚙️ Tech Stack
- 🔋 Features
- 💻 Youtube tutorial
- 🤸 Quick Start
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:
- Thingsboard client sdk
- Thingsboard Rpc Guide
- Thingsboard Client side Rpc API
- Thingsboard Server side Rpc API
💎 ESP32
💎 NodeJs
💎 Thingsboard
👉 ESP32 Connection
👉 Receiving RPC Data
👉 Sending RPC Data
See tutorial video here
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:
- ArduinoMqttClient
- ThingsBoard (IMPORTANT NOTE! use the ThingsBoard-0.12.2.zip version)
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