MySensors Library & Examples  2.3.2-32-g65f9465
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 #ifdef NRF5_250KBPS
547 #define MY_NRF5_ESB_MODE (NRF5_250KBPS)
548 #else
549 #define MY_NRF5_ESB_MODE (NRF5_1MBPS)
550 #endif
551 #endif
552 
560 #ifndef MY_NRF5_ESB_BASE_RADIO_ID
561 #define MY_NRF5_ESB_BASE_RADIO_ID 0x00, 0xFC, 0xE1, 0xA8, 0xA8
562 #endif
563 
568 #ifndef MY_NRF5_ESB_ADDR_WIDTH
569 #define MY_NRF5_ESB_ADDR_WIDTH (5)
570 #endif
571 
576 #ifndef MY_NRF5_ESB_RX_BUFFER_SIZE
577 #define MY_NRF5_ESB_RX_BUFFER_SIZE (20)
578 #endif
579 
584 //#define MY_NRF5_ESB_REVERSE_ACK_TX
585 
590 //#define MY_NRF5_ESB_REVERSE_ACK_RX // End of NRF5SettingGrpPub group
592 
609 //#define MY_RADIO_RFM69
610 
615 //#define MY_DEBUG_VERBOSE_RFM69
616 
621 //#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
622 
629 //#define MY_RFM69_NEW_DRIVER
630 
646 #ifndef MY_RFM69_FREQUENCY
647 #define MY_RFM69_FREQUENCY (RFM69_868MHZ)
648 #endif
649 
654 //#define MY_IS_RFM69HW
655 
662 #ifdef MY_IS_RFM69HW
663 #define MY_RFM69HW true
664 #else
665 #define MY_RFM69HW false
666 #endif
667 
672 #ifndef MY_RFM69_TX_POWER_DBM
673 #define MY_RFM69_TX_POWER_DBM (5)
674 #endif
675 
680 #ifndef MY_RFM69_ATC_TARGET_RSSI_DBM
681 #define MY_RFM69_ATC_TARGET_RSSI_DBM (-80)
682 #endif
683 
688 //#define MY_RFM69_ATC_MODE_DISABLED
689 
701 //#define MY_RFM69_MAX_POWER_LEVEL_DBM (10u)
702 
707 #ifndef MY_RFM69_NETWORKID
708 #define MY_RFM69_NETWORKID (100)
709 #endif
710 
715 //#define MY_RFM69_RST_PIN (9)
716 
717 #ifdef MY_RF69_RESET
718 #warning MY_RF69_RESET is depreciated, please use MY_RFM69_RST_PIN instead.
719 #define MY_RFM69_RST_PIN MY_RF69_RESET
720 #endif
721 
726 //#define MY_RFM69_POWER_PIN (3)
727 
732 #ifndef MY_RFM69_IRQ_PIN
733 #ifdef MY_RF69_IRQ_PIN
734 #warning MY_RF69_IRQ_PIN is depreciated, please use MY_RFM69_IRQ_PIN instead.
735 #define MY_RFM69_IRQ_PIN MY_RF69_IRQ_PIN
736 #else
737 #define MY_RFM69_IRQ_PIN DEFAULT_RFM69_IRQ_PIN
738 #endif
739 #endif
740 
745 #ifndef MY_RFM69_IRQ_NUM
746 #ifdef MY_RF69_IRQ_NUM
747 #warning MY_RF69_IRQ_NUM is depreciated, please use MY_RFM69_IRQ_NUM instead.
748 #define MY_RFM69_IRQ_NUM MY_RF69_IRQ_NUM
749 #else
750 #define MY_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN)
751 #endif
752 #endif
753 
758 #ifndef MY_RFM69_CS_PIN
759 #ifdef MY_RF69_SPI_CS
760 #warning MY_RF69_SPI_CS is depreciated, please use MY_RFM69_CS_PIN instead.
761 #define MY_RFM69_CS_PIN MY_RF69_SPI_CS
762 #else
763 #define MY_RFM69_CS_PIN DEFAULT_RFM69_CS_PIN
764 #endif
765 #endif
766 
771 #ifndef MY_RFM69_SPI_SPEED
772 #define MY_RFM69_SPI_SPEED (4*1000000ul) // datasheet says 10Mhz max.
773 #endif
774 
783 //#define MY_RFM69_ENABLE_ENCRYPTION
784 
805 //#define MY_RFM69_MODEM_CONFIGURATION (RFM69_FSK_BR55_5_FD50)
806 
807  // End of RFM69SettingGrpPub group
809 
824 //#define MY_RADIO_RFM95
825 
830 //#define MY_DEBUG_VERBOSE_RFM95
831 
842 //#define MY_RFM95_ENABLE_ENCRYPTION
843 
858 #ifndef MY_RFM95_FREQUENCY
859 #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
860 #endif
861 
878 #ifndef MY_RFM95_MODEM_CONFIGRUATION
879 #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
880 #endif
881 
886 //#define MY_RFM95_RST_PIN (9)
887 
892 //#define MY_RFM95_POWER_PIN (3)
893 
898 #ifndef MY_RFM95_IRQ_PIN
899 #define MY_RFM95_IRQ_PIN DEFAULT_RFM95_IRQ_PIN
900 #endif
901 
906 #ifndef MY_RFM95_IRQ_NUM
907 #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(MY_RFM95_IRQ_PIN)
908 #endif
909 
914 #ifndef MY_RFM95_CS_PIN
915 #define MY_RFM95_CS_PIN DEFAULT_RFM95_CS_PIN
916 #endif
917 
922 #ifndef MY_RFM95_SPI_SPEED
923 #define MY_RFM95_SPI_SPEED (4*1000000ul)
924 #endif
925 
932 #ifndef MY_RFM95_TX_POWER_DBM
933 #define MY_RFM95_TX_POWER_DBM (13u) // 20mW
934 #endif
935 
940 //#define MY_RFM95_ATC_MODE_DISABLED
941 
946 #ifndef MY_RFM95_ATC_TARGET_RSSI
947 #define MY_RFM95_ATC_TARGET_RSSI (-70)
948 #endif
949 
961 //#define MY_RFM95_MAX_POWER_LEVEL_DBM (10u)
962 
969 //#define MY_RFM95_TCXO // End of RFM95SettingGrpPub group
971 
989 //#define MY_SOFTSPI
990 
995 #ifndef MY_SOFT_SPI_SCK_PIN
996 #define MY_SOFT_SPI_SCK_PIN (14)
997 #endif
998 
1003 #ifndef MY_SOFT_SPI_MISO_PIN
1004 #define MY_SOFT_SPI_MISO_PIN (16)
1005 #endif
1006 
1011 #ifndef MY_SOFT_SPI_MOSI_PIN
1012 #define MY_SOFT_SPI_MOSI_PIN (15)
1013 #endif
1014  // End of SoftSpiSettingGrpPub group
1015  // End of TransportSettingGrpPub group
1017 
1038 #ifndef MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
1039 #define MY_RAM_ROUTING_TABLE_FEATURE
1040 #endif
1041 
1046 #ifndef MY_ROUTING_TABLE_SAVE_INTERVAL_MS
1047 #define MY_ROUTING_TABLE_SAVE_INTERVAL_MS (30*60*1000ul)
1048 #endif
1049 
1056 //#define MY_REPEATER_FEATURE
1057 
1067 //#define MY_PASSIVE_NODE
1068 
1073 #ifndef MY_NODE_ID
1074 #define MY_NODE_ID (AUTO)
1075 #endif
1076 
1081 #ifndef MY_PARENT_NODE_ID
1082 #define MY_PARENT_NODE_ID (AUTO)
1083 #endif
1084 
1089 //#define MY_PARENT_NODE_IS_STATIC
1090 
1097 //#define MY_TRANSPORT_SANITY_CHECK
1098 
1103 #ifndef MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS
1104 #define MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS (15*60*1000ul)
1105 #endif
1106 
1110 #ifndef MY_TRANSPORT_DISCOVERY_INTERVAL_MS
1111 #define MY_TRANSPORT_DISCOVERY_INTERVAL_MS (20*60*1000ul)
1112 #endif
1113 
1118 //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
1119 
1124 //#define MY_TRANSPORT_MAX_TX_FAILURES (10u)
1125 
1130 #ifndef MY_TRANSPORT_WAIT_READY_MS
1131 #define MY_TRANSPORT_WAIT_READY_MS (0)
1132 #endif
1133 
1139 //#define MY_SIGNAL_REPORT_ENABLED
1140  // End of RoutingNodeSettingGrpPub group
1142 
1155 #define MY_REGISTRATION_FEATURE
1156 
1162 #ifndef MY_REGISTRATION_RETRIES
1163 #define MY_REGISTRATION_RETRIES (3u)
1164 #endif
1165 
1171 #define MY_REGISTRATION_DEFAULT (true)
1172 
1177 //#define MY_REGISTRATION_CONTROLLER // End of RegistrationSettingGrpPub group
1179 
1190 //#define MY_CORE_ONLY
1191 
1197 #define MY_CORE_COMPATIBILITY_CHECK
1198  // End of CoreSettingGrpPub group
1199 
1210 #ifndef MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS
1211 #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS (10*1000ul)
1212 #endif
1213 
1221 #ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
1222 #define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
1223 #endif
1224 
1233 //#define MY_SLEEP_HANDLER // End of SleepSettingGrpPub group
1235 
1251 //#define MY_OTA_FIRMWARE_FEATURE
1252 
1257 #ifndef MY_OTA_FLASH_SS
1258 #define MY_OTA_FLASH_SS (8)
1259 #endif
1260 
1265 #ifndef MY_OTA_FLASH_JDECID
1266 #define MY_OTA_FLASH_JDECID (0x1F65)
1267 #endif
1268 
1273 //#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1275 
1286 #ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1287 #define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1288 #endif
1289 
1294 #ifndef MY_GATEWAY_MAX_SEND_LENGTH
1295 #define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1296 #endif
1297 
1302 #ifndef MY_GATEWAY_MAX_CLIENTS
1303 #define MY_GATEWAY_MAX_CLIENTS (1u)
1304 #endif
1305 
1310 //#define MY_INCLUSION_MODE_FEATURE
1311 
1318 //#define MY_INCLUSION_BUTTON_FEATURE
1319 
1320 // Disable inclusion mode button if inclusion mode feature is not enabled
1321 #ifndef MY_INCLUSION_MODE_FEATURE
1322 #undef MY_INCLUSION_BUTTON_FEATURE
1323 #endif
1324 
1332 //#define MY_INCLUSION_LED_PIN (7)
1333 
1338 #ifndef MY_INCLUSION_MODE_BUTTON_PIN
1339 #if defined(ARDUINO_ARCH_ESP8266)
1340 #define MY_INCLUSION_MODE_BUTTON_PIN (5)
1341 #else
1342 #define MY_INCLUSION_MODE_BUTTON_PIN (3)
1343 #endif
1344 #endif
1345 
1350 #ifndef MY_INCLUSION_MODE_DURATION
1351 #define MY_INCLUSION_MODE_DURATION (60)
1352 #endif
1353 
1364 #if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1365 #define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1366 #else
1367 #define MY_INCLUSION_BUTTON_PRESSED (LOW)
1368 #endif
1369 
1370 /**************************************
1371 * Ethernet Gateway Transport Defaults
1372 ***************************************/
1391 // The gateway options available
1392 //#define MY_GATEWAY_W5100
1393 //#define MY_GATEWAY_ENC28J60
1394 //#define MY_GATEWAY_ESP8266
1395 //#define MY_GATEWAY_ESP32
1396 //#define MY_GATEWAY_LINUX
1397 //#define MY_GATEWAY_TINYGSM
1398 //#define MY_GATEWAY_MQTT_CLIENT
1399 //#define MY_GATEWAY_SERIAL
1400 
1401 
1406 //#define MY_DEBUG_VERBOSE_GATEWAY
1407 
1412 //#define MY_WIFI_SSID "MySSID"
1413 
1418 #ifndef MY_WIFI_BSSID
1419 #define MY_WIFI_BSSID NULL
1420 #endif
1421 
1426 //#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1427 
1432 #ifndef MY_HOSTNAME
1433 #define MY_HOSTNAME "MYSENSORS_DEVICE"
1434 #endif
1435 
1440 #ifndef MY_PORT
1441 #ifdef MY_GATEWAY_MQTT_CLIENT
1442 #define MY_PORT 1883
1443 #else
1444 #define MY_PORT 5003
1445 #endif
1446 #endif
1447 
1452 //#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1453 
1462 //#define MY_MQTT_PASSWORD "secretpassword"
1463 
1472 //#define MY_MQTT_USER "username"
1473 
1481 //#define MY_MQTT_CLIENT_ID "mysensors-1"
1482 
1490 //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1491 
1499 //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1500 
1518 //#define MY_MQTT_CA_CERT
1519 
1537 //#define MY_MQTT_CLIENT_CERT
1538 
1556 //#define MY_MQTT_CLIENT_KEY
1557 
1564 //#define MY_IP_ADDRESS 192,168,178,66
1565 
1572 //#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
1573 
1580 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
1581 
1587 //#define MY_USE_UDP
1588 
1594 #ifndef MY_MAC_ADDRESS
1595 #define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
1596 #endif
1597 
1608 //#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
1609 
1620 //#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
1621  // End of GatewaySettingGrpPub group
1623 
1634 //#define MY_GSM_APN
1639 //#define MY_GSM_BAUDRATE (9600u)
1644 //#define MY_GSM_PIN
1649 //#define MY_GSM_PSW
1654 //#define MY_GSM_RX
1659 //#define MY_GSM_SSID
1664 //#define MY_GSM_TX
1669 //#define MY_GSM_USR
1670  // End of GSMSettingGrpPub group
1672 
1687 //#define MY_DEFAULT_ERR_LED_PIN (6)
1688 
1697 //#define MY_DEFAULT_TX_LED_PIN (7)
1698 
1707 //#define MY_DEFAULT_RX_LED_PIN (8)
1708 
1715 //#define MY_WITH_LEDS_BLINKING_INVERSE
1716 
1721 //#define MY_INDICATION_HANDLER
1722 
1727 #ifndef MY_DEFAULT_LED_BLINK_PERIOD
1728 #define MY_DEFAULT_LED_BLINK_PERIOD 300
1729 #endif
1730  // End of LEDSettingGrpPub group
1731 
1772 //#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
1773 #if defined(MY_SECURITY_SIMPLE_PASSWD)
1774 #define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1775 #define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1776 #endif
1777 
1790 //#define MY_DEBUG_VERBOSE_SIGNING
1791 
1821 //#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
1822 #if defined(MY_SIGNING_SIMPLE_PASSWD)
1823 #define MY_SIGNING_SOFT
1824 #define MY_SIGNING_REQUEST_SIGNATURES
1825 #endif
1826 
1831 //#define MY_SIGNING_ATSHA204
1832 
1837 //#define MY_SIGNING_SOFT
1838 
1847 //#define MY_SIGNING_REQUEST_SIGNATURES
1848 
1865 //#define MY_SIGNING_WEAK_SECURITY
1866 
1878 #ifndef MY_VERIFICATION_TIMEOUT_MS
1879 #define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
1880 #endif
1881 
1898 //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
1899 
1904 #ifndef MY_SIGNING_ATSHA204_PIN
1905 #define MY_SIGNING_ATSHA204_PIN (17)
1906 #endif
1907 
1914 #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
1915 #define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
1916 #endif
1917 
1933 //#define MY_LOCK_DEVICE
1934 
1940 #if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
1941 #define MY_SIGNING_FEATURE
1942 #endif
1943  // End of SigningSettingGrpPub group
1944 
1973 //#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
1974 #if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
1975 #ifndef MY_RF24_ENABLE_ENCRYPTION
1976 #define MY_RF24_ENABLE_ENCRYPTION
1977 #endif
1978 #ifndef MY_RFM69_ENABLE_ENCRYPTION
1979 #define MY_RFM69_ENABLE_ENCRYPTION
1980 #endif
1981 #ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
1982 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
1983 #endif
1984 #ifndef MY_RFM95_ENABLE_ENCRYPTION
1985 #define MY_RFM95_ENABLE_ENCRYPTION
1986 #endif
1987 #endif
1988 
1995 #if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
1996 #define MY_ENCRYPTION_FEATURE
1997 #endif
1998  // End of EncryptionSettingGrpPub group
1999 
2039 //#define MY_NODE_LOCK_FEATURE
2040 
2049 #ifndef MY_NODE_UNLOCK_PIN
2050 #define MY_NODE_UNLOCK_PIN (14)
2051 #endif
2052 
2059 #ifndef MY_NODE_LOCK_COUNTER_MAX
2060 #define MY_NODE_LOCK_COUNTER_MAX (5)
2061 #endif
2062  // Node lock group // End of SecuritySettingGrpPub group
2064 
2085 #ifndef MY_ESP8266_SERIAL_MODE
2086 #define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2087 #endif
2088  // End of ESP8266SettingGrpPub group
2089 
2097 //
2098 // no ESP32 settings
2099 //
2100  // End of ESP32SettingGrpPub group
2102 
2114 //#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2115 
2120 #ifdef MY_LINUX_SERIAL_PTY
2121 #warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2122 #define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2123 #endif
2124 
2129 #ifdef MY_LINUX_IS_SERIAL_PTY
2130 #warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2131 #define MY_LINUX_SERIAL_IS_PTY
2132 #endif
2133 
2141 //#define MY_LINUX_SERIAL_IS_PTY
2142 
2147 //#define MY_LINUX_SERIAL_GROUPNAME "tty"
2148 
2155 #ifndef MY_LINUX_CONFIG_FILE
2156 #define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2157 #endif
2158  // End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2160 
2161 /*
2162 * "Helper" definitions
2163 */
2164 
2165 /*
2166  * Detect node type
2167  * MY_GATEWAY_FEATURE is set for gateway sketches.
2168  * MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2169  * MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2170  */
2171 #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)
2172 #define MY_GATEWAY_FEATURE
2173 #define MY_IS_GATEWAY (true)
2174 #define MY_NODE_TYPE "GW"
2175 #elif defined(MY_REPEATER_FEATURE)
2176 #define MY_IS_GATEWAY (false)
2177 #define MY_NODE_TYPE "REPEATER"
2178 #elif defined(DOXYGEN)
2179 #define MY_IS_GATEWAY
2180 #define MY_NODE_TYPE
2181 #else
2182 #define MY_IS_GATEWAY (false)
2183 #define MY_NODE_TYPE "NODE"
2184 #endif
2185 
2186 // DEBUG
2187 #if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2188 #undef MY_DEBUG
2189 #endif
2190 #if defined(MY_DEBUG)
2191 // standard debug output
2192 #define MY_DEBUG_VERBOSE_CORE
2193 #define MY_DEBUG_VERBOSE_TRANSPORT
2194 #define MY_DEBUG_VERBOSE_GATEWAY
2195 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2196 #endif
2197 
2198 #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)
2199 #define DEBUG_OUTPUT_ENABLED
2200 #ifndef MY_DEBUG_OTA
2201 #define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2202 #else
2203 #ifndef MY_OTA_LOG_SENDER_FEATURE
2204 #define MY_OTA_LOG_SENDER_FEATURE
2205 #endif
2206 #ifndef MY_DEBUG_OTA_DISABLE_ECHO
2207 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2208 #else
2209 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2210 #endif
2211 // disable radio related debugging messages
2212 #undef MY_DEBUG_VERBOSE_RF24
2213 #undef MY_DEBUG_VERBOSE_NRF5_ESB
2214 #undef MY_DEBUG_VERBOSE_RFM69
2215 #undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2216 #undef MY_DEBUG_VERBOSE_RFM95
2217 #endif
2218 #else
2219 #define DEBUG_OUTPUT(x,...)
2220 #endif
2221 
2222 // temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2223 #if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2224 #undef MY_RADIO_RF24
2225 #define MY_RADIO_NRF5_ESB
2226 #endif
2227 
2228 // Enable sensor network "feature" if one of the transport types was enabled
2229 #if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RS485)
2230 #define MY_SENSOR_NETWORK
2231 #endif
2232 
2233 // LEDS
2234 #if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2235 #define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2236 #endif
2237 
2238 #if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2239 #define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2240 #endif
2241 
2242 #if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2243 #define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2244 #endif
2245 
2246 #endif // MyConfig_h
2247 
2248 // Doxygen specific constructs, not included when built normally
2249 // This is used to enable disabled macros/definitions to be included in the documentation as well.
2250 #if DOXYGEN
2251 
2255 #define ARDUINO_ARCH_SAMD
2256 
2261 #define ARDUINO_ARCH_NRF5
2262 
2267 #define ARDUINO_ARCH_ESP8266
2268 
2273 #define ARDUINO_ARCH_ESP32
2274 
2279 #define ARDUINO_ARCH_AVR
2280 
2285 #define ARDUINO_ARCH_STM32F1
2286 
2291 #define TEENSYDUINO
2292 
2293 // debug
2294 #define MY_DEBUG
2295 #define MY_DEBUGDEVICE
2296 #define MY_DEBUG_OTA
2297 #define MY_DEBUG_OTA_DISABLE_ECHO
2298 #define MY_SPECIAL_DEBUG
2299 #define MY_DISABLED_SERIAL
2300 #define MY_SPLASH_SCREEN_DISABLED
2301 // linux
2302 #define MY_LINUX_SERIAL_PORT
2303 #define MY_LINUX_SERIAL_IS_PTY
2304 #define MY_LINUX_SERIAL_GROUPNAME
2305 #define MY_LINUX_SERIAL_PTY
2306 #define MY_LINUX_IS_SERIAL_PTY
2307 // inclusion mode
2308 #define MY_INCLUSION_MODE_FEATURE
2309 #define MY_INCLUSION_BUTTON_FEATURE
2310 // OTA logging and debug
2311 #define MY_OTA_LOG_RECEIVER_FEATURE
2312 #define MY_OTA_LOG_SENDER_FEATURE
2313 // transport
2314 #define MY_PARENT_NODE_IS_STATIC
2315 #define MY_REGISTRATION_CONTROLLER
2316 #define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2317 #define MY_TRANSPORT_SANITY_CHECK
2318 #define MY_NODE_LOCK_FEATURE
2319 #define MY_REPEATER_FEATURE
2320 #define MY_PASSIVE_NODE
2321 #define MY_MQTT_CLIENT_PUBLISH_RETAIN
2322 #define MY_MQTT_PASSWORD
2323 #define MY_MQTT_USER
2324 #define MY_MQTT_CLIENT_ID
2325 #define MY_MQTT_PUBLISH_TOPIC_PREFIX
2326 #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2327 #define MY_MQTT_CA_CERT
2328 #define MY_MQTT_CLIENT_CERT
2329 #define MY_MQTT_CLIENT_KEY
2330 #define MY_SIGNAL_REPORT_ENABLED
2331 // general
2332 #define MY_WITH_LEDS_BLINKING_INVERSE
2333 #define MY_INDICATION_HANDLER
2334 #define MY_DISABLE_REMOTE_RESET
2335 #define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2336 #define MY_LOCK_DEVICE
2337 #define MY_SLEEP_HANDLER
2338 // core
2339 #define MY_CORE_ONLY
2340 // GW
2341 #define MY_DEBUG_VERBOSE_GATEWAY
2342 #define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2343 #define MY_INCLUSION_LED_PIN
2344 #define MY_GATEWAY_W5100
2345 #define MY_GATEWAY_ENC28J60
2346 #define MY_GATEWAY_ESP8266
2347 #define MY_GATEWAY_ESP32
2348 #define MY_WIFI_SSID
2349 #define MY_WIFI_BSSID
2350 #define MY_WIFI_PASSWORD
2351 #define MY_GATEWAY_LINUX
2352 #define MY_GATEWAY_TINYGSM
2353 #define MY_GATEWAY_MQTT_CLIENT
2354 #define MY_GATEWAY_SERIAL
2355 #define MY_IP_ADDRESS
2356 #define MY_IP_GATEWAY_ADDRESS
2357 #define MY_IP_SUBNET_ADDRESS
2358 #define MY_USE_UDP
2359 #define MY_CONTROLLER_IP_ADDRESS
2360 #define MY_CONTROLLER_URL_ADDRESS
2361 // TinyGSM
2362 #define MY_GSM_APN
2363 #define MY_GSM_BAUDRATE
2364 #define MY_GSM_PIN
2365 #define MY_GSM_PSW
2366 #define MY_GSM_RX
2367 #define MY_GSM_SSID
2368 #define MY_GSM_TX
2369 #define MY_GSM_USR
2370 // LED
2371 #define MY_DEFAULT_ERR_LED_PIN
2372 #define MY_DEFAULT_TX_LED_PIN
2373 #define MY_DEFAULT_RX_LED_PIN
2374 // signing
2375 #define MY_SECURITY_SIMPLE_PASSWD
2376 #define MY_SIGNING_SIMPLE_PASSWD
2377 #define MY_ENCRYPTION_SIMPLE_PASSWD
2378 #define MY_SIGNING_ATSHA204
2379 #define MY_SIGNING_SOFT
2380 #define MY_SIGNING_REQUEST_SIGNATURES
2381 #define MY_SIGNING_WEAK_SECURITY
2382 #define MY_SIGNING_NODE_WHITELISTING
2383 #define MY_DEBUG_VERBOSE_SIGNING
2384 #define MY_SIGNING_FEATURE
2385 #define MY_ENCRYPTION_FEATURE
2386 // FOTA update
2387 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2388 #define MY_OTA_USE_I2C_EEPROM
2389 // RS485
2390 #define MY_RS485
2391 #define MY_RS485_DE_PIN
2392 #define MY_RS485_DE_INVERSE
2393 #define MY_RS485_HWSERIAL
2394 // RF24
2395 #define MY_RADIO_RF24
2396 #define MY_RADIO_NRF24 //deprecated
2397 #define MY_DEBUG_VERBOSE_RF24
2398 #define MY_RF24_POWER_PIN
2399 #define MY_RF24_IRQ_PIN
2400 #define MY_RF24_ENABLE_ENCRYPTION
2401 #define MY_RX_MESSAGE_BUFFER_FEATURE
2402 #define MY_RX_MESSAGE_BUFFER_SIZE
2403 // NRF5_ESB
2404 #define MY_RADIO_NRF5_ESB
2405 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2406 #define MY_DEBUG_VERBOSE_NRF5_ESB
2407 #define MY_NRF5_ESB_REVERSE_ACK_RX
2408 #define MY_NRF5_ESB_REVERSE_ACK_TX
2409 // RFM69
2410 #define MY_RADIO_RFM69
2411 #define MY_IS_RFM69HW
2412 #define MY_RFM69_NEW_DRIVER
2413 #define MY_RFM69_POWER_PIN
2414 #define MY_RFM69_MODEM_CONFIGURATION
2415 #define MY_RFM69_ENABLE_ENCRYPTION
2416 #define MY_RFM69_ATC_MODE_DISABLED
2417 #define MY_RFM69_MAX_POWER_LEVEL_DBM
2418 #define MY_RFM69_RST_PIN
2419 #define MY_DEBUG_VERBOSE_RFM69
2420 #define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2421 // RFM95
2422 #define MY_RADIO_RFM95
2423 #define MY_DEBUG_VERBOSE_RFM95
2424 #define MY_RFM95_ENABLE_ENCRYPTION
2425 #define MY_RFM95_ATC_MODE_DISABLED
2426 #define MY_RFM95_RST_PIN
2427 #define MY_RFM95_MODEM_CONFIGRUATION
2428 #define MY_RFM95_POWER_PIN
2429 #define MY_RFM95_TCXO
2430 #define MY_RFM95_MAX_POWER_LEVEL_DBM
2431 // SOFT-SPI
2432 #define MY_SOFTSPI
2433 #endif
2434  // End of MyConfig group