Support Telegram

This commit is contained in:
2021-01-22 11:52:06 +00:00
parent cde367c928
commit a6dc0799e0
5 changed files with 147 additions and 48 deletions

30
include/config_example.h Normal file
View File

@@ -0,0 +1,30 @@
// Type of RGB LED, adjusts the brightness calculations.
#define LED_TYPE 0 // 0 = Anode, 1 = Cathode
// GPIO pins for each colour
#define RED_LED_PIN 4
#define GREEN_LED_PIN 0
#define BLUE_LED_PIN 2
// Defines how many gradients a PWM pin has on this device, for ESP devices
// its 1024, on other systems its 255. Adjust as needed if you don't get
// accurate colour representation.
#define PWM_MAX_VALUE 1024
// WIFI connection details
#define WIFI_SSID "ssid"
#define WIFI_PASS "s3cur3"
// Enables the webserver
#define WEBSERVER
// Enable MQTT connection (not complete)
//#define ENABLE_MQTT
#define MQTT_SERVER "mqtt.local"
#define MQTT_PORT 1883
// Enable Telegram connection
//#define ENABLE_TELEGRAM
#define TELEGRAM_BOT_TOKEN "xxx:xxx"

18
include/statuses.h Normal file
View File

@@ -0,0 +1,18 @@
struct status
{
char name[20];
int r;
int g;
int b;
int blink;
};
struct status statuses[] = {
{"busy", 255, 0, 0, 0},
{"available", 0, 255, 0, 0},
{"away", 150, 255, 0, 0},
{"ooo", 255, 0, 255, 0},
{"offline", 0, 0, 0, 0},
{"blue", 0, 0, 255, 10}
};
#define STATUSES_COUNT 6