mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-12 03:04:27 +05:00
1. Migrate from microDS18B20 to DallasTemperature 2. Refactoring of sensors: added an external temperature sensor inside the house, added an "offset" parameter for sensors 3. Fixed PID 4. New parameters added: - settings.heating.minTemp - settings.heating.maxTemp - settings.dhw.minTemp - settings.dhw.maxTemp - settings.pid.minTemp - settings.pid.maxTemp - settings.sensors.outdoor.type - settings.sensors.outdoor.pin - settings.sensors.outdoor.offset - settings.sensors.indoor.type - settings.sensors.indoor.pin - settings.sensors.indoor.offset 5. Fixed and updated HomeAssistantHelper 7. Added check for validity of settings. After some updates, the settings may be reset to default, but this will prevent the settings from being distorted.
46 lines
1.7 KiB
C
46 lines
1.7 KiB
C
#define OT_GATEWAY_VERSION "1.3.0"
|
|
#define AP_SSID "OpenTherm Gateway"
|
|
#define AP_PASSWORD "otgateway123456"
|
|
#define USE_TELNET
|
|
|
|
#define EMERGENCY_TIME_TRESHOLD 120000
|
|
#define MQTT_RECONNECT_INTERVAL 5000
|
|
#define MQTT_KEEPALIVE 30
|
|
|
|
#define OPENTHERM_OFFLINE_TRESHOLD 10
|
|
|
|
#define EXT_SENSORS_INTERVAL 5000
|
|
#define EXT_SENSORS_FILTER_K 0.15
|
|
#define DS_CHECK_CRC true
|
|
#define DS_CRC_USE_TABLE true
|
|
|
|
#define LED_STATUS_PIN 13
|
|
#define LED_OT_RX_PIN 15
|
|
|
|
#define CONFIG_URL "http://%s/"
|
|
#define SETTINGS_VALID_VALUE "stvalid" // only 8 chars!
|
|
|
|
|
|
#ifdef USE_TELNET
|
|
#define INFO_STREAM TelnetStream
|
|
#define WARN_STREAM TelnetStream
|
|
#define ERROR_STREAM TelnetStream
|
|
#define DEBUG_STREAM if (settings.debug) TelnetStream
|
|
#define WM_DEBUG_PORT TelnetStream
|
|
#else
|
|
#define INFO_STREAM Serial
|
|
#define WARN_STREAM Serial
|
|
#define ERROR_STREAM Serial
|
|
#define DEBUG_STREAM if (settings.debug) Serial
|
|
#define WM_DEBUG_PORT Serial
|
|
#endif
|
|
|
|
#define INFO(...) INFO_STREAM.print("\r[INFO] "); INFO_STREAM.println(__VA_ARGS__);
|
|
#define INFO_F(...) INFO_STREAM.print("\r[INFO] "); INFO_STREAM.printf(__VA_ARGS__);
|
|
#define WARN(...) WARN_STREAM.print("\r[WARN] "); WARN_STREAM.println(__VA_ARGS__);
|
|
#define WARN_F(...) WARN_STREAM.print("\r[WARN] "); WARN_STREAM.printf(__VA_ARGS__);
|
|
#define ERROR(...) ERROR_STREAM.print("\r[ERROR] "); ERROR_STREAM.println(__VA_ARGS__);
|
|
#define DEBUG(...) DEBUG_STREAM.print("\r[DEBUG] "); DEBUG_STREAM.println(__VA_ARGS__);
|
|
#define DEBUG_F(...) DEBUG_STREAM.print("\r[DEBUG] "); DEBUG_STREAM.printf(__VA_ARGS__);
|
|
|
|
char buffer[120]; |