-
Notifications
You must be signed in to change notification settings - Fork 11
/
settings.h.example
46 lines (33 loc) · 1.38 KB
/
settings.h.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#define PIN_CLK D2
#define PIN_DATA D1
/**
* If you're using a cheap D1 clone, these might be the correct pins for you
*
*/
#define PIN_CLK 4 //D2 on PCB
#define PIN_DATA 5 //D1 on PCB
const float EXP_SMOOTH_ALPHA = 0.125;
const unsigned long PUBLISH_INTERVAL_FAST_MS = (10 * 1000);
const unsigned long PUBLISH_INTERVAL_SLOW_MS = (5 * 60 * 1000);
const char* MQTT_HOST = "mqtt.core.bckspc.de";
const char* MQTT_USERNAME = NULL;
const char* MQTT_PASSWORD = NULL;
const uint8_t MQTT_MAX_CONNECT_RETRY = 42;
//If you don't want to use home-assistant autodiscovery comment this out
#define USE_HA_AUTODISCOVERY
#ifdef USE_HA_AUTODISCOVERY
#define HA_DISCOVERY_PREFIX "homeassistant"
const char* MQTT_LAST_WILL_PAYLOAD_CONNECTED = "online";
const char* MQTT_LAST_WILL_PAYLOAD_DISCONNECTED = "offline";
#else
//If you're not using HA Autodiscovery, you can specify your topics here
const char* MQTT_TOPIC_CO2_MEASUREMENT = "sensor/co2/hackcenter";
const char* MQTT_TOPIC_TEMPERATURE_MEASUREMENT = "sensor/temperature/hackcenter/co2sensor";
const char* MQTT_TOPIC_LAST_WILL = "state/sensor/co2/lounge";
const char* MQTT_LAST_WILL_PAYLOAD_CONNECTED = "connected";
const char* MQTT_LAST_WILL_PAYLOAD_DISCONNECTED = "disconnected";
#endif
//These are optional
//const char* HOSTNAME = "ESP-co2Monitor";
//const char* CONF_WIFI_PASSWORD = "drowssap";
#define OTA_PASSWORD "foobarbaz"