MySensors Library & Examples  2.3.2-36-g2e00bf6
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 
218 //#define MY_PJON
219 
224 #ifndef MY_PJON_PIN
225 #define MY_PJON_PIN (12u)
226 #endif
227 
232 //#define MY_DEBUG_VERBOSE_PJON
233 
238 #ifndef MY_PJON_MAX_RETRIES
239 #define MY_PJON_MAX_RETRIES (5u)
240 #endif
241 
242 #ifdef MY_PJON
243 
244 #ifndef PJON_STRATEGY_ALL
245 #define PJON_STRATEGY_BITBANG
246 #endif
247 
248 #define PJON_NOT_ASSIGNED (253u)
249 #define PJON_BROADCAST (255u)
250 
251 #define SWBB_MAX_ATTEMPTS (50u)
252 #define PJON_INCLUDE_SWBB
253 #endif
254  // End of PJONSettingGrpPub group
256 
268 //#define MY_RS485
269 
274 #ifndef MY_RS485_BAUD_RATE
275 #define MY_RS485_BAUD_RATE (9600)
276 #endif
277 
282 #ifndef MY_RS485_MAX_MESSAGE_LENGTH
283 #define MY_RS485_MAX_MESSAGE_LENGTH (40)
284 #endif
285 
290 #ifndef MY_RS485_SOH_COUNT
291 #define MY_RS485_SOH_COUNT (1)
292 #endif
293 
294 
299 //#define MY_RS485_DE_PIN (2)
300 
305 //#define MY_RS485_DE_INVERSE
306 
313 //#define MY_RS485_HWSERIAL (Serial1) // End of RS485SettingGrpPub group
315 
336 // legacy - remove for 3.0.0
342 #ifdef MY_RADIO_NRF24
343 #warning MY_RADIO_NRF24 is deprecated, use MY_RADIO_RF24 instead.
344 #undef MY_RADIO_NRF24
345 #define MY_RADIO_RF24
346 #endif
347 
352 //#define MY_RADIO_RF24
353 
364 //#define MY_RF24_ENABLE_ENCRYPTION
365 
370 //#define MY_DEBUG_VERBOSE_RF24
371 
378 #ifndef MY_RF24_SPI_SPEED
379 #define MY_RF24_SPI_SPEED (2*1000000ul)
380 #endif
381 
386 #ifndef MY_RF24_CE_PIN
387 #define MY_RF24_CE_PIN (DEFAULT_RF24_CE_PIN)
388 #endif
389 
394 #ifndef MY_RF24_CS_PIN
395 #define MY_RF24_CS_PIN (DEFAULT_RF24_CS_PIN)
396 #endif
397 
402 //#define MY_RF24_IRQ_PIN (2)
403 
408 //#define MY_RF24_POWER_PIN (3)
409 
421 //#define MY_RX_MESSAGE_BUFFER_FEATURE
422 
429 #ifdef MY_RX_MESSAGE_BUFFER_FEATURE
430 #ifndef MY_RX_MESSAGE_BUFFER_SIZE
431 #define MY_RX_MESSAGE_BUFFER_SIZE (20)
432 #endif
433 #endif
434 
444 #ifndef MY_RF24_PA_LEVEL
445 #define MY_RF24_PA_LEVEL (RF24_PA_HIGH)
446 #endif
447 
468 #ifndef MY_RF24_CHANNEL
469 #define MY_RF24_CHANNEL (76)
470 #endif
471 
483 #ifndef MY_RF24_DATARATE
484 #define MY_RF24_DATARATE (RF24_250KBPS)
485 #endif
486 
494 #ifndef MY_RF24_BASE_RADIO_ID
495 #define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8
496 #endif
497 
502 #ifndef MY_RF24_ADDR_WIDTH
503 #define MY_RF24_ADDR_WIDTH (5)
504 #endif
505  // End of RF24SettingGrpPub group
506 
528 //#define MY_RADIO_NRF5_ESB
529 
540 //#define MY_NRF5_ESB_ENABLE_ENCRYPTION
541 
546 //#define MY_DEBUG_VERBOSE_NRF5_ESB
547 
557 #ifndef MY_NRF5_ESB_PA_LEVEL
558 #define MY_NRF5_ESB_PA_LEVEL (NRF5_PA_MAX)
559 #endif
560 
581 #ifndef MY_NRF5_ESB_CHANNEL
582 #define MY_NRF5_ESB_CHANNEL (76)
583 #endif
584 
594 #ifndef MY_NRF5_ESB_MODE
595 #ifdef NRF5_250KBPS
596 #define MY_NRF5_ESB_MODE (NRF5_250KBPS)
597 #else
598 #define MY_NRF5_ESB_MODE (NRF5_1MBPS)
599 #endif
600 #endif
601 
609 #ifndef MY_NRF5_ESB_BASE_RADIO_ID
610 #define MY_NRF5_ESB_BASE_RADIO_ID 0x00, 0xFC, 0xE1, 0xA8, 0xA8
611 #endif
612 
617 #ifndef MY_NRF5_ESB_ADDR_WIDTH
618 #define MY_NRF5_ESB_ADDR_WIDTH (5)
619 #endif
620 
625 #ifndef MY_NRF5_ESB_RX_BUFFER_SIZE
626 #define MY_NRF5_ESB_RX_BUFFER_SIZE (20)
627 #endif
628 
633 //#define MY_NRF5_ESB_REVERSE_ACK_TX
634 
639 //#define MY_NRF5_ESB_REVERSE_ACK_RX // End of NRF5SettingGrpPub group
641 
658 //#define MY_RADIO_RFM69
659 
664 //#define MY_DEBUG_VERBOSE_RFM69
665 
670 //#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
671 
678 //#define MY_RFM69_NEW_DRIVER
679 
695 #ifndef MY_RFM69_FREQUENCY
696 #define MY_RFM69_FREQUENCY (RFM69_868MHZ)
697 #endif
698 
703 //#define MY_IS_RFM69HW
704 
711 #ifdef MY_IS_RFM69HW
712 #define MY_RFM69HW true
713 #else
714 #define MY_RFM69HW false
715 #endif
716 
721 #ifndef MY_RFM69_TX_POWER_DBM
722 #define MY_RFM69_TX_POWER_DBM (5)
723 #endif
724 
729 #ifndef MY_RFM69_ATC_TARGET_RSSI_DBM
730 #define MY_RFM69_ATC_TARGET_RSSI_DBM (-80)
731 #endif
732 
737 //#define MY_RFM69_ATC_MODE_DISABLED
738 
750 //#define MY_RFM69_MAX_POWER_LEVEL_DBM (10u)
751 
756 #ifndef MY_RFM69_NETWORKID
757 #define MY_RFM69_NETWORKID (100)
758 #endif
759 
764 //#define MY_RFM69_RST_PIN (9)
765 
766 #ifdef MY_RF69_RESET
767 #warning MY_RF69_RESET is depreciated, please use MY_RFM69_RST_PIN instead.
768 #define MY_RFM69_RST_PIN MY_RF69_RESET
769 #endif
770 
775 //#define MY_RFM69_POWER_PIN (3)
776 
781 #ifndef MY_RFM69_IRQ_PIN
782 #ifdef MY_RF69_IRQ_PIN
783 #warning MY_RF69_IRQ_PIN is depreciated, please use MY_RFM69_IRQ_PIN instead.
784 #define MY_RFM69_IRQ_PIN MY_RF69_IRQ_PIN
785 #else
786 #define MY_RFM69_IRQ_PIN DEFAULT_RFM69_IRQ_PIN
787 #endif
788 #endif
789 
794 #ifndef MY_RFM69_IRQ_NUM
795 #ifdef MY_RF69_IRQ_NUM
796 #warning MY_RF69_IRQ_NUM is depreciated, please use MY_RFM69_IRQ_NUM instead.
797 #define MY_RFM69_IRQ_NUM MY_RF69_IRQ_NUM
798 #else
799 #define MY_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN)
800 #endif
801 #endif
802 
807 #ifndef MY_RFM69_CS_PIN
808 #ifdef MY_RF69_SPI_CS
809 #warning MY_RF69_SPI_CS is depreciated, please use MY_RFM69_CS_PIN instead.
810 #define MY_RFM69_CS_PIN MY_RF69_SPI_CS
811 #else
812 #define MY_RFM69_CS_PIN DEFAULT_RFM69_CS_PIN
813 #endif
814 #endif
815 
820 #ifndef MY_RFM69_SPI_SPEED
821 #define MY_RFM69_SPI_SPEED (4*1000000ul) // datasheet says 10Mhz max.
822 #endif
823 
832 //#define MY_RFM69_ENABLE_ENCRYPTION
833 
854 //#define MY_RFM69_MODEM_CONFIGURATION (RFM69_FSK_BR55_5_FD50)
855 
856  // End of RFM69SettingGrpPub group
858 
873 //#define MY_RADIO_RFM95
874 
879 //#define MY_DEBUG_VERBOSE_RFM95
880 
891 //#define MY_RFM95_ENABLE_ENCRYPTION
892 
907 #ifndef MY_RFM95_FREQUENCY
908 #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
909 #endif
910 
927 #ifndef MY_RFM95_MODEM_CONFIGRUATION
928 #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
929 #endif
930 
935 //#define MY_RFM95_RST_PIN (9)
936 
941 //#define MY_RFM95_POWER_PIN (3)
942 
947 #ifndef MY_RFM95_IRQ_PIN
948 #define MY_RFM95_IRQ_PIN DEFAULT_RFM95_IRQ_PIN
949 #endif
950 
955 #ifndef MY_RFM95_IRQ_NUM
956 #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(MY_RFM95_IRQ_PIN)
957 #endif
958 
963 #ifndef MY_RFM95_CS_PIN
964 #define MY_RFM95_CS_PIN DEFAULT_RFM95_CS_PIN
965 #endif
966 
971 #ifndef MY_RFM95_SPI_SPEED
972 #define MY_RFM95_SPI_SPEED (4*1000000ul)
973 #endif
974 
981 #ifndef MY_RFM95_TX_POWER_DBM
982 #define MY_RFM95_TX_POWER_DBM (13u) // 20mW
983 #endif
984 
989 //#define MY_RFM95_ATC_MODE_DISABLED
990 
995 #ifndef MY_RFM95_ATC_TARGET_RSSI
996 #define MY_RFM95_ATC_TARGET_RSSI (-70)
997 #endif
998 
1010 //#define MY_RFM95_MAX_POWER_LEVEL_DBM (10u)
1011 
1018 //#define MY_RFM95_TCXO // End of RFM95SettingGrpPub group
1020 
1038 //#define MY_SOFTSPI
1039 
1044 #ifndef MY_SOFT_SPI_SCK_PIN
1045 #define MY_SOFT_SPI_SCK_PIN (14)
1046 #endif
1047 
1052 #ifndef MY_SOFT_SPI_MISO_PIN
1053 #define MY_SOFT_SPI_MISO_PIN (16)
1054 #endif
1055 
1060 #ifndef MY_SOFT_SPI_MOSI_PIN
1061 #define MY_SOFT_SPI_MOSI_PIN (15)
1062 #endif
1063  // End of SoftSpiSettingGrpPub group
1064  // End of TransportSettingGrpPub group
1066 
1087 #ifndef MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
1088 #define MY_RAM_ROUTING_TABLE_FEATURE
1089 #endif
1090 
1095 #ifndef MY_ROUTING_TABLE_SAVE_INTERVAL_MS
1096 #define MY_ROUTING_TABLE_SAVE_INTERVAL_MS (30*60*1000ul)
1097 #endif
1098 
1105 //#define MY_REPEATER_FEATURE
1106 
1116 //#define MY_PASSIVE_NODE
1117 
1122 #ifndef MY_NODE_ID
1123 #define MY_NODE_ID (AUTO)
1124 #endif
1125 
1130 #ifndef MY_PARENT_NODE_ID
1131 #define MY_PARENT_NODE_ID (AUTO)
1132 #endif
1133 
1138 //#define MY_PARENT_NODE_IS_STATIC
1139 
1146 //#define MY_TRANSPORT_SANITY_CHECK
1147 
1152 #ifndef MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS
1153 #define MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS (15*60*1000ul)
1154 #endif
1155 
1159 #ifndef MY_TRANSPORT_DISCOVERY_INTERVAL_MS
1160 #define MY_TRANSPORT_DISCOVERY_INTERVAL_MS (20*60*1000ul)
1161 #endif
1162 
1167 //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
1168 
1173 //#define MY_TRANSPORT_MAX_TX_FAILURES (10u)
1174 
1179 #ifndef MY_TRANSPORT_WAIT_READY_MS
1180 #define MY_TRANSPORT_WAIT_READY_MS (0)
1181 #endif
1182 
1188 //#define MY_SIGNAL_REPORT_ENABLED
1189  // End of RoutingNodeSettingGrpPub group
1191 
1204 #define MY_REGISTRATION_FEATURE
1205 
1211 #ifndef MY_REGISTRATION_RETRIES
1212 #define MY_REGISTRATION_RETRIES (3u)
1213 #endif
1214 
1220 #define MY_REGISTRATION_DEFAULT (true)
1221 
1226 //#define MY_REGISTRATION_CONTROLLER // End of RegistrationSettingGrpPub group
1228 
1239 //#define MY_CORE_ONLY
1240 
1246 #define MY_CORE_COMPATIBILITY_CHECK
1247  // End of CoreSettingGrpPub group
1248 
1259 #ifndef MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS
1260 #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS (10*1000ul)
1261 #endif
1262 
1270 #ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
1271 #define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
1272 #endif
1273 
1282 //#define MY_SLEEP_HANDLER // End of SleepSettingGrpPub group
1284 
1300 //#define MY_OTA_FIRMWARE_FEATURE
1301 
1306 #ifndef MY_OTA_FLASH_SS
1307 #define MY_OTA_FLASH_SS (8)
1308 #endif
1309 
1314 #ifndef MY_OTA_FLASH_JDECID
1315 #define MY_OTA_FLASH_JDECID (0x1F65)
1316 #endif
1317 
1322 //#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1324 
1335 #ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1336 #define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1337 #endif
1338 
1343 #ifndef MY_GATEWAY_MAX_SEND_LENGTH
1344 #define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1345 #endif
1346 
1351 #ifndef MY_GATEWAY_MAX_CLIENTS
1352 #define MY_GATEWAY_MAX_CLIENTS (1u)
1353 #endif
1354 
1359 //#define MY_INCLUSION_MODE_FEATURE
1360 
1367 //#define MY_INCLUSION_BUTTON_FEATURE
1368 
1369 // Disable inclusion mode button if inclusion mode feature is not enabled
1370 #ifndef MY_INCLUSION_MODE_FEATURE
1371 #undef MY_INCLUSION_BUTTON_FEATURE
1372 #endif
1373 
1381 //#define MY_INCLUSION_LED_PIN (7)
1382 
1387 #ifndef MY_INCLUSION_MODE_BUTTON_PIN
1388 #if defined(ARDUINO_ARCH_ESP8266)
1389 #define MY_INCLUSION_MODE_BUTTON_PIN (5)
1390 #else
1391 #define MY_INCLUSION_MODE_BUTTON_PIN (3)
1392 #endif
1393 #endif
1394 
1399 #ifndef MY_INCLUSION_MODE_DURATION
1400 #define MY_INCLUSION_MODE_DURATION (60)
1401 #endif
1402 
1413 #if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1414 #define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1415 #else
1416 #define MY_INCLUSION_BUTTON_PRESSED (LOW)
1417 #endif
1418 
1419 /**************************************
1420 * Ethernet Gateway Transport Defaults
1421 ***************************************/
1440 // The gateway options available
1441 //#define MY_GATEWAY_W5100
1442 //#define MY_GATEWAY_ENC28J60
1443 //#define MY_GATEWAY_ESP8266
1444 //#define MY_GATEWAY_ESP32
1445 //#define MY_GATEWAY_LINUX
1446 //#define MY_GATEWAY_TINYGSM
1447 //#define MY_GATEWAY_MQTT_CLIENT
1448 //#define MY_GATEWAY_SERIAL
1449 
1450 
1455 //#define MY_DEBUG_VERBOSE_GATEWAY
1456 
1461 //#define MY_WIFI_SSID "MySSID"
1462 
1467 #ifndef MY_WIFI_BSSID
1468 #define MY_WIFI_BSSID NULL
1469 #endif
1470 
1475 //#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1476 
1481 #ifndef MY_HOSTNAME
1482 #define MY_HOSTNAME "MYSENSORS_DEVICE"
1483 #endif
1484 
1489 #ifndef MY_PORT
1490 #ifdef MY_GATEWAY_MQTT_CLIENT
1491 #define MY_PORT 1883
1492 #else
1493 #define MY_PORT 5003
1494 #endif
1495 #endif
1496 
1501 //#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1502 
1511 //#define MY_MQTT_PASSWORD "secretpassword"
1512 
1521 //#define MY_MQTT_USER "username"
1522 
1530 //#define MY_MQTT_CLIENT_ID "mysensors-1"
1531 
1539 //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1540 
1548 //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1549 
1567 //#define MY_MQTT_CA_CERT
1568 
1586 //#define MY_MQTT_CLIENT_CERT
1587 
1605 //#define MY_MQTT_CLIENT_KEY
1606 
1613 //#define MY_IP_ADDRESS 192,168,178,66
1614 
1621 //#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
1622 
1629 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
1630 
1636 //#define MY_USE_UDP
1637 
1643 #ifndef MY_MAC_ADDRESS
1644 #define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
1645 #endif
1646 
1657 //#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
1658 
1669 //#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
1670  // End of GatewaySettingGrpPub group
1672 
1683 //#define MY_GSM_APN
1688 //#define MY_GSM_BAUDRATE (9600u)
1693 //#define MY_GSM_PIN
1698 //#define MY_GSM_PSW
1703 //#define MY_GSM_RX
1708 //#define MY_GSM_SSID
1713 //#define MY_GSM_TX
1718 //#define MY_GSM_USR
1719  // End of GSMSettingGrpPub group
1721 
1736 //#define MY_DEFAULT_ERR_LED_PIN (6)
1737 
1746 //#define MY_DEFAULT_TX_LED_PIN (7)
1747 
1756 //#define MY_DEFAULT_RX_LED_PIN (8)
1757 
1764 //#define MY_WITH_LEDS_BLINKING_INVERSE
1765 
1770 //#define MY_INDICATION_HANDLER
1771 
1776 #ifndef MY_DEFAULT_LED_BLINK_PERIOD
1777 #define MY_DEFAULT_LED_BLINK_PERIOD 300
1778 #endif
1779  // End of LEDSettingGrpPub group
1780 
1821 //#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
1822 #if defined(MY_SECURITY_SIMPLE_PASSWD)
1823 #define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1824 #define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1825 #endif
1826 
1839 //#define MY_DEBUG_VERBOSE_SIGNING
1840 
1870 //#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
1871 #if defined(MY_SIGNING_SIMPLE_PASSWD)
1872 #define MY_SIGNING_SOFT
1873 #define MY_SIGNING_REQUEST_SIGNATURES
1874 #endif
1875 
1880 //#define MY_SIGNING_ATSHA204
1881 
1886 //#define MY_SIGNING_SOFT
1887 
1896 //#define MY_SIGNING_REQUEST_SIGNATURES
1897 
1914 //#define MY_SIGNING_WEAK_SECURITY
1915 
1927 #ifndef MY_VERIFICATION_TIMEOUT_MS
1928 #define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
1929 #endif
1930 
1947 //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
1948 
1953 #ifndef MY_SIGNING_ATSHA204_PIN
1954 #define MY_SIGNING_ATSHA204_PIN (17)
1955 #endif
1956 
1963 #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
1964 #define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
1965 #endif
1966 
1982 //#define MY_LOCK_DEVICE
1983 
1989 #if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
1990 #define MY_SIGNING_FEATURE
1991 #endif
1992  // End of SigningSettingGrpPub group
1993 
2022 //#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
2023 #if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
2024 #ifndef MY_RF24_ENABLE_ENCRYPTION
2025 #define MY_RF24_ENABLE_ENCRYPTION
2026 #endif
2027 #ifndef MY_RFM69_ENABLE_ENCRYPTION
2028 #define MY_RFM69_ENABLE_ENCRYPTION
2029 #endif
2030 #ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
2031 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2032 #endif
2033 #ifndef MY_RFM95_ENABLE_ENCRYPTION
2034 #define MY_RFM95_ENABLE_ENCRYPTION
2035 #endif
2036 #endif
2037 
2044 #if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
2045 #define MY_ENCRYPTION_FEATURE
2046 #endif
2047  // End of EncryptionSettingGrpPub group
2048 
2088 //#define MY_NODE_LOCK_FEATURE
2089 
2098 #ifndef MY_NODE_UNLOCK_PIN
2099 #define MY_NODE_UNLOCK_PIN (14)
2100 #endif
2101 
2108 #ifndef MY_NODE_LOCK_COUNTER_MAX
2109 #define MY_NODE_LOCK_COUNTER_MAX (5)
2110 #endif
2111  // Node lock group // End of SecuritySettingGrpPub group
2113 
2134 #ifndef MY_ESP8266_SERIAL_MODE
2135 #define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2136 #endif
2137  // End of ESP8266SettingGrpPub group
2138 
2146 //
2147 // no ESP32 settings
2148 //
2149  // End of ESP32SettingGrpPub group
2151 
2163 //#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2164 
2169 #ifdef MY_LINUX_SERIAL_PTY
2170 #warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2171 #define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2172 #endif
2173 
2178 #ifdef MY_LINUX_IS_SERIAL_PTY
2179 #warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2180 #define MY_LINUX_SERIAL_IS_PTY
2181 #endif
2182 
2190 //#define MY_LINUX_SERIAL_IS_PTY
2191 
2196 //#define MY_LINUX_SERIAL_GROUPNAME "tty"
2197 
2204 #ifndef MY_LINUX_CONFIG_FILE
2205 #define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2206 #endif
2207  // End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2209 
2210 /*
2211 * "Helper" definitions
2212 */
2213 
2214 /*
2215  * Detect node type
2216  * MY_GATEWAY_FEATURE is set for gateway sketches.
2217  * MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2218  * MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2219  */
2220 #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)
2221 #define MY_GATEWAY_FEATURE
2222 #define MY_IS_GATEWAY (true)
2223 #define MY_NODE_TYPE "GW"
2224 #elif defined(MY_REPEATER_FEATURE)
2225 #define MY_IS_GATEWAY (false)
2226 #define MY_NODE_TYPE "REPEATER"
2227 #elif defined(DOXYGEN)
2228 #define MY_IS_GATEWAY
2229 #define MY_NODE_TYPE
2230 #else
2231 #define MY_IS_GATEWAY (false)
2232 #define MY_NODE_TYPE "NODE"
2233 #endif
2234 
2235 // DEBUG
2236 #if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2237 #undef MY_DEBUG
2238 #endif
2239 #if defined(MY_DEBUG)
2240 // standard debug output
2241 #define MY_DEBUG_VERBOSE_CORE
2242 #define MY_DEBUG_VERBOSE_TRANSPORT
2243 #define MY_DEBUG_VERBOSE_GATEWAY
2244 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2245 #endif
2246 
2247 #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)
2248 #define DEBUG_OUTPUT_ENABLED
2249 #ifndef MY_DEBUG_OTA
2250 #define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2251 #else
2252 #ifndef MY_OTA_LOG_SENDER_FEATURE
2253 #define MY_OTA_LOG_SENDER_FEATURE
2254 #endif
2255 #ifndef MY_DEBUG_OTA_DISABLE_ECHO
2256 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2257 #else
2258 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2259 #endif
2260 // disable radio related debugging messages
2261 #undef MY_DEBUG_VERBOSE_RF24
2262 #undef MY_DEBUG_VERBOSE_NRF5_ESB
2263 #undef MY_DEBUG_VERBOSE_RFM69
2264 #undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2265 #undef MY_DEBUG_VERBOSE_RFM95
2266 #endif
2267 #else
2268 #define DEBUG_OUTPUT(x,...)
2269 #endif
2270 
2271 // temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2272 #if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2273 #undef MY_RADIO_RF24
2274 #define MY_RADIO_NRF5_ESB
2275 #endif
2276 
2277 // Enable sensor network "feature" if one of the transport types was enabled
2278 #if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RS485) || defined(MY_PJON)
2279 #define MY_SENSOR_NETWORK
2280 #endif
2281 
2282 // LEDS
2283 #if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2284 #define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2285 #endif
2286 
2287 #if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2288 #define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2289 #endif
2290 
2291 #if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2292 #define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2293 #endif
2294 
2295 #endif // MyConfig_h
2296 
2297 // Doxygen specific constructs, not included when built normally
2298 // This is used to enable disabled macros/definitions to be included in the documentation as well.
2299 #if DOXYGEN
2300 
2304 #define ARDUINO_ARCH_SAMD
2305 
2310 #define ARDUINO_ARCH_NRF5
2311 
2316 #define ARDUINO_ARCH_ESP8266
2317 
2322 #define ARDUINO_ARCH_ESP32
2323 
2328 #define ARDUINO_ARCH_AVR
2329 
2334 #define ARDUINO_ARCH_STM32F1
2335 
2340 #define TEENSYDUINO
2341 
2342 // debug
2343 #define MY_DEBUG
2344 #define MY_DEBUGDEVICE
2345 #define MY_DEBUG_OTA
2346 #define MY_DEBUG_OTA_DISABLE_ECHO
2347 #define MY_SPECIAL_DEBUG
2348 #define MY_DISABLED_SERIAL
2349 #define MY_SPLASH_SCREEN_DISABLED
2350 // linux
2351 #define MY_LINUX_SERIAL_PORT
2352 #define MY_LINUX_SERIAL_IS_PTY
2353 #define MY_LINUX_SERIAL_GROUPNAME
2354 #define MY_LINUX_SERIAL_PTY
2355 #define MY_LINUX_IS_SERIAL_PTY
2356 // inclusion mode
2357 #define MY_INCLUSION_MODE_FEATURE
2358 #define MY_INCLUSION_BUTTON_FEATURE
2359 // OTA logging and debug
2360 #define MY_OTA_LOG_RECEIVER_FEATURE
2361 #define MY_OTA_LOG_SENDER_FEATURE
2362 // transport
2363 #define MY_PARENT_NODE_IS_STATIC
2364 #define MY_REGISTRATION_CONTROLLER
2365 #define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2366 #define MY_TRANSPORT_SANITY_CHECK
2367 #define MY_NODE_LOCK_FEATURE
2368 #define MY_REPEATER_FEATURE
2369 #define MY_PASSIVE_NODE
2370 #define MY_MQTT_CLIENT_PUBLISH_RETAIN
2371 #define MY_MQTT_PASSWORD
2372 #define MY_MQTT_USER
2373 #define MY_MQTT_CLIENT_ID
2374 #define MY_MQTT_PUBLISH_TOPIC_PREFIX
2375 #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2376 #define MY_MQTT_CA_CERT
2377 #define MY_MQTT_CLIENT_CERT
2378 #define MY_MQTT_CLIENT_KEY
2379 #define MY_SIGNAL_REPORT_ENABLED
2380 // general
2381 #define MY_WITH_LEDS_BLINKING_INVERSE
2382 #define MY_INDICATION_HANDLER
2383 #define MY_DISABLE_REMOTE_RESET
2384 #define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2385 #define MY_LOCK_DEVICE
2386 #define MY_SLEEP_HANDLER
2387 // core
2388 #define MY_CORE_ONLY
2389 // GW
2390 #define MY_DEBUG_VERBOSE_GATEWAY
2391 #define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2392 #define MY_INCLUSION_LED_PIN
2393 #define MY_GATEWAY_W5100
2394 #define MY_GATEWAY_ENC28J60
2395 #define MY_GATEWAY_ESP8266
2396 #define MY_GATEWAY_ESP32
2397 #define MY_WIFI_SSID
2398 #define MY_WIFI_BSSID
2399 #define MY_WIFI_PASSWORD
2400 #define MY_GATEWAY_LINUX
2401 #define MY_GATEWAY_TINYGSM
2402 #define MY_GATEWAY_MQTT_CLIENT
2403 #define MY_GATEWAY_SERIAL
2404 #define MY_IP_ADDRESS
2405 #define MY_IP_GATEWAY_ADDRESS
2406 #define MY_IP_SUBNET_ADDRESS
2407 #define MY_USE_UDP
2408 #define MY_CONTROLLER_IP_ADDRESS
2409 #define MY_CONTROLLER_URL_ADDRESS
2410 // TinyGSM
2411 #define MY_GSM_APN
2412 #define MY_GSM_BAUDRATE
2413 #define MY_GSM_PIN
2414 #define MY_GSM_PSW
2415 #define MY_GSM_RX
2416 #define MY_GSM_SSID
2417 #define MY_GSM_TX
2418 #define MY_GSM_USR
2419 // LED
2420 #define MY_DEFAULT_ERR_LED_PIN
2421 #define MY_DEFAULT_TX_LED_PIN
2422 #define MY_DEFAULT_RX_LED_PIN
2423 // signing
2424 #define MY_SECURITY_SIMPLE_PASSWD
2425 #define MY_SIGNING_SIMPLE_PASSWD
2426 #define MY_ENCRYPTION_SIMPLE_PASSWD
2427 #define MY_SIGNING_ATSHA204
2428 #define MY_SIGNING_SOFT
2429 #define MY_SIGNING_REQUEST_SIGNATURES
2430 #define MY_SIGNING_WEAK_SECURITY
2431 #define MY_SIGNING_NODE_WHITELISTING
2432 #define MY_DEBUG_VERBOSE_SIGNING
2433 #define MY_SIGNING_FEATURE
2434 #define MY_ENCRYPTION_FEATURE
2435 // FOTA update
2436 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2437 #define MY_OTA_USE_I2C_EEPROM
2438 // RS485
2439 #define MY_RS485
2440 #define MY_RS485_DE_PIN
2441 #define MY_RS485_DE_INVERSE
2442 #define MY_RS485_HWSERIAL
2443 // PJON
2444 #define MY_PJON
2445 #define MY_DEBUG_VERBOSE_PJON
2446 // RF24
2447 #define MY_RADIO_RF24
2448 #define MY_RADIO_NRF24 //deprecated
2449 #define MY_DEBUG_VERBOSE_RF24
2450 #define MY_RF24_POWER_PIN
2451 #define MY_RF24_IRQ_PIN
2452 #define MY_RF24_ENABLE_ENCRYPTION
2453 #define MY_RX_MESSAGE_BUFFER_FEATURE
2454 #define MY_RX_MESSAGE_BUFFER_SIZE
2455 // NRF5_ESB
2456 #define MY_RADIO_NRF5_ESB
2457 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2458 #define MY_DEBUG_VERBOSE_NRF5_ESB
2459 #define MY_NRF5_ESB_REVERSE_ACK_RX
2460 #define MY_NRF5_ESB_REVERSE_ACK_TX
2461 // RFM69
2462 #define MY_RADIO_RFM69
2463 #define MY_IS_RFM69HW
2464 #define MY_RFM69_NEW_DRIVER
2465 #define MY_RFM69_POWER_PIN
2466 #define MY_RFM69_MODEM_CONFIGURATION
2467 #define MY_RFM69_ENABLE_ENCRYPTION
2468 #define MY_RFM69_ATC_MODE_DISABLED
2469 #define MY_RFM69_MAX_POWER_LEVEL_DBM
2470 #define MY_RFM69_RST_PIN
2471 #define MY_DEBUG_VERBOSE_RFM69
2472 #define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2473 // RFM95
2474 #define MY_RADIO_RFM95
2475 #define MY_DEBUG_VERBOSE_RFM95
2476 #define MY_RFM95_ENABLE_ENCRYPTION
2477 #define MY_RFM95_ATC_MODE_DISABLED
2478 #define MY_RFM95_RST_PIN
2479 #define MY_RFM95_MODEM_CONFIGRUATION
2480 #define MY_RFM95_POWER_PIN
2481 #define MY_RFM95_TCXO
2482 #define MY_RFM95_MAX_POWER_LEVEL_DBM
2483 // SOFT-SPI
2484 #define MY_SOFTSPI
2485 #endif
2486  // End of MyConfig group