mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 16:59:50 +03:00
1.5.7b
This commit is contained in:
@@ -1,48 +1,71 @@
|
||||
/*
|
||||
* my_config.h
|
||||
*
|
||||
* All configurations and customization's go here
|
||||
*
|
||||
* Paul Derbyshire - https://github.com/proddy/EMS-ESP-Boiler
|
||||
*
|
||||
* Paul Derbyshire - https://github.com/proddy/EMS-ESP
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// these are set as -D build flags during compilation
|
||||
// they can be set in platformio.ini or alternatively hard coded here
|
||||
#include "ems.h"
|
||||
|
||||
// WIFI settings
|
||||
//#define WIFI_SSID "<my_ssid>"
|
||||
//#define WIFI_PASSWORD "<my_password>"
|
||||
// MQTT base name
|
||||
#define MQTT_BASE "home" // all MQTT topics are prefix with this string, in the format <MQTT_BASE>/<app name>/<topic>
|
||||
|
||||
// MQTT settings
|
||||
// Note port is the default 1883
|
||||
//#define MQTT_IP "<broker_ip>"
|
||||
//#define MQTT_USER "<broker_username>"
|
||||
//#define MQTT_PASS "<broker_password>"
|
||||
// MQTT general settings
|
||||
#define MQTT_TOPIC_START "start"
|
||||
#define MQTT_TOPIC_START_PAYLOAD "start"
|
||||
#define MQTT_WILL_TOPIC "status" // for last will & testament topic name
|
||||
#define MQTT_WILL_ONLINE_PAYLOAD "online" // for last will & testament payload
|
||||
#define MQTT_WILL_OFFLINE_PAYLOAD "offline" // for last will & testament payload
|
||||
#define MQTT_RETAIN false
|
||||
#define MQTT_KEEPALIVE 120 // 2 minutes
|
||||
#define MQTT_QOS 1
|
||||
|
||||
// default values
|
||||
#define BOILER_THERMOSTAT_ENABLED 1 // thermostat support is enabled (1)
|
||||
#define BOILER_SHOWER_TIMER 1 // monitors how long a shower has taken
|
||||
#define BOILER_SHOWER_ALERT 0 // send alert if showetime exceeded
|
||||
// MQTT for thermostat
|
||||
#define TOPIC_THERMOSTAT_DATA "thermostat_data" // for sending thermostat values to MQTT
|
||||
#define TOPIC_THERMOSTAT_CMD_TEMP "thermostat_cmd_temp" // for received thermostat temp changes via MQTT
|
||||
#define TOPIC_THERMOSTAT_CMD_MODE "thermostat_cmd_mode" // for received thermostat mode changes via MQTT
|
||||
#define THERMOSTAT_CURRTEMP "thermostat_currtemp" // current temperature
|
||||
#define THERMOSTAT_SELTEMP "thermostat_seltemp" // selected temperature
|
||||
#define THERMOSTAT_MODE "thermostat_mode" // mode
|
||||
|
||||
// define here the Thermostat type. see ems.h for the supported types
|
||||
#define EMS_ID_THERMOSTAT EMS_ID_THERMOSTAT_RC20
|
||||
//#define EMS_ID_THERMOSTAT EMS_ID_THERMOSTAT_RC30
|
||||
//#define EMS_ID_THERMOSTAT EMS_ID_THERMOSTAT_EASY
|
||||
// MQTT for boiler
|
||||
#define TOPIC_BOILER_DATA "boiler_data" // for sending boiler values to MQTT
|
||||
#define TOPIC_BOILER_TAPWATER_ACTIVE "tapwater_active" // if hot tap water is running
|
||||
#define TOPIC_BOILER_HEATING_ACTIVE "heating_active" // if heating is on
|
||||
#define TOPIC_BOILER_WWACTIVATED "wwactivated" // for receiving MQTT message to change water on/off
|
||||
#define TOPIC_BOILER_CMD_WWTEMP "boiler_cmd_wwtemp" // for received boiler wwtemp changes via MQTT
|
||||
|
||||
// trigger settings to determine if hot tap water or the heating is active
|
||||
#define EMS_BOILER_BURNPOWER_TAPWATER 100
|
||||
#define EMS_BOILER_SELFLOWTEMP_HEATING 70
|
||||
// shower time
|
||||
#define TOPIC_SHOWERTIME "showertime" // for sending shower time results
|
||||
#define TOPIC_SHOWER_TIMER "shower_timer" // toggle switch for enabling the shower logic
|
||||
#define TOPIC_SHOWER_ALERT "shower_alert" // toggle switch for enabling the shower alarm logic
|
||||
#define TOPIC_SHOWER_COLDSHOT "shower_coldshot" // used to trigger a coldshot from an MQTT command
|
||||
|
||||
// if using the shower timer, change these settings
|
||||
#define SHOWER_PAUSE_TIME 15000 // in ms. 15 seconds, max time if water is switched off & on during a shower
|
||||
#define SHOWER_MIN_DURATION 120000 // in ms. 2 minutes, before recognizing its a shower
|
||||
#define SHOWER_MAX_DURATION 420000 // in ms. 7 minutes, before trigger a shot of cold water
|
||||
#define SHOWER_OFFSET_TIME 5000 // in ms. 5 seconds grace time, to calibrate actual time under the shower
|
||||
#define SHOWER_COLDSHOT_DURATION 10 // in seconds. 10 seconds for cold water before turning back hot water
|
||||
// default values for shower logic on/off
|
||||
#define BOILER_SHOWER_TIMER 1 // enable (1) to monitor shower time
|
||||
#define BOILER_SHOWER_ALERT 0 // enable (1) to send alert of cold water when shower time limit has exceeded
|
||||
#define SHOWER_MAX_DURATION 420000 // in ms. 7 minutes, before trigger a shot of cold water
|
||||
|
||||
// if using LEDs to show traffic, configure the GPIOs here
|
||||
// only works if -DUSE_LED is set in platformio.ini
|
||||
#define LED_RX D1 // GPIO5
|
||||
#define LED_TX D2 // GPIO4
|
||||
#define LED_ERR D3 // GPIO0
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// THESE DEFAULT VALUES CAN ALSO BE SET AND STORED WITHTIN THE APPLICATION (see 'set' command) //
|
||||
// ALTHOUGH YOU MAY ALSO HARDCODE THEM HERE BUT THEY WILL BE OVERWRITTEN WITH NEW RELEASE UPDATES //
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Set LED pin used for showing ems bus connection status. Solid is connected, Flashing is error
|
||||
// can be either the onboard LED on the ESP8266 (LED_BULLETIN) or external via an external pull-up LED
|
||||
// (e.g. D1 on a bbqkees' board
|
||||
// can be enabled and disabled via the 'set led'
|
||||
// pin can be set by 'set led_gpio'
|
||||
#define EMSESP_LED_GPIO LED_BUILTIN
|
||||
|
||||
// set this if using an external temperature sensor like a DS18B20
|
||||
// D5 is the default on bbqkees' board
|
||||
#define EMSESP_DALLAS_GPIO D5
|
||||
|
||||
// By default the EMS bus will be scanned for known devices based on product ids in ems_devices.h
|
||||
// You can override the Thermostat and Boiler types here
|
||||
#define EMSESP_BOILER_TYPE EMS_ID_NONE
|
||||
#define EMSESP_THERMOSTAT_TYPE EMS_ID_NONE
|
||||
|
||||
Reference in New Issue
Block a user