MySensors Library & Examples  2.3.2-8-gcaa95bd
MyConfig.h
Go to the documentation of this file.
1 /*
2  * The MySensors Arduino library handles the wireless radio link and protocol
3  * between your home built sensors/actuators and HA controller of choice.
4  * The sensors forms a self healing radio network with optional repeaters. Each
5  * repeater and gateway builds a routing tables in RAM or EEPROM which keeps track of the
6  * network topology allowing messages to be routed to nodes.
7  *
8  * Created by Henrik Ekblad <henrik.ekb[email protected]>
9  * Copyright (C) 2013-2020 Sensnology AB
10  * Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11  *
12  * Documentation: http://www.mysensors.org
13  * Support Forum: http://forum.mysensors.org
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * version 2 as published by the Free Software Foundation.
18  */
19 
28 #ifndef MyConfig_h
29 #define MyConfig_h
30 
48 //#define MY_DEBUG
49 
64 //#define MY_DEBUGDEVICE
65 
86 //#define MY_DEBUG_OTA (0)
87 
97 //#define MY_DEBUG_OTA_DISABLE_ECHO
98 #if defined(MY_DEBUG_OTA_DISABLE_ACK) && !defined(DOXYGEN)
99 #warning MY_DEBUG_OTA_DISABLE_ACK is deprecated, please use MY_DEBUG_OTA_DISABLE_ECHO instead
100 #define MY_DEBUG_OTA_DISABLE_ECHO
101 #endif
102 
110 //#define MY_OTA_LOG_RECEIVER_FEATURE
111 
119 //#define MY_OTA_LOG_SENDER_FEATURE
120 
134 //#define MY_SPECIAL_DEBUG
135 
143 //#define MY_DISABLED_SERIAL
144 
152 //#define MY_SPLASH_SCREEN_DISABLED
153 
162 #ifndef MY_BAUD_RATE
163 #define MY_BAUD_RATE (115200ul)
164 #endif
165 
172 #ifndef MY_SERIAL_OUTPUT_SIZE
173 #define MY_SERIAL_OUTPUT_SIZE (120u)
174 #endif
175  // End of SerialDebugGrpPub group
176 
181 //#define MY_DEBUG_VERBOSE_OTA_UPDATE
182 
190 //#define MY_OTA_USE_I2C_EEPROM
191 
192 #ifdef MY_OTA_USE_I2C_EEPROM
193 // I2C address of EEPROM. Wire will shift this left, i.e. 0x50->0xA0
194 #ifndef MY_OTA_I2C_ADDR
195 #define MY_OTA_I2C_ADDR 0x50
196 #endif
197 #endif
198 
199 
219 //#define MY_RS485
220 
225 #ifndef MY_RS485_BAUD_RATE
226 #define MY_RS485_BAUD_RATE (9600)
227 #endif
228 
233 #ifndef MY_RS485_MAX_MESSAGE_LENGTH
234 #define MY_RS485_MAX_MESSAGE_LENGTH (40)
235 #endif
236 
241 #ifndef MY_RS485_SOH_COUNT
242 #define MY_RS485_SOH_COUNT (1)
243 #endif
244 
245 
250 //#define MY_RS485_DE_PIN (2)
251 
256 //#define MY_RS485_DE_INVERSE
257 
264 //#define MY_RS485_HWSERIAL (Serial1) // End of RS485SettingGrpPub group
266 
287 // legacy - remove for 3.0.0
293 #ifdef MY_RADIO_NRF24
294 #warning MY_RADIO_NRF24 is deprecated, use MY_RADIO_RF24 instead.
295 #undef MY_RADIO_NRF24
296 #define MY_RADIO_RF24
297 #endif
298 
303 //#define MY_RADIO_RF24
304 
315 //#define MY_RF24_ENABLE_ENCRYPTION
316 
321 //#define MY_DEBUG_VERBOSE_RF24
322 
329 #ifndef MY_RF24_SPI_SPEED
330 #define MY_RF24_SPI_SPEED (2*1000000ul)
331 #endif
332 
337 #ifndef MY_RF24_CE_PIN
338 #define MY_RF24_CE_PIN (DEFAULT_RF24_CE_PIN)
339 #endif
340 
345 #ifndef MY_RF24_CS_PIN
346 #define MY_RF24_CS_PIN (DEFAULT_RF24_CS_PIN)
347 #endif
348 
353 //#define MY_RF24_IRQ_PIN (2)
354 
359 //#define MY_RF24_POWER_PIN (3)
360 
372 //#define MY_RX_MESSAGE_BUFFER_FEATURE
373 
380 #ifdef MY_RX_MESSAGE_BUFFER_FEATURE
381 #ifndef MY_RX_MESSAGE_BUFFER_SIZE
382 #define MY_RX_MESSAGE_BUFFER_SIZE (20)
383 #endif
384 #endif
385 
395 #ifndef MY_RF24_PA_LEVEL
396 #define MY_RF24_PA_LEVEL (RF24_PA_HIGH)
397 #endif
398 
419 #ifndef MY_RF24_CHANNEL
420 #define MY_RF24_CHANNEL (76)
421 #endif
422 
434 #ifndef MY_RF24_DATARATE
435 #define MY_RF24_DATARATE (RF24_250KBPS)
436 #endif
437 
445 #ifndef MY_RF24_BASE_RADIO_ID
446 #define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8
447 #endif
448 
453 #ifndef MY_RF24_ADDR_WIDTH
454 #define MY_RF24_ADDR_WIDTH (5)
455 #endif
456  // End of RF24SettingGrpPub group
457 
479 //#define MY_RADIO_NRF5_ESB
480 
491 //#define MY_NRF5_ESB_ENABLE_ENCRYPTION
492 
497 //#define MY_DEBUG_VERBOSE_NRF5_ESB
498 
508 #ifndef MY_NRF5_ESB_PA_LEVEL
509 #define MY_NRF5_ESB_PA_LEVEL (NRF5_PA_MAX)
510 #endif
511 
532 #ifndef MY_NRF5_ESB_CHANNEL
533 #define MY_NRF5_ESB_CHANNEL (76)
534 #endif
535 
545 #ifndef MY_NRF5_ESB_MODE
546 #define MY_NRF5_ESB_MODE (NRF5_250KBPS)
547 #endif
548 
556 #ifndef MY_NRF5_ESB_BASE_RADIO_ID
557 #define MY_NRF5_ESB_BASE_RADIO_ID 0x00, 0xFC, 0xE1, 0xA8, 0xA8
558 #endif
559 
564 #ifndef MY_NRF5_ESB_ADDR_WIDTH
565 #define MY_NRF5_ESB_ADDR_WIDTH (5)
566 #endif
567 
572 #ifndef MY_NRF5_ESB_RX_BUFFER_SIZE
573 #define MY_NRF5_ESB_RX_BUFFER_SIZE (20)
574 #endif
575 
580 //#define MY_NRF5_ESB_REVERSE_ACK_TX
581 
586 //#define MY_NRF5_ESB_REVERSE_ACK_RX // End of NRF5SettingGrpPub group
588 
605 //#define MY_RADIO_RFM69
606 
611 //#define MY_DEBUG_VERBOSE_RFM69
612 
617 //#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
618 
625 //#define MY_RFM69_NEW_DRIVER
626 
642 #ifndef MY_RFM69_FREQUENCY
643 #define MY_RFM69_FREQUENCY (RFM69_868MHZ)
644 #endif
645 
650 //#define MY_IS_RFM69HW
651 
658 #ifdef MY_IS_RFM69HW
659 #define MY_RFM69HW true
660 #else
661 #define MY_RFM69HW false
662 #endif
663 
668 #ifndef MY_RFM69_TX_POWER_DBM
669 #define MY_RFM69_TX_POWER_DBM (5)
670 #endif
671 
676 #ifndef MY_RFM69_ATC_TARGET_RSSI_DBM
677 #define MY_RFM69_ATC_TARGET_RSSI_DBM (-80)
678 #endif
679 
684 //#define MY_RFM69_ATC_MODE_DISABLED
685 
697 //#define MY_RFM69_MAX_POWER_LEVEL_DBM (10u)
698 
703 #ifndef MY_RFM69_NETWORKID
704 #define MY_RFM69_NETWORKID (100)
705 #endif
706 
711 //#define MY_RFM69_RST_PIN (9)
712 
713 #ifdef MY_RF69_RESET
714 #warning MY_RF69_RESET is depreciated, please use MY_RFM69_RST_PIN instead.
715 #define MY_RFM69_RST_PIN MY_RF69_RESET
716 #endif
717 
722 //#define MY_RFM69_POWER_PIN (3)
723 
728 #ifndef MY_RFM69_IRQ_PIN
729 #ifdef MY_RF69_IRQ_PIN
730 #warning MY_RF69_IRQ_PIN is depreciated, please use MY_RFM69_IRQ_PIN instead.
731 #define MY_RFM69_IRQ_PIN MY_RF69_IRQ_PIN
732 #else
733 #define MY_RFM69_IRQ_PIN DEFAULT_RFM69_IRQ_PIN
734 #endif
735 #endif
736 
741 #ifndef MY_RFM69_IRQ_NUM
742 #ifdef MY_RF69_IRQ_NUM
743 #warning MY_RF69_IRQ_NUM is depreciated, please use MY_RFM69_IRQ_NUM instead.
744 #define MY_RFM69_IRQ_NUM MY_RF69_IRQ_NUM
745 #else
746 #define MY_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN)
747 #endif
748 #endif
749 
754 #ifndef MY_RFM69_CS_PIN
755 #ifdef MY_RF69_SPI_CS
756 #warning MY_RF69_SPI_CS is depreciated, please use MY_RFM69_CS_PIN instead.
757 #define MY_RFM69_CS_PIN MY_RF69_SPI_CS
758 #else
759 #define MY_RFM69_CS_PIN DEFAULT_RFM69_CS_PIN
760 #endif
761 #endif
762 
767 #ifndef MY_RFM69_SPI_SPEED
768 #define MY_RFM69_SPI_SPEED (4*1000000ul) // datasheet says 10Mhz max.
769 #endif
770 
779 //#define MY_RFM69_ENABLE_ENCRYPTION
780 
801 //#define MY_RFM69_MODEM_CONFIGURATION (RFM69_FSK_BR55_5_FD50)
802 
803  // End of RFM69SettingGrpPub group
805 
820 //#define MY_RADIO_RFM95
821 
826 //#define MY_DEBUG_VERBOSE_RFM95
827 
838 //#define MY_RFM95_ENABLE_ENCRYPTION
839 
854 #ifndef MY_RFM95_FREQUENCY
855 #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
856 #endif
857 
874 #ifndef MY_RFM95_MODEM_CONFIGRUATION
875 #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
876 #endif
877 
882 //#define MY_RFM95_RST_PIN (9)
883 
888 //#define MY_RFM95_POWER_PIN (3)
889 
894 #ifndef MY_RFM95_IRQ_PIN
895 #define MY_RFM95_IRQ_PIN DEFAULT_RFM95_IRQ_PIN
896 #endif
897 
902 #ifndef MY_RFM95_IRQ_NUM
903 #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(MY_RFM95_IRQ_PIN)
904 #endif
905 
910 #ifndef MY_RFM95_CS_PIN
911 #define MY_RFM95_CS_PIN DEFAULT_RFM95_CS_PIN
912 #endif
913 
918 #ifndef MY_RFM95_SPI_SPEED
919 #define MY_RFM95_SPI_SPEED (4*1000000ul)
920 #endif
921 
928 #ifndef MY_RFM95_TX_POWER_DBM
929 #define MY_RFM95_TX_POWER_DBM (13u) // 20mW
930 #endif
931 
936 //#define MY_RFM95_ATC_MODE_DISABLED
937 
942 #ifndef MY_RFM95_ATC_TARGET_RSSI
943 #define MY_RFM95_ATC_TARGET_RSSI (-70)
944 #endif
945 
957 //#define MY_RFM95_MAX_POWER_LEVEL_DBM (10u)
958 
965 //#define MY_RFM95_TCXO // End of RFM95SettingGrpPub group
967 
985 //#define MY_SOFTSPI
986 
991 #ifndef MY_SOFT_SPI_SCK_PIN
992 #define MY_SOFT_SPI_SCK_PIN (14)
993 #endif
994 
999 #ifndef MY_SOFT_SPI_MISO_PIN
1000 #define MY_SOFT_SPI_MISO_PIN (16)
1001 #endif
1002 
1007 #ifndef MY_SOFT_SPI_MOSI_PIN
1008 #define MY_SOFT_SPI_MOSI_PIN (15)
1009 #endif
1010  // End of SoftSpiSettingGrpPub group
1011  // End of TransportSettingGrpPub group
1013 
1034 #ifndef MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
1035 #define MY_RAM_ROUTING_TABLE_FEATURE
1036 #endif
1037 
1042 #ifndef MY_ROUTING_TABLE_SAVE_INTERVAL_MS
1043 #define MY_ROUTING_TABLE_SAVE_INTERVAL_MS (30*60*1000ul)
1044 #endif
1045 
1052 //#define MY_REPEATER_FEATURE
1053 
1063 //#define MY_PASSIVE_NODE
1064 
1069 #ifndef MY_NODE_ID
1070 #define MY_NODE_ID (AUTO)
1071 #endif
1072 
1077 #ifndef MY_PARENT_NODE_ID
1078 #define MY_PARENT_NODE_ID (AUTO)
1079 #endif
1080 
1085 //#define MY_PARENT_NODE_IS_STATIC
1086 
1093 //#define MY_TRANSPORT_SANITY_CHECK
1094 
1099 #ifndef MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS
1100 #define MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS (15*60*1000ul)
1101 #endif
1102 
1106 #ifndef MY_TRANSPORT_DISCOVERY_INTERVAL_MS
1107 #define MY_TRANSPORT_DISCOVERY_INTERVAL_MS (20*60*1000ul)
1108 #endif
1109 
1114 //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
1115 
1120 //#define MY_TRANSPORT_MAX_TX_FAILURES (10u)
1121 
1126 #ifndef MY_TRANSPORT_WAIT_READY_MS
1127 #define MY_TRANSPORT_WAIT_READY_MS (0)
1128 #endif
1129 
1135 //#define MY_SIGNAL_REPORT_ENABLED
1136  // End of RoutingNodeSettingGrpPub group
1138 
1151 #define MY_REGISTRATION_FEATURE
1152 
1158 #ifndef MY_REGISTRATION_RETRIES
1159 #define MY_REGISTRATION_RETRIES (3u)
1160 #endif
1161 
1167 #define MY_REGISTRATION_DEFAULT (true)
1168 
1173 //#define MY_REGISTRATION_CONTROLLER // End of RegistrationSettingGrpPub group
1175 
1186 //#define MY_CORE_ONLY
1187 
1193 #define MY_CORE_COMPATIBILITY_CHECK
1194  // End of CoreSettingGrpPub group
1195 
1206 #ifndef MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS
1207 #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS (10*1000ul)
1208 #endif
1209 
1217 #ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
1218 #define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
1219 #endif
1220  // End of SleepSettingGrpPub group
1221 
1237 //#define MY_OTA_FIRMWARE_FEATURE
1238 
1243 #ifndef MY_OTA_FLASH_SS
1244 #define MY_OTA_FLASH_SS (8)
1245 #endif
1246 
1251 #ifndef MY_OTA_FLASH_JDECID
1252 #define MY_OTA_FLASH_JDECID (0x1F65)
1253 #endif
1254 
1259 //#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1261 
1272 #ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1273 #define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1274 #endif
1275 
1280 #ifndef MY_GATEWAY_MAX_SEND_LENGTH
1281 #define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1282 #endif
1283 
1288 #ifndef MY_GATEWAY_MAX_CLIENTS
1289 #define MY_GATEWAY_MAX_CLIENTS (1u)
1290 #endif
1291 
1296 //#define MY_INCLUSION_MODE_FEATURE
1297 
1304 //#define MY_INCLUSION_BUTTON_FEATURE
1305 
1306 // Disable inclusion mode button if inclusion mode feature is not enabled
1307 #ifndef MY_INCLUSION_MODE_FEATURE
1308 #undef MY_INCLUSION_BUTTON_FEATURE
1309 #endif
1310 
1318 //#define MY_INCLUSION_LED_PIN (7)
1319 
1324 #ifndef MY_INCLUSION_MODE_BUTTON_PIN
1325 #if defined(ARDUINO_ARCH_ESP8266)
1326 #define MY_INCLUSION_MODE_BUTTON_PIN (5)
1327 #else
1328 #define MY_INCLUSION_MODE_BUTTON_PIN (3)
1329 #endif
1330 #endif
1331 
1336 #ifndef MY_INCLUSION_MODE_DURATION
1337 #define MY_INCLUSION_MODE_DURATION (60)
1338 #endif
1339 
1350 #if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1351 #define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1352 #else
1353 #define MY_INCLUSION_BUTTON_PRESSED (LOW)
1354 #endif
1355 
1356 
1357 /**************************************
1358 * Ethernet Gateway Transport Defaults
1359 ***************************************/
1378 // The gateway options available
1379 //#define MY_GATEWAY_W5100
1380 //#define MY_GATEWAY_ENC28J60
1381 //#define MY_GATEWAY_ESP8266
1382 //#define MY_GATEWAY_ESP32
1383 //#define MY_GATEWAY_LINUX
1384 //#define MY_GATEWAY_TINYGSM
1385 //#define MY_GATEWAY_MQTT_CLIENT
1386 //#define MY_GATEWAY_SERIAL
1387 
1388 
1393 //#define MY_DEBUG_VERBOSE_GATEWAY
1394 
1399 //#define MY_WIFI_SSID "MySSID"
1400 
1405 #ifndef MY_WIFI_BSSID
1406 #define MY_WIFI_BSSID NULL
1407 #endif
1408 
1413 //#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1414 
1419 #ifndef MY_HOSTNAME
1420 #define MY_HOSTNAME "MYSENSORS_DEVICE"
1421 #endif
1422 
1427 #ifndef MY_PORT
1428 #ifdef MY_GATEWAY_MQTT_CLIENT
1429 #define MY_PORT 1883
1430 #else
1431 #define MY_PORT 5003
1432 #endif
1433 #endif
1434 
1439 //#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1440 
1449 //#define MY_MQTT_PASSWORD "secretpassword"
1450 
1459 //#define MY_MQTT_USER "username"
1460 
1468 //#define MY_MQTT_CLIENT_ID "mysensors-1"
1469 
1477 //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1478 
1486 //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1487 
1505 //#define MY_MQTT_CA_CERT
1506 
1524 //#define MY_MQTT_CLIENT_CERT
1525 
1543 //#define MY_MQTT_CLIENT_KEY
1544 
1551 //#define MY_IP_ADDRESS 192,168,178,66
1552 
1559 //#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
1560 
1567 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
1568 
1574 //#define MY_USE_UDP
1575 
1580 #ifndef MY_IP_RENEWAL_INTERVAL_MS
1581 #define MY_IP_RENEWAL_INTERVAL_MS (60*1000ul)
1582 #endif
1583 
1589 #ifndef MY_MAC_ADDRESS
1590 #define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
1591 #endif
1592 
1603 //#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
1604 
1615 //#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
1616  // End of GatewaySettingGrpPub group
1618 
1629 //#define MY_GSM_APN
1634 //#define MY_GSM_BAUDRATE (9600u)
1639 //#define MY_GSM_PIN
1644 //#define MY_GSM_PSW
1649 //#define MY_GSM_RX
1654 //#define MY_GSM_SSID
1659 //#define MY_GSM_TX
1664 //#define MY_GSM_USR
1665  // End of GSMSettingGrpPub group
1667 
1682 //#define MY_DEFAULT_ERR_LED_PIN (6)
1683 
1692 //#define MY_DEFAULT_TX_LED_PIN (7)
1693 
1702 //#define MY_DEFAULT_RX_LED_PIN (8)
1703 
1710 //#define MY_WITH_LEDS_BLINKING_INVERSE
1711 
1716 //#define MY_INDICATION_HANDLER
1717 
1722 #ifndef MY_DEFAULT_LED_BLINK_PERIOD
1723 #define MY_DEFAULT_LED_BLINK_PERIOD 300
1724 #endif
1725  // End of LEDSettingGrpPub group
1726 
1767 //#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
1768 #if defined(MY_SECURITY_SIMPLE_PASSWD)
1769 #define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1770 #define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1771 #endif
1772 
1785 //#define MY_DEBUG_VERBOSE_SIGNING
1786 
1816 //#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
1817 #if defined(MY_SIGNING_SIMPLE_PASSWD)
1818 #define MY_SIGNING_SOFT
1819 #define MY_SIGNING_REQUEST_SIGNATURES
1820 #endif
1821 
1826 //#define MY_SIGNING_ATSHA204
1827 
1832 //#define MY_SIGNING_SOFT
1833 
1842 //#define MY_SIGNING_REQUEST_SIGNATURES
1843 
1860 //#define MY_SIGNING_WEAK_SECURITY
1861 
1873 #ifndef MY_VERIFICATION_TIMEOUT_MS
1874 #define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
1875 #endif
1876 
1893 //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
1894 
1899 #ifndef MY_SIGNING_ATSHA204_PIN
1900 #define MY_SIGNING_ATSHA204_PIN (17)
1901 #endif
1902 
1909 #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
1910 #define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
1911 #endif
1912 
1928 //#define MY_LOCK_DEVICE
1929 
1935 #if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
1936 #define MY_SIGNING_FEATURE
1937 #endif
1938  // End of SigningSettingGrpPub group
1939 
1968 //#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
1969 #if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
1970 #ifndef MY_RF24_ENABLE_ENCRYPTION
1971 #define MY_RF24_ENABLE_ENCRYPTION
1972 #endif
1973 #ifndef MY_RFM69_ENABLE_ENCRYPTION
1974 #define MY_RFM69_ENABLE_ENCRYPTION
1975 #endif
1976 #ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
1977 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
1978 #endif
1979 #ifndef MY_RFM95_ENABLE_ENCRYPTION
1980 #define MY_RFM95_ENABLE_ENCRYPTION
1981 #endif
1982 #endif
1983 
1990 #if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
1991 #define MY_ENCRYPTION_FEATURE
1992 #endif
1993  // End of EncryptionSettingGrpPub group
1994 
2034 //#define MY_NODE_LOCK_FEATURE
2035 
2044 #ifndef MY_NODE_UNLOCK_PIN
2045 #define MY_NODE_UNLOCK_PIN (14)
2046 #endif
2047 
2054 #ifndef MY_NODE_LOCK_COUNTER_MAX
2055 #define MY_NODE_LOCK_COUNTER_MAX (5)
2056 #endif
2057  // Node lock group // End of SecuritySettingGrpPub group
2059 
2080 #ifndef MY_ESP8266_SERIAL_MODE
2081 #define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2082 #endif
2083  // End of ESP8266SettingGrpPub group
2084 
2092 //
2093 // no ESP32 settings
2094 //
2095  // End of ESP32SettingGrpPub group
2097 
2109 //#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2110 
2115 #ifdef MY_LINUX_SERIAL_PTY
2116 #warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2117 #define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2118 #endif
2119 
2124 #ifdef MY_LINUX_IS_SERIAL_PTY
2125 #warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2126 #define MY_LINUX_SERIAL_IS_PTY
2127 #endif
2128 
2136 //#define MY_LINUX_SERIAL_IS_PTY
2137 
2142 //#define MY_LINUX_SERIAL_GROUPNAME "tty"
2143 
2150 #ifndef MY_LINUX_CONFIG_FILE
2151 #define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2152 #endif
2153  // End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2155 
2156 /*
2157 * "Helper" definitions
2158 */
2159 
2160 /*
2161  * Detect node type
2162  * MY_GATEWAY_FEATURE is set for gateway sketches.
2163  * MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2164  * MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2165  */
2166 #if defined(MY_GATEWAY_SERIAL) || defined(MY_GATEWAY_W5100) || defined(MY_GATEWAY_ENC28J60) || defined(MY_GATEWAY_ESP8266) || defined(MY_GATEWAY_ESP32)|| defined(MY_GATEWAY_LINUX) || defined(MY_GATEWAY_MQTT_CLIENT) || defined(MY_GATEWAY_TINYGSM)
2167 #define MY_GATEWAY_FEATURE
2168 #define MY_IS_GATEWAY (true)
2169 #define MY_NODE_TYPE "GW"
2170 #elif defined(MY_REPEATER_FEATURE)
2171 #define MY_IS_GATEWAY (false)
2172 #define MY_NODE_TYPE "REPEATER"
2173 #elif defined(DOXYGEN)
2174 #define MY_IS_GATEWAY
2175 #define MY_NODE_TYPE
2176 #else
2177 #define MY_IS_GATEWAY (false)
2178 #define MY_NODE_TYPE "NODE"
2179 #endif
2180 
2181 // DEBUG
2182 #if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2183 #undef MY_DEBUG
2184 #endif
2185 #if defined(MY_DEBUG)
2186 // standard debug output
2187 #define MY_DEBUG_VERBOSE_CORE
2188 #define MY_DEBUG_VERBOSE_TRANSPORT
2189 #define MY_DEBUG_VERBOSE_GATEWAY
2190 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2191 #endif
2192 
2193 #if defined(MY_DEBUG) || defined(MY_DEBUG_VERBOSE_CORE) || defined(MY_DEBUG_VERBOSE_TRANSPORT) || defined(MY_DEBUG_VERBOSE_GATEWAY) || defined(MY_DEBUG_VERBOSE_SIGNING) || defined(MY_DEBUG_VERBOSE_OTA_UPDATE) || defined(MY_DEBUG_VERBOSE_RF24) || defined(MY_DEBUG_VERBOSE_NRF5_ESB) || defined(MY_DEBUG_VERBOSE_RFM69) || defined(MY_DEBUG_VERBOSE_RFM95) || defined(MY_DEBUG_VERBOSE_TRANSPORT_HAL)
2194 #define DEBUG_OUTPUT_ENABLED
2195 #ifndef MY_DEBUG_OTA
2196 #define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2197 #else
2198 #ifndef MY_OTA_LOG_SENDER_FEATURE
2199 #define MY_OTA_LOG_SENDER_FEATURE
2200 #endif
2201 #ifndef MY_DEBUG_OTA_DISABLE_ECHO
2202 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2203 #else
2204 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2205 #endif
2206 // disable radio related debugging messages
2207 #undef MY_DEBUG_VERBOSE_RF24
2208 #undef MY_DEBUG_VERBOSE_NRF5_ESB
2209 #undef MY_DEBUG_VERBOSE_RFM69
2210 #undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2211 #undef MY_DEBUG_VERBOSE_RFM95
2212 #endif
2213 #else
2214 #define DEBUG_OUTPUT(x,...)
2215 #endif
2216 
2217 // temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2218 #if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2219 #undef MY_RADIO_RF24
2220 #define MY_RADIO_NRF5_ESB
2221 #endif
2222 
2223 // Enable sensor network "feature" if one of the transport types was enabled
2224 #if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RS485)
2225 #define MY_SENSOR_NETWORK
2226 #endif
2227 
2228 // LEDS
2229 #if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2230 #define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2231 #endif
2232 
2233 #if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2234 #define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2235 #endif
2236 
2237 #if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2238 #define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2239 #endif
2240 
2241 #endif // MyConfig_h
2242 
2243 // Doxygen specific constructs, not included when built normally
2244 // This is used to enable disabled macros/definitions to be included in the documentation as well.
2245 #if DOXYGEN
2246 
2250 #define ARDUINO_ARCH_SAMD
2251 
2256 #define ARDUINO_ARCH_NRF5
2257 
2262 #define ARDUINO_ARCH_ESP8266
2263 
2268 #define ARDUINO_ARCH_ESP32
2269 
2274 #define ARDUINO_ARCH_AVR
2275 
2280 #define ARDUINO_ARCH_STM32F1
2281 
2286 #define TEENSYDUINO
2287 
2288 // debug
2289 #define MY_DEBUG
2290 #define MY_DEBUGDEVICE
2291 #define MY_DEBUG_OTA
2292 #define MY_DEBUG_OTA_DISABLE_ECHO
2293 #define MY_SPECIAL_DEBUG
2294 #define MY_DISABLED_SERIAL
2295 #define MY_SPLASH_SCREEN_DISABLED
2296 // linux
2297 #define MY_LINUX_SERIAL_PORT
2298 #define MY_LINUX_SERIAL_IS_PTY
2299 #define MY_LINUX_SERIAL_GROUPNAME
2300 #define MY_LINUX_SERIAL_PTY
2301 #define MY_LINUX_IS_SERIAL_PTY
2302 // inclusion mode
2303 #define MY_INCLUSION_MODE_FEATURE
2304 #define MY_INCLUSION_BUTTON_FEATURE
2305 // OTA logging and debug
2306 #define MY_OTA_LOG_RECEIVER_FEATURE
2307 #define MY_OTA_LOG_SENDER_FEATURE
2308 // transport
2309 #define MY_PARENT_NODE_IS_STATIC
2310 #define MY_REGISTRATION_CONTROLLER
2311 #define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2312 #define MY_TRANSPORT_SANITY_CHECK
2313 #define MY_NODE_LOCK_FEATURE
2314 #define MY_REPEATER_FEATURE
2315 #define MY_PASSIVE_NODE
2316 #define MY_MQTT_CLIENT_PUBLISH_RETAIN
2317 #define MY_MQTT_PASSWORD
2318 #define MY_MQTT_USER
2319 #define MY_MQTT_CLIENT_ID
2320 #define MY_MQTT_PUBLISH_TOPIC_PREFIX
2321 #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2322 #define MY_MQTT_CA_CERT
2323 #define MY_MQTT_CLIENT_CERT
2324 #define MY_MQTT_CLIENT_KEY
2325 #define MY_SIGNAL_REPORT_ENABLED
2326 // general
2327 #define MY_WITH_LEDS_BLINKING_INVERSE
2328 #define MY_INDICATION_HANDLER
2329 #define MY_DISABLE_REMOTE_RESET
2330 #define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2331 #define MY_LOCK_DEVICE
2332 // core
2333 #define MY_CORE_ONLY
2334 // GW
2335 #define MY_DEBUG_VERBOSE_GATEWAY
2336 #define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2337 #define MY_INCLUSION_LED_PIN
2338 #define MY_GATEWAY_W5100
2339 #define MY_GATEWAY_ENC28J60
2340 #define MY_GATEWAY_ESP8266
2341 #define MY_GATEWAY_ESP32
2342 #define MY_WIFI_SSID
2343 #define MY_WIFI_BSSID
2344 #define MY_WIFI_PASSWORD
2345 #define MY_HOSTNAME
2346 #define MY_GATEWAY_LINUX
2347 #define MY_GATEWAY_TINYGSM
2348 #define MY_GATEWAY_MQTT_CLIENT
2349 #define MY_GATEWAY_SERIAL
2350 #define MY_IP_ADDRESS
2351 #define MY_IP_GATEWAY_ADDRESS
2352 #define MY_IP_SUBNET_ADDRESS
2353 #define MY_USE_UDP
2354 #define MY_CONTROLLER_IP_ADDRESS
2355 #define MY_CONTROLLER_URL_ADDRESS
2356 // TinyGSM
2357 #define MY_GSM_APN
2358 #define MY_GSM_BAUDRATE
2359 #define MY_GSM_PIN
2360 #define MY_GSM_PSW
2361 #define MY_GSM_RX
2362 #define MY_GSM_SSID
2363 #define MY_GSM_TX
2364 #define MY_GSM_USR
2365 // LED
2366 #define MY_DEFAULT_ERR_LED_PIN
2367 #define MY_DEFAULT_TX_LED_PIN
2368 #define MY_DEFAULT_RX_LED_PIN
2369 // signing
2370 #define MY_SECURITY_SIMPLE_PASSWD
2371 #define MY_SIGNING_SIMPLE_PASSWD
2372 #define MY_ENCRYPTION_SIMPLE_PASSWD
2373 #define MY_SIGNING_ATSHA204
2374 #define MY_SIGNING_SOFT
2375 #define MY_SIGNING_REQUEST_SIGNATURES
2376 #define MY_SIGNING_WEAK_SECURITY
2377 #define MY_SIGNING_NODE_WHITELISTING
2378 #define MY_DEBUG_VERBOSE_SIGNING
2379 #define MY_SIGNING_FEATURE
2380 #define MY_ENCRYPTION_FEATURE
2381 // FOTA update
2382 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2383 #define MY_OTA_USE_I2C_EEPROM
2384 // RS485
2385 #define MY_RS485
2386 #define MY_RS485_DE_PIN
2387 #define MY_RS485_DE_INVERSE
2388 #define MY_RS485_HWSERIAL
2389 // RF24
2390 #define MY_RADIO_RF24
2391 #define MY_RADIO_NRF24 //deprecated
2392 #define MY_DEBUG_VERBOSE_RF24
2393 #define MY_RF24_POWER_PIN
2394 #define MY_RF24_IRQ_PIN
2395 #define MY_RF24_ENABLE_ENCRYPTION
2396 #define MY_RX_MESSAGE_BUFFER_FEATURE
2397 #define MY_RX_MESSAGE_BUFFER_SIZE
2398 // NRF5_ESB
2399 #define MY_RADIO_NRF5_ESB
2400 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2401 #define MY_DEBUG_VERBOSE_NRF5_ESB
2402 #define MY_NRF5_ESB_REVERSE_ACK_RX
2403 #define MY_NRF5_ESB_REVERSE_ACK_TX
2404 // RFM69
2405 #define MY_RADIO_RFM69
2406 #define MY_IS_RFM69HW
2407 #define MY_RFM69_NEW_DRIVER
2408 #define MY_RFM69_POWER_PIN
2409 #define MY_RFM69_MODEM_CONFIGURATION
2410 #define MY_RFM69_ENABLE_ENCRYPTION
2411 #define MY_RFM69_ATC_MODE_DISABLED
2412 #define MY_RFM69_MAX_POWER_LEVEL_DBM
2413 #define MY_RFM69_RST_PIN
2414 #define MY_DEBUG_VERBOSE_RFM69
2415 #define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2416 // RFM95
2417 #define MY_RADIO_RFM95
2418 #define MY_DEBUG_VERBOSE_RFM95
2419 #define MY_RFM95_ENABLE_ENCRYPTION
2420 #define MY_RFM95_ATC_MODE_DISABLED
2421 #define MY_RFM95_RST_PIN
2422 #define MY_RFM95_MODEM_CONFIGRUATION
2423 #define MY_RFM95_POWER_PIN
2424 #define MY_RFM95_TCXO
2425 #define MY_RFM95_MAX_POWER_LEVEL_DBM
2426 // SOFT-SPI
2427 #define MY_SOFTSPI
2428 #endif
2429  // End of MyConfig group