MySensors Library & Examples  2.3.2-27-g01d8d10
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.ek[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 
1229 //#define MY_SLEEP_HANDLER // End of SleepSettingGrpPub group
1231 
1247 //#define MY_OTA_FIRMWARE_FEATURE
1248 
1253 #ifndef MY_OTA_FLASH_SS
1254 #define MY_OTA_FLASH_SS (8)
1255 #endif
1256 
1261 #ifndef MY_OTA_FLASH_JDECID
1262 #define MY_OTA_FLASH_JDECID (0x1F65)
1263 #endif
1264 
1269 //#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1271 
1282 #ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1283 #define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1284 #endif
1285 
1290 #ifndef MY_GATEWAY_MAX_SEND_LENGTH
1291 #define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1292 #endif
1293 
1298 #ifndef MY_GATEWAY_MAX_CLIENTS
1299 #define MY_GATEWAY_MAX_CLIENTS (1u)
1300 #endif
1301 
1306 //#define MY_INCLUSION_MODE_FEATURE
1307 
1314 //#define MY_INCLUSION_BUTTON_FEATURE
1315 
1316 // Disable inclusion mode button if inclusion mode feature is not enabled
1317 #ifndef MY_INCLUSION_MODE_FEATURE
1318 #undef MY_INCLUSION_BUTTON_FEATURE
1319 #endif
1320 
1328 //#define MY_INCLUSION_LED_PIN (7)
1329 
1334 #ifndef MY_INCLUSION_MODE_BUTTON_PIN
1335 #if defined(ARDUINO_ARCH_ESP8266)
1336 #define MY_INCLUSION_MODE_BUTTON_PIN (5)
1337 #else
1338 #define MY_INCLUSION_MODE_BUTTON_PIN (3)
1339 #endif
1340 #endif
1341 
1346 #ifndef MY_INCLUSION_MODE_DURATION
1347 #define MY_INCLUSION_MODE_DURATION (60)
1348 #endif
1349 
1360 #if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1361 #define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1362 #else
1363 #define MY_INCLUSION_BUTTON_PRESSED (LOW)
1364 #endif
1365 
1366 /**************************************
1367 * Ethernet Gateway Transport Defaults
1368 ***************************************/
1387 // The gateway options available
1388 //#define MY_GATEWAY_W5100
1389 //#define MY_GATEWAY_ENC28J60
1390 //#define MY_GATEWAY_ESP8266
1391 //#define MY_GATEWAY_ESP32
1392 //#define MY_GATEWAY_LINUX
1393 //#define MY_GATEWAY_TINYGSM
1394 //#define MY_GATEWAY_MQTT_CLIENT
1395 //#define MY_GATEWAY_SERIAL
1396 
1397 
1402 //#define MY_DEBUG_VERBOSE_GATEWAY
1403 
1408 //#define MY_WIFI_SSID "MySSID"
1409 
1414 #ifndef MY_WIFI_BSSID
1415 #define MY_WIFI_BSSID NULL
1416 #endif
1417 
1422 //#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1423 
1428 #ifndef MY_HOSTNAME
1429 #define MY_HOSTNAME "MYSENSORS_DEVICE"
1430 #endif
1431 
1436 #ifndef MY_PORT
1437 #ifdef MY_GATEWAY_MQTT_CLIENT
1438 #define MY_PORT 1883
1439 #else
1440 #define MY_PORT 5003
1441 #endif
1442 #endif
1443 
1448 //#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1449 
1458 //#define MY_MQTT_PASSWORD "secretpassword"
1459 
1468 //#define MY_MQTT_USER "username"
1469 
1477 //#define MY_MQTT_CLIENT_ID "mysensors-1"
1478 
1486 //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1487 
1495 //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1496 
1514 //#define MY_MQTT_CA_CERT
1515 
1533 //#define MY_MQTT_CLIENT_CERT
1534 
1552 //#define MY_MQTT_CLIENT_KEY
1553 
1560 //#define MY_IP_ADDRESS 192,168,178,66
1561 
1568 //#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
1569 
1576 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
1577 
1583 //#define MY_USE_UDP
1584 
1590 #ifndef MY_MAC_ADDRESS
1591 #define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
1592 #endif
1593 
1604 //#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
1605 
1616 //#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
1617  // End of GatewaySettingGrpPub group
1619 
1630 //#define MY_GSM_APN
1635 //#define MY_GSM_BAUDRATE (9600u)
1640 //#define MY_GSM_PIN
1645 //#define MY_GSM_PSW
1650 //#define MY_GSM_RX
1655 //#define MY_GSM_SSID
1660 //#define MY_GSM_TX
1665 //#define MY_GSM_USR
1666  // End of GSMSettingGrpPub group
1668 
1683 //#define MY_DEFAULT_ERR_LED_PIN (6)
1684 
1693 //#define MY_DEFAULT_TX_LED_PIN (7)
1694 
1703 //#define MY_DEFAULT_RX_LED_PIN (8)
1704 
1711 //#define MY_WITH_LEDS_BLINKING_INVERSE
1712 
1717 //#define MY_INDICATION_HANDLER
1718 
1723 #ifndef MY_DEFAULT_LED_BLINK_PERIOD
1724 #define MY_DEFAULT_LED_BLINK_PERIOD 300
1725 #endif
1726  // End of LEDSettingGrpPub group
1727 
1768 //#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
1769 #if defined(MY_SECURITY_SIMPLE_PASSWD)
1770 #define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1771 #define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1772 #endif
1773 
1786 //#define MY_DEBUG_VERBOSE_SIGNING
1787 
1817 //#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
1818 #if defined(MY_SIGNING_SIMPLE_PASSWD)
1819 #define MY_SIGNING_SOFT
1820 #define MY_SIGNING_REQUEST_SIGNATURES
1821 #endif
1822 
1827 //#define MY_SIGNING_ATSHA204
1828 
1833 //#define MY_SIGNING_SOFT
1834 
1843 //#define MY_SIGNING_REQUEST_SIGNATURES
1844 
1861 //#define MY_SIGNING_WEAK_SECURITY
1862 
1874 #ifndef MY_VERIFICATION_TIMEOUT_MS
1875 #define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
1876 #endif
1877 
1894 //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
1895 
1900 #ifndef MY_SIGNING_ATSHA204_PIN
1901 #define MY_SIGNING_ATSHA204_PIN (17)
1902 #endif
1903 
1910 #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
1911 #define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
1912 #endif
1913 
1929 //#define MY_LOCK_DEVICE
1930 
1936 #if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
1937 #define MY_SIGNING_FEATURE
1938 #endif
1939  // End of SigningSettingGrpPub group
1940 
1969 //#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
1970 #if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
1971 #ifndef MY_RF24_ENABLE_ENCRYPTION
1972 #define MY_RF24_ENABLE_ENCRYPTION
1973 #endif
1974 #ifndef MY_RFM69_ENABLE_ENCRYPTION
1975 #define MY_RFM69_ENABLE_ENCRYPTION
1976 #endif
1977 #ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
1978 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
1979 #endif
1980 #ifndef MY_RFM95_ENABLE_ENCRYPTION
1981 #define MY_RFM95_ENABLE_ENCRYPTION
1982 #endif
1983 #endif
1984 
1991 #if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
1992 #define MY_ENCRYPTION_FEATURE
1993 #endif
1994  // End of EncryptionSettingGrpPub group
1995 
2035 //#define MY_NODE_LOCK_FEATURE
2036 
2045 #ifndef MY_NODE_UNLOCK_PIN
2046 #define MY_NODE_UNLOCK_PIN (14)
2047 #endif
2048 
2055 #ifndef MY_NODE_LOCK_COUNTER_MAX
2056 #define MY_NODE_LOCK_COUNTER_MAX (5)
2057 #endif
2058  // Node lock group // End of SecuritySettingGrpPub group
2060 
2081 #ifndef MY_ESP8266_SERIAL_MODE
2082 #define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2083 #endif
2084  // End of ESP8266SettingGrpPub group
2085 
2093 //
2094 // no ESP32 settings
2095 //
2096  // End of ESP32SettingGrpPub group
2098 
2110 //#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2111 
2116 #ifdef MY_LINUX_SERIAL_PTY
2117 #warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2118 #define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2119 #endif
2120 
2125 #ifdef MY_LINUX_IS_SERIAL_PTY
2126 #warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2127 #define MY_LINUX_SERIAL_IS_PTY
2128 #endif
2129 
2137 //#define MY_LINUX_SERIAL_IS_PTY
2138 
2143 //#define MY_LINUX_SERIAL_GROUPNAME "tty"
2144 
2151 #ifndef MY_LINUX_CONFIG_FILE
2152 #define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2153 #endif
2154  // End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2156 
2157 /*
2158 * "Helper" definitions
2159 */
2160 
2161 /*
2162  * Detect node type
2163  * MY_GATEWAY_FEATURE is set for gateway sketches.
2164  * MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2165  * MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2166  */
2167 #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)
2168 #define MY_GATEWAY_FEATURE
2169 #define MY_IS_GATEWAY (true)
2170 #define MY_NODE_TYPE "GW"
2171 #elif defined(MY_REPEATER_FEATURE)
2172 #define MY_IS_GATEWAY (false)
2173 #define MY_NODE_TYPE "REPEATER"
2174 #elif defined(DOXYGEN)
2175 #define MY_IS_GATEWAY
2176 #define MY_NODE_TYPE
2177 #else
2178 #define MY_IS_GATEWAY (false)
2179 #define MY_NODE_TYPE "NODE"
2180 #endif
2181 
2182 // DEBUG
2183 #if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2184 #undef MY_DEBUG
2185 #endif
2186 #if defined(MY_DEBUG)
2187 // standard debug output
2188 #define MY_DEBUG_VERBOSE_CORE
2189 #define MY_DEBUG_VERBOSE_TRANSPORT
2190 #define MY_DEBUG_VERBOSE_GATEWAY
2191 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2192 #endif
2193 
2194 #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)
2195 #define DEBUG_OUTPUT_ENABLED
2196 #ifndef MY_DEBUG_OTA
2197 #define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2198 #else
2199 #ifndef MY_OTA_LOG_SENDER_FEATURE
2200 #define MY_OTA_LOG_SENDER_FEATURE
2201 #endif
2202 #ifndef MY_DEBUG_OTA_DISABLE_ECHO
2203 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2204 #else
2205 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2206 #endif
2207 // disable radio related debugging messages
2208 #undef MY_DEBUG_VERBOSE_RF24
2209 #undef MY_DEBUG_VERBOSE_NRF5_ESB
2210 #undef MY_DEBUG_VERBOSE_RFM69
2211 #undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2212 #undef MY_DEBUG_VERBOSE_RFM95
2213 #endif
2214 #else
2215 #define DEBUG_OUTPUT(x,...)
2216 #endif
2217 
2218 // temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2219 #if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2220 #undef MY_RADIO_RF24
2221 #define MY_RADIO_NRF5_ESB
2222 #endif
2223 
2224 // Enable sensor network "feature" if one of the transport types was enabled
2225 #if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RS485)
2226 #define MY_SENSOR_NETWORK
2227 #endif
2228 
2229 // LEDS
2230 #if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2231 #define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2232 #endif
2233 
2234 #if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2235 #define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2236 #endif
2237 
2238 #if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2239 #define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2240 #endif
2241 
2242 #endif // MyConfig_h
2243 
2244 // Doxygen specific constructs, not included when built normally
2245 // This is used to enable disabled macros/definitions to be included in the documentation as well.
2246 #if DOXYGEN
2247 
2251 #define ARDUINO_ARCH_SAMD
2252 
2257 #define ARDUINO_ARCH_NRF5
2258 
2263 #define ARDUINO_ARCH_ESP8266
2264 
2269 #define ARDUINO_ARCH_ESP32
2270 
2275 #define ARDUINO_ARCH_AVR
2276 
2281 #define ARDUINO_ARCH_STM32F1
2282 
2287 #define TEENSYDUINO
2288 
2289 // debug
2290 #define MY_DEBUG
2291 #define MY_DEBUGDEVICE
2292 #define MY_DEBUG_OTA
2293 #define MY_DEBUG_OTA_DISABLE_ECHO
2294 #define MY_SPECIAL_DEBUG
2295 #define MY_DISABLED_SERIAL
2296 #define MY_SPLASH_SCREEN_DISABLED
2297 // linux
2298 #define MY_LINUX_SERIAL_PORT
2299 #define MY_LINUX_SERIAL_IS_PTY
2300 #define MY_LINUX_SERIAL_GROUPNAME
2301 #define MY_LINUX_SERIAL_PTY
2302 #define MY_LINUX_IS_SERIAL_PTY
2303 // inclusion mode
2304 #define MY_INCLUSION_MODE_FEATURE
2305 #define MY_INCLUSION_BUTTON_FEATURE
2306 // OTA logging and debug
2307 #define MY_OTA_LOG_RECEIVER_FEATURE
2308 #define MY_OTA_LOG_SENDER_FEATURE
2309 // transport
2310 #define MY_PARENT_NODE_IS_STATIC
2311 #define MY_REGISTRATION_CONTROLLER
2312 #define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2313 #define MY_TRANSPORT_SANITY_CHECK
2314 #define MY_NODE_LOCK_FEATURE
2315 #define MY_REPEATER_FEATURE
2316 #define MY_PASSIVE_NODE
2317 #define MY_MQTT_CLIENT_PUBLISH_RETAIN
2318 #define MY_MQTT_PASSWORD
2319 #define MY_MQTT_USER
2320 #define MY_MQTT_CLIENT_ID
2321 #define MY_MQTT_PUBLISH_TOPIC_PREFIX
2322 #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2323 #define MY_MQTT_CA_CERT
2324 #define MY_MQTT_CLIENT_CERT
2325 #define MY_MQTT_CLIENT_KEY
2326 #define MY_SIGNAL_REPORT_ENABLED
2327 // general
2328 #define MY_WITH_LEDS_BLINKING_INVERSE
2329 #define MY_INDICATION_HANDLER
2330 #define MY_DISABLE_REMOTE_RESET
2331 #define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2332 #define MY_LOCK_DEVICE
2333 #define MY_SLEEP_HANDLER
2334 // core
2335 #define MY_CORE_ONLY
2336 // GW
2337 #define MY_DEBUG_VERBOSE_GATEWAY
2338 #define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2339 #define MY_INCLUSION_LED_PIN
2340 #define MY_GATEWAY_W5100
2341 #define MY_GATEWAY_ENC28J60
2342 #define MY_GATEWAY_ESP8266
2343 #define MY_GATEWAY_ESP32
2344 #define MY_WIFI_SSID
2345 #define MY_WIFI_BSSID
2346 #define MY_WIFI_PASSWORD
2347 #define MY_GATEWAY_LINUX
2348 #define MY_GATEWAY_TINYGSM
2349 #define MY_GATEWAY_MQTT_CLIENT
2350 #define MY_GATEWAY_SERIAL
2351 #define MY_IP_ADDRESS
2352 #define MY_IP_GATEWAY_ADDRESS
2353 #define MY_IP_SUBNET_ADDRESS
2354 #define MY_USE_UDP
2355 #define MY_CONTROLLER_IP_ADDRESS
2356 #define MY_CONTROLLER_URL_ADDRESS
2357 // TinyGSM
2358 #define MY_GSM_APN
2359 #define MY_GSM_BAUDRATE
2360 #define MY_GSM_PIN
2361 #define MY_GSM_PSW
2362 #define MY_GSM_RX
2363 #define MY_GSM_SSID
2364 #define MY_GSM_TX
2365 #define MY_GSM_USR
2366 // LED
2367 #define MY_DEFAULT_ERR_LED_PIN
2368 #define MY_DEFAULT_TX_LED_PIN
2369 #define MY_DEFAULT_RX_LED_PIN
2370 // signing
2371 #define MY_SECURITY_SIMPLE_PASSWD
2372 #define MY_SIGNING_SIMPLE_PASSWD
2373 #define MY_ENCRYPTION_SIMPLE_PASSWD
2374 #define MY_SIGNING_ATSHA204
2375 #define MY_SIGNING_SOFT
2376 #define MY_SIGNING_REQUEST_SIGNATURES
2377 #define MY_SIGNING_WEAK_SECURITY
2378 #define MY_SIGNING_NODE_WHITELISTING
2379 #define MY_DEBUG_VERBOSE_SIGNING
2380 #define MY_SIGNING_FEATURE
2381 #define MY_ENCRYPTION_FEATURE
2382 // FOTA update
2383 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2384 #define MY_OTA_USE_I2C_EEPROM
2385 // RS485
2386 #define MY_RS485
2387 #define MY_RS485_DE_PIN
2388 #define MY_RS485_DE_INVERSE
2389 #define MY_RS485_HWSERIAL
2390 // RF24
2391 #define MY_RADIO_RF24
2392 #define MY_RADIO_NRF24 //deprecated
2393 #define MY_DEBUG_VERBOSE_RF24
2394 #define MY_RF24_POWER_PIN
2395 #define MY_RF24_IRQ_PIN
2396 #define MY_RF24_ENABLE_ENCRYPTION
2397 #define MY_RX_MESSAGE_BUFFER_FEATURE
2398 #define MY_RX_MESSAGE_BUFFER_SIZE
2399 // NRF5_ESB
2400 #define MY_RADIO_NRF5_ESB
2401 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2402 #define MY_DEBUG_VERBOSE_NRF5_ESB
2403 #define MY_NRF5_ESB_REVERSE_ACK_RX
2404 #define MY_NRF5_ESB_REVERSE_ACK_TX
2405 // RFM69
2406 #define MY_RADIO_RFM69
2407 #define MY_IS_RFM69HW
2408 #define MY_RFM69_NEW_DRIVER
2409 #define MY_RFM69_POWER_PIN
2410 #define MY_RFM69_MODEM_CONFIGURATION
2411 #define MY_RFM69_ENABLE_ENCRYPTION
2412 #define MY_RFM69_ATC_MODE_DISABLED
2413 #define MY_RFM69_MAX_POWER_LEVEL_DBM
2414 #define MY_RFM69_RST_PIN
2415 #define MY_DEBUG_VERBOSE_RFM69
2416 #define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2417 // RFM95
2418 #define MY_RADIO_RFM95
2419 #define MY_DEBUG_VERBOSE_RFM95
2420 #define MY_RFM95_ENABLE_ENCRYPTION
2421 #define MY_RFM95_ATC_MODE_DISABLED
2422 #define MY_RFM95_RST_PIN
2423 #define MY_RFM95_MODEM_CONFIGRUATION
2424 #define MY_RFM95_POWER_PIN
2425 #define MY_RFM95_TCXO
2426 #define MY_RFM95_MAX_POWER_LEVEL_DBM
2427 // SOFT-SPI
2428 #define MY_SOFTSPI
2429 #endif
2430  // End of MyConfig group