https://github.com/machbase/esp32-mqtt
https://github.com/machbase/esp32-mqtt
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/machbase/esp32-mqtt
- Owner: machbase
- Created: 2024-05-14T02:31:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-14T07:08:31.000Z (about 2 years ago)
- Last Synced: 2024-05-15T12:20:06.531Z (about 2 years ago)
- Language: C++
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Esp32-mqtt
# Requirements
ESP-32 > Any ESP-32 board with Wifi
PubSubClient by Nick O’Leary from https://pubsubclient.knolleary.net/
DGT sensor library by Adafruit from https://github.com/adafruit/DHT-sensor-library
# Wiring to the Host Board

# Install Machbase neo
Please follow instructions from https://docs.machbase.com/neo/getting-started/
You should create table after install Machbase neo TSDB with following SQL
```sql
CREATE TAG TABLE tag (name VARCHAR(20) PRIMARY KEY, time DATETIME BASETIME, value DOUBLE SUMMARIZED) WITH ROLLUP (hour)
```
# Things to be changed before build
- Wifi (ssid, password)
```c
// WiFi
const char *ssid = "MACHBASE_AP"; // Enter your Wi-Fi name
const char *password = "xxxxxxxx"; // Enter Wi-Fi password
WiFiClient wifi_connection;
```
- Timzone related settings
```c
//Time
const char* ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 3600*9; // TZ Diff in seconds
const int daylightOffset_sec = 0;
```
- Machbase Internal MQTT Broker IP/Port
```c
// MQTT
const char *mqtt_server = "192.168.1.131"; // Your Machbase neo server IP
const char *topic = "db/append/TAG"; // default
const int mqtt_port = 5653; // default
```