ESPresense/src/Settings.h

63 lines
2.4 KiB
C
Raw Normal View History

2018-10-01 23:26:07 +02:00
//Replace with your Wifi SSID; example: #define ssid "MyWifi"
2021-03-15 20:58:17 +01:00
#define DEFAULT_WIFI_SSID "$SSID$"
2018-10-01 23:26:07 +02:00
//Replace with your Wifi password; example: #define password "12345678"
2021-03-15 20:58:17 +01:00
#define DEFAULT_WIFI_PASSWORD "$WIFI_PASSWORD$"
2018-10-01 23:26:07 +02:00
//Replace with a human-friendly host name. Must not contain spaces or special characters and be unique on your network
2021-03-15 20:58:17 +01:00
#define DEFAULT_HOSTNAME "esp32_room_presence"
2018-10-01 23:26:07 +02:00
2021-03-15 20:58:17 +01:00
//Replace with your MQTT Broker address
#define DEFAULT_MQTT_HOST "mqtt.z13.org"
2018-10-01 23:26:07 +02:00
2021-03-15 20:58:17 +01:00
//Replace with your MQTT Broker port
#define DEFAULT_MQTT_PORT 1883
2018-10-01 23:26:07 +02:00
2021-03-15 20:58:17 +01:00
//Replace with your MQTT Broker user
#define DEFAULT_MQTT_USER ""
2018-10-01 23:26:07 +02:00
2021-03-15 20:58:17 +01:00
//Replace with your MQTT Broker password
#define DEFAULT_MQTT_PASSWORD ""
2018-10-01 23:26:07 +02:00
2021-03-15 20:58:17 +01:00
//Replace with the room name where the node will be placed
#define DEFAULT_ROOM "living-room"
2018-10-02 02:01:29 +02:00
2018-12-26 20:55:33 +01:00
//Specify the LED pin. For most dev boards, this is GPIO2
2021-03-16 02:11:55 +01:00
#ifdef M5STICK
2021-03-20 06:18:10 +01:00
#define LED_BUILTIN 10 // M5StickC
2021-03-16 02:11:55 +01:00
#else
2021-03-20 06:18:10 +01:00
#define LED_BUILTIN 13 // Feather
2021-03-16 02:11:55 +01:00
#endif
2018-12-26 20:55:33 +01:00
// Logic level for turning the led on. Most boards use active low, meaning LED_ON should be set to 0
#define LED_ON 0
2018-10-02 02:01:29 +02:00
//Define the base topic for room detection. Usually "room_presence"
2021-03-15 20:58:17 +01:00
#define CHANNEL String(F("room_presence"))
2018-10-03 22:53:25 +02:00
//Define the topic for publishing availability
2021-03-15 20:58:17 +01:00
#define AVAILABILITY_TOPIC String(F("presence_nodes/")) + room
//Define the topic for publishing JSON attributes
2021-03-15 20:58:17 +01:00
#define TELEMETRY_TOPIC String(F("presence_nodes/")) + room + String(F("/tele"))
// Define bluetooth scan parameters
2021-03-15 20:58:17 +01:00
#define BLE_ACTIVE_SCAN true // Active scan uses more power, but get results faster
2021-03-22 23:56:29 +01:00
#define BLE_SCAN_DURATION 2 // Define the duration of a single scan in seconds
#define BLE_SCAN_INTERVAL 333 // Used to determine antenna sharing between Bluetooth and WiFi. Do not modify unless you are confident you know what you're doing
#define BLE_SCAN_WINDOW 320 // Used to determine antenna sharing between Bluetooth and WiFi. Do not modify unless you are confident you know what you're doing
2019-01-13 15:42:24 +01:00
// Maximum distance (in meters) to report. Devices that are calculated to be further than this distance in meters will not be reported
2021-03-15 22:45:13 +01:00
#define MAX_DISTANCE 8
// MQTT topic for sensor values from HTU21D temperature and humidity sensor
//#define htuSensorTopic "presence_nodes/" hostname "/sensor"
//List of allowed MAC Addresses for MQTT Publish. All others will be ignored.
//Feature is disabled by default.
2021-03-15 20:58:17 +01:00
//#define ALLOWED_LIST_CHECK
String allowedList[] = {"11223344aabb", "11223344aabb"};
uint32_t allowedListNumberOfItems = 2;
2021-03-20 06:18:10 +01:00