2022-03-19 20:18:11 +01:00
|
|
|
#pragma once
|
|
|
|
|
2022-08-29 19:14:25 +02:00
|
|
|
// Number of ms between update checks
|
2022-08-23 12:55:04 +02:00
|
|
|
#ifndef CHECK_FOR_UPDATES_INTERVAL
|
2022-08-29 19:14:25 +02:00
|
|
|
#define CHECK_FOR_UPDATES_INTERVAL 900000
|
2022-08-23 12:55:04 +02:00
|
|
|
#endif
|
|
|
|
|
2022-09-06 16:57:30 +02:00
|
|
|
// Number of seconds to wait for a Station Wifi connection to be established
|
|
|
|
#ifndef DEFAULT_WIFI_TIMEOUT
|
2023-09-03 04:47:31 +02:00
|
|
|
#define DEFAULT_WIFI_TIMEOUT 60
|
2022-09-06 16:57:30 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Number of seconds to keep up captive portal (SoftAP) before rebooting
|
|
|
|
#ifndef DEFAULT_PORTAL_TIMEOUT
|
|
|
|
#define DEFAULT_PORTAL_TIMEOUT 300
|
2022-08-23 12:55:04 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define UPDATE_STARTED -255
|
|
|
|
#define UPDATE_COMPLETE 255
|
|
|
|
|
2023-11-05 18:26:04 +01:00
|
|
|
#define JSON_BUFFER_SIZE (12 * 1024)
|
2022-08-23 12:55:04 +02:00
|
|
|
|
|
|
|
#define BLE_SCAN_INTERVAL 0x80
|
|
|
|
#define BLE_SCAN_WINDOW 0x80
|
|
|
|
|
|
|
|
// Define the base topic for room detection. Usually "espresense"
|
2022-08-29 19:14:25 +02:00
|
|
|
#define CHANNEL "espresense"
|
2022-07-31 06:51:34 +02:00
|
|
|
|
2022-03-14 02:54:50 +01:00
|
|
|
// Replace with your MQTT Broker address
|
2021-03-15 20:58:17 +01:00
|
|
|
#define DEFAULT_MQTT_HOST "mqtt.z13.org"
|
2018-10-01 23:26:07 +02:00
|
|
|
|
2022-03-14 02:54:50 +01:00
|
|
|
// Replace with your MQTT Broker port
|
2021-03-15 20:58:17 +01:00
|
|
|
#define DEFAULT_MQTT_PORT 1883
|
2018-10-01 23:26:07 +02:00
|
|
|
|
2022-03-14 02:54:50 +01:00
|
|
|
// Replace with your MQTT Broker user
|
2021-03-15 20:58:17 +01:00
|
|
|
#define DEFAULT_MQTT_USER ""
|
2018-10-01 23:26:07 +02:00
|
|
|
|
2022-03-14 02:54:50 +01:00
|
|
|
// Replace with your MQTT Broker password
|
2021-03-15 20:58:17 +01:00
|
|
|
#define DEFAULT_MQTT_PASSWORD ""
|
2018-10-01 23:26:07 +02:00
|
|
|
|
2023-02-04 03:01:22 +01:00
|
|
|
#define DEFAULT_HA_DISCOVERY_PREFIX "homeassistant"
|
|
|
|
|
2021-08-24 00:10:53 +02:00
|
|
|
// Maximum distance (in meters) to report. Devices that are calculated to be further than this distance in meters will not be reported
|
|
|
|
#define DEFAULT_MAX_DISTANCE 16
|
2018-10-02 02:01:29 +02:00
|
|
|
|
2022-06-12 17:16:08 +02:00
|
|
|
// Seconds before reporting radar/motion cleared
|
|
|
|
#define DEFAULT_DEBOUNCE_TIMEOUT 0.5
|
|
|
|
|
2022-02-13 18:58:17 +01:00
|
|
|
#define DEFAULT_QUERY ""
|
2024-10-06 05:19:18 +02:00
|
|
|
#define DEFAULT_REQUERY_MS 300000
|
|
|
|
|
2022-02-13 18:58:17 +01:00
|
|
|
#define DEFAULT_INCLUDE ""
|
|
|
|
#define DEFAULT_EXCLUDE ""
|
2024-10-06 05:19:18 +02:00
|
|
|
#define DEFAULT_KNOWN_MACS ""
|
|
|
|
#define DEFAULT_KNOWN_IRKS ""
|
2022-02-13 18:58:17 +01:00
|
|
|
|
2022-12-28 00:05:56 +01:00
|
|
|
#define DEFAULT_RX_REF_RSSI (-65)
|
|
|
|
#define DEFAULT_TX_REF_RSSI (-59)
|
2022-03-06 17:48:04 +01:00
|
|
|
#define DEFAULT_ABSORPTION (3.5)
|
2024-10-06 05:19:18 +02:00
|
|
|
#define DEFAULT_RX_ADJ_RSSI 0
|
2021-09-30 18:48:50 +02:00
|
|
|
|
2022-08-04 02:27:06 +02:00
|
|
|
#define DEFAULT_FORGET_MS 150000 // Ms to remove fingerprint after not seeing it
|
2022-03-07 02:15:56 +01:00
|
|
|
#define DEFAULT_SKIP_DISTANCE 0.5 // If beacon has moved less than this skip update
|
2021-09-30 18:48:50 +02:00
|
|
|
#define DEFAULT_SKIP_MS 5000 // Ms to skip mqtt update if no movement
|
2021-03-30 19:24:02 +02:00
|
|
|
|
2024-10-06 05:19:18 +02:00
|
|
|
#define DEFAULT_COUNT_ENTER 2.0f
|
|
|
|
#define DEFAULT_COUNT_EXIT 4.0f
|
|
|
|
#define DEFAULT_COUNT_MS 10000
|
|
|
|
#define DEFAULT_COUNT_IDS ""
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-13 11:45:58 +01:00
|
|
|
// I2C Defaults
|
2022-08-13 20:52:20 +02:00
|
|
|
#ifdef M5STICK
|
|
|
|
#define DEFAULT_I2C_BUS_1_SDA 32
|
|
|
|
#define DEFAULT_I2C_BUS_1_SCL 33
|
|
|
|
#define DEFAULT_I2C_BUS_2_SDA 21
|
|
|
|
#define DEFAULT_I2C_BUS_2_SCL 22
|
|
|
|
#define DEFAULT_I2C_BUS 1
|
|
|
|
#else
|
|
|
|
#ifdef M5ATOM
|
|
|
|
#define DEFAULT_I2C_BUS_1_SDA 26
|
|
|
|
#define DEFAULT_I2C_BUS_1_SCL 32
|
|
|
|
#define DEFAULT_I2C_BUS_2_SDA 25
|
|
|
|
#define DEFAULT_I2C_BUS_2_SCL 21
|
|
|
|
#define DEFAULT_I2C_BUS 1
|
|
|
|
#else
|
2022-09-06 23:44:30 +02:00
|
|
|
#ifdef ESP32C3
|
|
|
|
#define DEFAULT_I2C_BUS_1_SDA 19
|
|
|
|
#define DEFAULT_I2C_BUS_1_SCL 18
|
|
|
|
#define DEFAULT_I2C_BUS_2_SDA -1
|
|
|
|
#define DEFAULT_I2C_BUS_2_SCL -1
|
|
|
|
#define DEFAULT_I2C_BUS 1
|
|
|
|
#else
|
2022-02-13 11:45:58 +01:00
|
|
|
#define DEFAULT_I2C_BUS_1_SDA 21
|
|
|
|
#define DEFAULT_I2C_BUS_1_SCL 22
|
2022-08-13 20:52:20 +02:00
|
|
|
#define DEFAULT_I2C_BUS_2_SDA -1
|
|
|
|
#define DEFAULT_I2C_BUS_2_SCL -1
|
2022-02-13 11:45:58 +01:00
|
|
|
#define DEFAULT_I2C_BUS 1
|
2022-08-13 20:52:20 +02:00
|
|
|
#endif
|
|
|
|
#endif
|
2022-09-06 23:44:30 +02:00
|
|
|
#endif
|
2022-02-13 11:45:58 +01:00
|
|
|
|
|
|
|
// TSL2561 Defaults
|
|
|
|
#define DEFAULT_TSL2561_I2C_GAIN "auto"
|
|
|
|
|
2022-03-14 02:54:50 +01:00
|
|
|
#define DEFAULT_ARDUINO_OTA false
|
2021-09-22 02:51:54 +02:00
|
|
|
#define DEFAULT_AUTO_UPDATE false
|
2022-08-23 12:55:04 +02:00
|
|
|
|
|
|
|
#if defined M5STICK
|
|
|
|
|
|
|
|
#define DEFAULT_LED1_TYPE 1
|
|
|
|
#define DEFAULT_LED1_PIN 10
|
|
|
|
#define DEFAULT_LED1_CNTRL Control_Type_Status
|
|
|
|
#define DEFAULT_LED1_CNT 1
|
|
|
|
|
|
|
|
#define BUTTON 39
|
|
|
|
#define BUTTON_PRESSED 0
|
|
|
|
|
|
|
|
#define MAX_BRIGHTNESS 100
|
|
|
|
|
|
|
|
#elif defined M5ATOM
|
|
|
|
|
|
|
|
#define DEFAULT_LED1_TYPE 2
|
|
|
|
#define DEFAULT_LED1_PIN 27
|
|
|
|
#define DEFAULT_LED1_CNTRL Control_Type_Status
|
|
|
|
#define DEFAULT_LED1_CNT 25
|
|
|
|
|
|
|
|
#define BUTTON 39
|
|
|
|
#define BUTTON_PRESSED 0
|
|
|
|
|
|
|
|
#define MAX_BRIGHTNESS 50 // M5Atom Matrix has a lower max brightness so it doesn't melt
|
|
|
|
|
2022-08-23 22:51:46 +02:00
|
|
|
#elif defined MACCHINA_A0
|
|
|
|
|
|
|
|
#define DEFAULT_LED1_TYPE 2
|
|
|
|
#define DEFAULT_LED1_PIN 2
|
|
|
|
#define DEFAULT_LED1_CNTRL Control_Type_Status
|
|
|
|
#define DEFAULT_LED1_CNT 1
|
|
|
|
|
2023-07-16 19:37:48 +02:00
|
|
|
#define MAX_BRIGHTNESS 20
|
2022-08-23 22:51:46 +02:00
|
|
|
|
2022-08-23 12:55:04 +02:00
|
|
|
#else // DevKit / generic
|
|
|
|
|
|
|
|
#define DEFAULT_LED1_TYPE 0
|
|
|
|
#define DEFAULT_LED1_PIN 2
|
|
|
|
#define DEFAULT_LED1_CNTRL Control_Type_Status
|
|
|
|
#define DEFAULT_LED1_CNT 1
|
|
|
|
|
|
|
|
#define MAX_BRIGHTNESS 100
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|