MySensors Library & Examples  2.3.2-62-ge298769
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 <[email protected]>
9  * Copyright (C) 2013-2022 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 RADIO_MODE_MODE_Nrf_250Kbit
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 
1036 //#define MY_RADIO_SX126x
1037 
1042 #ifndef MY_SX126x_CS_PIN
1043 #define MY_SX126x_CS_PIN DEFAULT_SX126x_CS_PIN
1044 #endif
1045 
1050 #ifndef MY_SX126x_IRQ_PIN
1051 #define MY_SX126x_IRQ_PIN DEFAULT_SX126x_IRQ_PIN
1052 #endif
1053 
1068 #ifndef MY_SX126x_FREQUENCY
1069 #define MY_SX126x_FREQUENCY (SX126x_868MHZ)
1070 #endif
1071 
1081 #ifndef MY_SX126x_LORA_SF
1082 #define MY_SX126x_LORA_SF LORA_SF7
1083 #endif
1084 
1105 #ifndef MY_SX126x_LORA_BW
1106 #define MY_SX126x_LORA_BW LORA_BW_125
1107 #endif
1108 
1123 #ifndef MY_SX126x_LORA_CR
1124 #define MY_SX126x_LORA_CR LORA_CR_4_5
1125 #endif
1126 
1144 //#define MY_SX126x_TCXO_VOLTAGE (SX126x_TCXO_3V3)
1145 
1146 
1154 #if !defined(MY_SX126c_TCXO_STARTUP_DELAY) && defined(MY_SX126x_TCXO_VOLTAGE)
1155 #define MY_SX126c_TCXO_STARTUP_DELAY (10)
1156 #endif
1157 
1164 #if !defined(MY_SX126x_USE_TCXO) && defined(MY_SX126x_TCXO_VOLTAGE)
1165 #define MY_SX126x_USE_TCXO
1166 #endif
1167 
1172 //#define MY_SX126x_USE_DIO2_ANT_SWITCH
1173 
1181 //#define MY_SX126x_ANT_SWITCH_PIN (GPIO3)
1182 
1191 #if !defined(MY_SX126x_VARIANT)
1192 #define MY_SX126x_VARIANT (1)
1193 #endif
1194 
1199 //#define MY_SX126x_POWER_PIN (3)
1200 
1205 //#define MY_SX126x_RESET_PIN (47)
1206 
1211 //#define MY_SX126x_BUSY_PIN (39)
1212 
1217 //#define MY_SX126x_DISABLE_ATC
1218 
1223 #ifndef MY_SX126x_ATC_TARGET_DBM
1224 #define MY_SX126x_ATC_TARGET_DBM (-70)
1225 #endif
1226 
1233 #ifndef MY_SX126x_MAX_POWER_LEVEL_DBM
1234 #define MY_SX126x_MAX_POWER_LEVEL_DBM (20)
1235 #endif
1236 
1241 #ifndef MY_SX126x_MIN_POWER_LEVEL_DBM
1242 #define MY_SX126x_MIN_POWER_LEVEL_DBM (-3)
1243 #endif
1244  // End of SX126xSettingGrpPub group
1246 
1264 //#define MY_SOFTSPI
1265 
1270 #ifndef MY_SOFT_SPI_SCK_PIN
1271 #define MY_SOFT_SPI_SCK_PIN (14)
1272 #endif
1273 
1278 #ifndef MY_SOFT_SPI_MISO_PIN
1279 #define MY_SOFT_SPI_MISO_PIN (16)
1280 #endif
1281 
1286 #ifndef MY_SOFT_SPI_MOSI_PIN
1287 #define MY_SOFT_SPI_MOSI_PIN (15)
1288 #endif
1289  // End of SoftSpiSettingGrpPub group
1290  // End of TransportSettingGrpPub group
1292 
1313 #ifndef MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
1314 #define MY_RAM_ROUTING_TABLE_FEATURE
1315 #endif
1316 
1321 #ifndef MY_ROUTING_TABLE_SAVE_INTERVAL_MS
1322 #define MY_ROUTING_TABLE_SAVE_INTERVAL_MS (30*60*1000ul)
1323 #endif
1324 
1331 //#define MY_REPEATER_FEATURE
1332 
1342 //#define MY_PASSIVE_NODE
1343 
1348 #ifndef MY_NODE_ID
1349 #define MY_NODE_ID (AUTO)
1350 #endif
1351 
1356 #ifndef MY_PARENT_NODE_ID
1357 #define MY_PARENT_NODE_ID (AUTO)
1358 #endif
1359 
1364 //#define MY_PARENT_NODE_IS_STATIC
1365 
1372 //#define MY_TRANSPORT_SANITY_CHECK
1373 
1378 #ifndef MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS
1379 #define MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS (15*60*1000ul)
1380 #endif
1381 
1385 #ifndef MY_TRANSPORT_DISCOVERY_INTERVAL_MS
1386 #define MY_TRANSPORT_DISCOVERY_INTERVAL_MS (20*60*1000ul)
1387 #endif
1388 
1393 //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
1394 
1399 //#define MY_TRANSPORT_MAX_TX_FAILURES (10u)
1400 
1405 #ifndef MY_TRANSPORT_WAIT_READY_MS
1406 #define MY_TRANSPORT_WAIT_READY_MS (0)
1407 #endif
1408 
1414 //#define MY_SIGNAL_REPORT_ENABLED
1415  // End of RoutingNodeSettingGrpPub group
1417 
1430 #define MY_REGISTRATION_FEATURE
1431 
1437 #ifndef MY_REGISTRATION_RETRIES
1438 #define MY_REGISTRATION_RETRIES (3u)
1439 #endif
1440 
1446 #define MY_REGISTRATION_DEFAULT (true)
1447 
1452 //#define MY_REGISTRATION_CONTROLLER // End of RegistrationSettingGrpPub group
1454 
1465 //#define MY_CORE_ONLY
1466 
1472 #define MY_CORE_COMPATIBILITY_CHECK
1473  // End of CoreSettingGrpPub group
1474 
1485 #ifndef MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS
1486 #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS (10*1000ul)
1487 #endif
1488 
1496 #ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
1497 #define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
1498 #endif
1499 
1508 //#define MY_SLEEP_HANDLER // End of SleepSettingGrpPub group
1510 
1526 //#define MY_OTA_FIRMWARE_FEATURE
1527 
1532 #ifndef MY_OTA_FLASH_SS
1533 #define MY_OTA_FLASH_SS (8)
1534 #endif
1535 
1540 #ifndef MY_OTA_FLASH_JDECID
1541 #define MY_OTA_FLASH_JDECID (0x1F65)
1542 #endif
1543 
1548 //#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1550 
1561 #ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1562 #define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1563 #endif
1564 
1569 #ifndef MY_GATEWAY_MAX_SEND_LENGTH
1570 #define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1571 #endif
1572 
1577 #ifndef MY_GATEWAY_MAX_CLIENTS
1578 #define MY_GATEWAY_MAX_CLIENTS (1u)
1579 #endif
1580 
1585 //#define MY_INCLUSION_MODE_FEATURE
1586 
1593 //#define MY_INCLUSION_BUTTON_FEATURE
1594 
1595 // Disable inclusion mode button if inclusion mode feature is not enabled
1596 #ifndef MY_INCLUSION_MODE_FEATURE
1597 #undef MY_INCLUSION_BUTTON_FEATURE
1598 #endif
1599 
1607 //#define MY_INCLUSION_LED_PIN (7)
1608 
1613 #ifndef MY_INCLUSION_MODE_BUTTON_PIN
1614 #if defined(ARDUINO_ARCH_ESP8266)
1615 #define MY_INCLUSION_MODE_BUTTON_PIN (5)
1616 #else
1617 #define MY_INCLUSION_MODE_BUTTON_PIN (3)
1618 #endif
1619 #endif
1620 
1625 #ifndef MY_INCLUSION_MODE_DURATION
1626 #define MY_INCLUSION_MODE_DURATION (60)
1627 #endif
1628 
1639 #if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1640 #define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1641 #else
1642 #define MY_INCLUSION_BUTTON_PRESSED (LOW)
1643 #endif
1644 
1645 /**************************************
1646 * Ethernet Gateway Transport Defaults
1647 ***************************************/
1668 // The gateway options available
1669 //#define MY_GATEWAY_W5100
1670 //#define MY_GATEWAY_ENC28J60
1671 //#define MY_GATEWAY_ESP8266
1672 //#define MY_GATEWAY_ESP8266_SECURE
1673 //#define MY_GATEWAY_ESP32
1674 //#define MY_GATEWAY_LINUX
1675 //#define MY_GATEWAY_TINYGSM
1676 //#define MY_GATEWAY_MQTT_CLIENT
1677 //#define MY_GATEWAY_SERIAL
1678 
1679 
1684 //#define MY_DEBUG_VERBOSE_GATEWAY
1685 
1690 //#define MY_WIFI_SSID "MySSID"
1691 
1696 #ifndef MY_WIFI_BSSID
1697 #define MY_WIFI_BSSID NULL
1698 #endif
1699 
1704 //#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1705 
1710 #ifndef MY_HOSTNAME
1711 #define MY_HOSTNAME "MYSENSORS_DEVICE"
1712 #endif
1713 
1718 #ifndef MY_PORT
1719 #ifdef MY_GATEWAY_MQTT_CLIENT
1720 #define MY_PORT 1883
1721 #else
1722 #define MY_PORT 5003
1723 #endif
1724 #endif
1725 
1730 //#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1731 
1740 //#define MY_MQTT_PASSWORD "secretpassword"
1741 
1750 //#define MY_MQTT_USER "username"
1751 
1759 //#define MY_MQTT_CLIENT_ID "mysensors-1"
1760 
1768 //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1769 
1777 //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1778 
1814 //#define MY_MQTT_CA_CERT1
1815 
1820 //#define MY_MQTT_CA_CERT2
1821 
1826 //#define MY_MQTT_CA_CERT3
1827 
1828 
1846 //#define MY_MQTT_FINGERPRINT
1847 
1865 //#define MY_MQTT_CLIENT_CERT
1866 
1884 //#define MY_MQTT_CLIENT_KEY
1885 
1892 //#define MY_IP_ADDRESS 192,168,178,66
1893 
1900 //#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
1901 
1908 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
1909 
1915 //#define MY_USE_UDP
1916 
1922 #ifndef MY_MAC_ADDRESS
1923 #define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
1924 #endif
1925 
1936 //#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
1937 
1948 //#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
1949  // End of GatewaySettingGrpPub group
1951 
1962 //#define MY_GSM_APN
1967 //#define MY_GSM_BAUDRATE (9600u)
1972 //#define MY_GSM_PIN
1977 //#define MY_GSM_PSW
1982 //#define MY_GSM_RX
1987 //#define MY_GSM_SSID
1992 //#define MY_GSM_TX
1997 //#define MY_GSM_USR
1998  // End of GSMSettingGrpPub group
2000 
2015 //#define MY_DEFAULT_ERR_LED_PIN (6)
2016 
2025 //#define MY_DEFAULT_TX_LED_PIN (7)
2026 
2035 //#define MY_DEFAULT_RX_LED_PIN (8)
2036 
2043 //#define MY_WITH_LEDS_BLINKING_INVERSE
2044 
2049 //#define MY_INDICATION_HANDLER
2050 
2055 #ifndef MY_DEFAULT_LED_BLINK_PERIOD
2056 #define MY_DEFAULT_LED_BLINK_PERIOD 300
2057 #endif
2058  // End of LEDSettingGrpPub group
2059 
2100 //#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
2101 #if defined(MY_SECURITY_SIMPLE_PASSWD)
2102 #define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
2103 #define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
2104 #endif
2105 
2118 //#define MY_DEBUG_VERBOSE_SIGNING
2119 
2149 //#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
2150 #if defined(MY_SIGNING_SIMPLE_PASSWD)
2151 #define MY_SIGNING_SOFT
2152 #define MY_SIGNING_REQUEST_SIGNATURES
2153 #endif
2154 
2159 //#define MY_SIGNING_ATSHA204
2160 
2165 //#define MY_SIGNING_SOFT
2166 
2175 //#define MY_SIGNING_REQUEST_SIGNATURES
2176 
2193 //#define MY_SIGNING_WEAK_SECURITY
2194 
2206 #ifndef MY_VERIFICATION_TIMEOUT_MS
2207 #define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
2208 #endif
2209 
2226 //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
2227 
2232 #ifndef MY_SIGNING_ATSHA204_PIN
2233 #define MY_SIGNING_ATSHA204_PIN (17)
2234 #endif
2235 
2242 #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
2243 #define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
2244 #endif
2245 
2261 //#define MY_LOCK_DEVICE
2262 
2268 #if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
2269 #define MY_SIGNING_FEATURE
2270 #endif
2271  // End of SigningSettingGrpPub group
2272 
2301 //#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
2302 #if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
2303 #ifndef MY_RF24_ENABLE_ENCRYPTION
2304 #define MY_RF24_ENABLE_ENCRYPTION
2305 #endif
2306 #ifndef MY_RFM69_ENABLE_ENCRYPTION
2307 #define MY_RFM69_ENABLE_ENCRYPTION
2308 #endif
2309 #ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
2310 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2311 #endif
2312 #ifndef MY_RFM95_ENABLE_ENCRYPTION
2313 #define MY_RFM95_ENABLE_ENCRYPTION
2314 #endif
2315 #endif
2316 
2323 #if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
2324 #define MY_ENCRYPTION_FEATURE
2325 #endif
2326  // End of EncryptionSettingGrpPub group
2327 
2367 //#define MY_NODE_LOCK_FEATURE
2368 
2377 #ifndef MY_NODE_UNLOCK_PIN
2378 #define MY_NODE_UNLOCK_PIN (14)
2379 #endif
2380 
2387 #ifndef MY_NODE_LOCK_COUNTER_MAX
2388 #define MY_NODE_LOCK_COUNTER_MAX (5)
2389 #endif
2390  // Node lock group // End of SecuritySettingGrpPub group
2392 
2413 #ifndef MY_ESP8266_SERIAL_MODE
2414 #define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2415 #endif
2416  // End of ESP8266SettingGrpPub group
2417 
2425 //
2426 // no ESP32 settings
2427 //
2428  // End of ESP32SettingGrpPub group
2430 
2442 //#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2443 
2448 #ifdef MY_LINUX_SERIAL_PTY
2449 #warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2450 #define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2451 #endif
2452 
2457 #ifdef MY_LINUX_IS_SERIAL_PTY
2458 #warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2459 #define MY_LINUX_SERIAL_IS_PTY
2460 #endif
2461 
2469 //#define MY_LINUX_SERIAL_IS_PTY
2470 
2475 //#define MY_LINUX_SERIAL_GROUPNAME "tty"
2476 
2483 #ifndef MY_LINUX_CONFIG_FILE
2484 #define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2485 #endif
2486  // End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2488 
2489 /*
2490 * "Helper" definitions
2491 */
2492 
2493 /*
2494  * Detect node type
2495  * MY_GATEWAY_FEATURE is set for gateway sketches.
2496  * MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2497  * MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2498  */
2499 #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)
2500 #define MY_GATEWAY_FEATURE
2501 #define MY_IS_GATEWAY (true)
2502 #define MY_NODE_TYPE "GW"
2503 #elif defined(MY_REPEATER_FEATURE)
2504 #define MY_IS_GATEWAY (false)
2505 #define MY_NODE_TYPE "REPEATER"
2506 #elif defined(DOXYGEN)
2507 #define MY_IS_GATEWAY
2508 #define MY_NODE_TYPE
2509 #else
2510 #define MY_IS_GATEWAY (false)
2511 #define MY_NODE_TYPE "NODE"
2512 #endif
2513 
2514 // DEBUG
2515 #if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2516 #undef MY_DEBUG
2517 #endif
2518 #if defined(MY_DEBUG)
2519 // standard debug output
2520 #define MY_DEBUG_VERBOSE_CORE
2521 #define MY_DEBUG_VERBOSE_TRANSPORT
2522 #define MY_DEBUG_VERBOSE_GATEWAY
2523 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2524 #endif
2525 
2526 #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_SX126x) || defined(MY_DEBUG_VERBOSE_TRANSPORT_HAL)
2527 #define DEBUG_OUTPUT_ENABLED
2528 #ifndef MY_DEBUG_OTA
2529 #define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2530 #else
2531 #ifndef MY_OTA_LOG_SENDER_FEATURE
2532 #define MY_OTA_LOG_SENDER_FEATURE
2533 #endif
2534 #ifndef MY_DEBUG_OTA_DISABLE_ECHO
2535 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2536 #else
2537 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2538 #endif
2539 // disable radio related debugging messages
2540 #undef MY_DEBUG_VERBOSE_RF24
2541 #undef MY_DEBUG_VERBOSE_NRF5_ESB
2542 #undef MY_DEBUG_VERBOSE_RFM69
2543 #undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2544 #undef MY_DEBUG_VERBOSE_RFM95
2545 #undef MY_DEBUG_VERBOSE_SX126x
2546 #endif
2547 #else
2548 #define DEBUG_OUTPUT(x,...)
2549 #endif
2550 
2551 // temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2552 #if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2553 #undef MY_RADIO_RF24
2554 #define MY_RADIO_NRF5_ESB
2555 #endif
2556 
2557 // Enable sensor network "feature" if one of the transport types was enabled
2558 #if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RADIO_SX126x) || defined(MY_RS485) || defined(MY_PJON)
2559 #define MY_SENSOR_NETWORK
2560 #endif
2561 
2562 // LEDS
2563 #if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2564 #define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2565 #endif
2566 
2567 #if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2568 #define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2569 #endif
2570 
2571 #if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2572 #define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2573 #endif
2574 
2575 #endif // MyConfig_h
2576 
2577 // Doxygen specific constructs, not included when built normally
2578 // This is used to enable disabled macros/definitions to be included in the documentation as well.
2579 #if DOXYGEN
2580 
2584 #define ARDUINO_ARCH_SAMD
2585 
2590 #define ARDUINO_ARCH_NRF5
2591 
2596 #define ARDUINO_ARCH_ESP8266
2597 
2602 #define ARDUINO_ARCH_ESP32
2603 
2608 #define ARDUINO_ARCH_AVR
2609 
2614 #define ARDUINO_ARCH_MEGAAVR
2615 
2620 #define ARDUINO_ARCH_STM32F1
2621 
2626 #define TEENSYDUINO
2627 
2628 // debug
2629 #define MY_DEBUG
2630 #define MY_DEBUGDEVICE
2631 #define MY_DEBUG_OTA
2632 #define MY_DEBUG_OTA_DISABLE_ECHO
2633 #define MY_SPECIAL_DEBUG
2634 #define MY_DISABLED_SERIAL
2635 #define MY_SPLASH_SCREEN_DISABLED
2636 // linux
2637 #define MY_LINUX_SERIAL_PORT
2638 #define MY_LINUX_SERIAL_IS_PTY
2639 #define MY_LINUX_SERIAL_GROUPNAME
2640 #define MY_LINUX_SERIAL_PTY
2641 #define MY_LINUX_IS_SERIAL_PTY
2642 // inclusion mode
2643 #define MY_INCLUSION_MODE_FEATURE
2644 #define MY_INCLUSION_BUTTON_FEATURE
2645 // OTA logging and debug
2646 #define MY_OTA_LOG_RECEIVER_FEATURE
2647 #define MY_OTA_LOG_SENDER_FEATURE
2648 // transport
2649 #define MY_PARENT_NODE_IS_STATIC
2650 #define MY_REGISTRATION_CONTROLLER
2651 #define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2652 #define MY_TRANSPORT_SANITY_CHECK
2653 #define MY_NODE_LOCK_FEATURE
2654 #define MY_REPEATER_FEATURE
2655 #define MY_PASSIVE_NODE
2656 #define MY_MQTT_CLIENT_PUBLISH_RETAIN
2657 #define MY_MQTT_PASSWORD
2658 #define MY_MQTT_USER
2659 #define MY_MQTT_CLIENT_ID
2660 #define MY_MQTT_PUBLISH_TOPIC_PREFIX
2661 #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2662 #define MY_MQTT_CA_CERT1
2663 #define MY_MQTT_CA_CERT2
2664 #define MY_MQTT_CA_CERT3
2665 #define MY_MQTT_FINGERPRINT
2666 #define MY_MQTT_CLIENT_CERT
2667 #define MY_MQTT_CLIENT_KEY
2668 #define MY_SIGNAL_REPORT_ENABLED
2669 // general
2670 #define MY_WITH_LEDS_BLINKING_INVERSE
2671 #define MY_INDICATION_HANDLER
2672 #define MY_DISABLE_REMOTE_RESET
2673 #define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2674 #define MY_LOCK_DEVICE
2675 #define MY_SLEEP_HANDLER
2676 // core
2677 #define MY_CORE_ONLY
2678 // GW
2679 #define MY_DEBUG_VERBOSE_GATEWAY
2680 #define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2681 #define MY_INCLUSION_LED_PIN
2682 #define MY_GATEWAY_W5100
2683 #define MY_GATEWAY_ENC28J60
2684 #define MY_GATEWAY_ESP8266
2685 #define MY_GATEWAY_ESP32
2686 #define MY_WIFI_SSID
2687 #define MY_WIFI_BSSID
2688 #define MY_WIFI_PASSWORD
2689 #define MY_GATEWAY_LINUX
2690 #define MY_GATEWAY_TINYGSM
2691 #define MY_GATEWAY_MQTT_CLIENT
2692 #define MY_GATEWAY_SERIAL
2693 #define MY_IP_ADDRESS
2694 #define MY_IP_GATEWAY_ADDRESS
2695 #define MY_IP_SUBNET_ADDRESS
2696 #define MY_USE_UDP
2697 #define MY_CONTROLLER_IP_ADDRESS
2698 #define MY_CONTROLLER_URL_ADDRESS
2699 // TinyGSM
2700 #define MY_GSM_APN
2701 #define MY_GSM_BAUDRATE
2702 #define MY_GSM_PIN
2703 #define MY_GSM_PSW
2704 #define MY_GSM_RX
2705 #define MY_GSM_SSID
2706 #define MY_GSM_TX
2707 #define MY_GSM_USR
2708 // LED
2709 #define MY_DEFAULT_ERR_LED_PIN
2710 #define MY_DEFAULT_TX_LED_PIN
2711 #define MY_DEFAULT_RX_LED_PIN
2712 // signing
2713 #define MY_SECURITY_SIMPLE_PASSWD
2714 #define MY_SIGNING_SIMPLE_PASSWD
2715 #define MY_ENCRYPTION_SIMPLE_PASSWD
2716 #define MY_SIGNING_ATSHA204
2717 #define MY_SIGNING_SOFT
2718 #define MY_SIGNING_REQUEST_SIGNATURES
2719 #define MY_SIGNING_WEAK_SECURITY
2720 #define MY_SIGNING_NODE_WHITELISTING
2721 #define MY_DEBUG_VERBOSE_SIGNING
2722 #define MY_SIGNING_FEATURE
2723 #define MY_ENCRYPTION_FEATURE
2724 // FOTA update
2725 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2726 #define MY_OTA_USE_I2C_EEPROM
2727 // RS485
2728 #define MY_RS485
2729 #define MY_RS485_DE_PIN
2730 #define MY_RS485_DE_INVERSE
2731 #define MY_RS485_HWSERIAL
2732 // PJON
2733 #define MY_PJON
2734 #define MY_DEBUG_VERBOSE_PJON
2735 // RF24
2736 #define MY_RADIO_RF24
2737 #define MY_RADIO_NRF24 //deprecated
2738 #define MY_DEBUG_VERBOSE_RF24
2739 #define MY_RF24_POWER_PIN
2740 #define MY_RF24_IRQ_PIN
2741 #define MY_RF24_ENABLE_ENCRYPTION
2742 #define MY_RX_MESSAGE_BUFFER_FEATURE
2743 #define MY_RX_MESSAGE_BUFFER_SIZE
2744 // NRF5_ESB
2745 #define MY_RADIO_NRF5_ESB
2746 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2747 #define MY_DEBUG_VERBOSE_NRF5_ESB
2748 #define MY_NRF5_ESB_REVERSE_ACK_RX
2749 #define MY_NRF5_ESB_REVERSE_ACK_TX
2750 // RFM69
2751 #define MY_RADIO_RFM69
2752 #define MY_IS_RFM69HW
2753 #define MY_RFM69_NEW_DRIVER
2754 #define MY_RFM69_POWER_PIN
2755 #define MY_RFM69_MODEM_CONFIGURATION
2756 #define MY_RFM69_ENABLE_ENCRYPTION
2757 #define MY_RFM69_ATC_MODE_DISABLED
2758 #define MY_RFM69_MAX_POWER_LEVEL_DBM
2759 #define MY_RFM69_RST_PIN
2760 #define MY_DEBUG_VERBOSE_RFM69
2761 #define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2762 // RFM95
2763 #define MY_RADIO_RFM95
2764 #define MY_DEBUG_VERBOSE_RFM95
2765 #define MY_RFM95_ENABLE_ENCRYPTION
2766 #define MY_RFM95_ATC_MODE_DISABLED
2767 #define MY_RFM95_RST_PIN
2768 #define MY_RFM95_MODEM_CONFIGRUATION
2769 #define MY_RFM95_POWER_PIN
2770 #define MY_RFM95_TCXO
2771 #define MY_RFM95_MAX_POWER_LEVEL_DBM
2772 // SX126x
2773 #define MY_RADIO_SX126x
2774 #define MY_SX126x_TCXO_VOLTAGE
2775 #define MY_SX126c_TCXO_STARTUP_DELAY
2776 #define MY_SX126x_USE_TCXO
2777 #define MY_SX126x_USE_DIO2_ANT_SWITCH
2778 #define MY_SX126x_ANT_SWITCH_PIN
2779 #define MY_SX126x_POWER_PIN
2780 #define MY_SX126x_RESET_PIN
2781 #define MY_SX126x_BUSY_PIN
2782 #define MY_SX126x_DISABLE_ATC
2783 #define MY_SX126x_MIN_POWER_LEVEL_DBM
2784 #define MY_SX126x_MAX_POWER_LEVEL_DBM
2785 // SOFT-SPI
2786 #define MY_SOFTSPI
2787 
2792 #define MY_ROUTES_SIZE
2793 
2794 #endif
2795  // End of MyConfig group