MySensors Library & Examples  2.3.2-95-g0c695e3e
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-2026 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 
141 //#define MY_DIAGNOSTICS
142 
150 //#define MY_DIAGNOSTICS
151 
159 //#define MY_DISABLED_SERIAL
160 
168 //#define MY_SPLASH_SCREEN_DISABLED
169 
178 #ifndef MY_BAUD_RATE
179 #define MY_BAUD_RATE (115200ul)
180 #endif
181 
188 #ifndef MY_SERIAL_OUTPUT_SIZE
189 #define MY_SERIAL_OUTPUT_SIZE (120u)
190 #endif
191  // End of SerialDebugGrpPub group
192 
197 //#define MY_DEBUG_VERBOSE_OTA_UPDATE
198 
206 //#define MY_OTA_USE_I2C_EEPROM
207 
208 #ifdef MY_OTA_USE_I2C_EEPROM
209 // I2C address of EEPROM. Wire will shift this left, i.e. 0x50->0xA0
210 #ifndef MY_OTA_I2C_ADDR
211 #define MY_OTA_I2C_ADDR 0x50
212 #endif
213 #endif
214 
215 
234 //#define MY_PJON
235 
240 #ifndef MY_PJON_PIN
241 #define MY_PJON_PIN (12u)
242 #endif
243 
248 //#define MY_DEBUG_VERBOSE_PJON
249 
254 #ifndef MY_PJON_MAX_RETRIES
255 #define MY_PJON_MAX_RETRIES (5u)
256 #endif
257 
258 #ifdef MY_PJON
259 
260 #ifndef PJON_STRATEGY_ALL
261 #define PJON_STRATEGY_BITBANG
262 #endif
263 
264 #define PJON_NOT_ASSIGNED (253u)
265 #define PJON_BROADCAST (255u)
266 
267 #define SWBB_MAX_ATTEMPTS (50u)
268 #define PJON_INCLUDE_SWBB
269 #endif
270  // End of PJONSettingGrpPub group
272 
284 //#define MY_RS485
285 
290 #ifndef MY_RS485_BAUD_RATE
291 #define MY_RS485_BAUD_RATE (9600)
292 #endif
293 
298 #ifndef MY_RS485_MAX_MESSAGE_LENGTH
299 #define MY_RS485_MAX_MESSAGE_LENGTH (40)
300 #endif
301 
306 #ifndef MY_RS485_SOH_COUNT
307 #define MY_RS485_SOH_COUNT (1)
308 #endif
309 
310 
315 //#define MY_RS485_DE_PIN (2)
316 
321 //#define MY_RS485_DE_INVERSE
322 
329 //#define MY_RS485_HWSERIAL (Serial1) // End of RS485SettingGrpPub group
331 
352 // legacy - remove for 3.0.0
358 #ifdef MY_RADIO_NRF24
359 #warning MY_RADIO_NRF24 is deprecated, use MY_RADIO_RF24 instead.
360 #undef MY_RADIO_NRF24
361 #define MY_RADIO_RF24
362 #endif
363 
368 //#define MY_RADIO_RF24
369 
380 //#define MY_RF24_ENABLE_ENCRYPTION
381 
386 //#define MY_DEBUG_VERBOSE_RF24
387 
394 #ifndef MY_RF24_SPI_SPEED
395 #define MY_RF24_SPI_SPEED (2*1000000ul)
396 #endif
397 
402 #ifndef MY_RF24_CE_PIN
403 #define MY_RF24_CE_PIN (DEFAULT_RF24_CE_PIN)
404 #endif
405 
410 #ifndef MY_RF24_CS_PIN
411 #define MY_RF24_CS_PIN (DEFAULT_RF24_CS_PIN)
412 #endif
413 
418 //#define MY_RF24_IRQ_PIN (2)
419 
424 //#define MY_RF24_POWER_PIN (3)
425 
437 //#define MY_RX_MESSAGE_BUFFER_FEATURE
438 
445 #ifdef MY_RX_MESSAGE_BUFFER_FEATURE
446 #ifndef MY_RX_MESSAGE_BUFFER_SIZE
447 #define MY_RX_MESSAGE_BUFFER_SIZE (20)
448 #endif
449 #endif
450 
460 #ifndef MY_RF24_PA_LEVEL
461 #define MY_RF24_PA_LEVEL (RF24_PA_HIGH)
462 #endif
463 
484 #ifndef MY_RF24_CHANNEL
485 #define MY_RF24_CHANNEL (76)
486 #endif
487 
499 #ifndef MY_RF24_DATARATE
500 #define MY_RF24_DATARATE (RF24_250KBPS)
501 #endif
502 
510 #ifndef MY_RF24_BASE_RADIO_ID
511 #define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8
512 #endif
513 
518 #ifndef MY_RF24_ADDR_WIDTH
519 #define MY_RF24_ADDR_WIDTH (5)
520 #endif
521  // End of RF24SettingGrpPub group
522 
544 //#define MY_RADIO_NRF5_ESB
545 
556 //#define MY_NRF5_ESB_ENABLE_ENCRYPTION
557 
562 //#define MY_DEBUG_VERBOSE_NRF5_ESB
563 
573 #ifndef MY_NRF5_ESB_PA_LEVEL
574 #define MY_NRF5_ESB_PA_LEVEL (NRF5_PA_MAX)
575 #endif
576 
597 #ifndef MY_NRF5_ESB_CHANNEL
598 #define MY_NRF5_ESB_CHANNEL (76)
599 #endif
600 
610 #ifndef MY_NRF5_ESB_MODE
611 #ifdef RADIO_MODE_MODE_Nrf_250Kbit
612 #define MY_NRF5_ESB_MODE (NRF5_250KBPS)
613 #else
614 #define MY_NRF5_ESB_MODE (NRF5_1MBPS)
615 #endif
616 #endif
617 
625 #ifndef MY_NRF5_ESB_BASE_RADIO_ID
626 #define MY_NRF5_ESB_BASE_RADIO_ID 0x00, 0xFC, 0xE1, 0xA8, 0xA8
627 #endif
628 
633 #ifndef MY_NRF5_ESB_ADDR_WIDTH
634 #define MY_NRF5_ESB_ADDR_WIDTH (5)
635 #endif
636 
641 #ifndef MY_NRF5_ESB_RX_BUFFER_SIZE
642 #define MY_NRF5_ESB_RX_BUFFER_SIZE (20)
643 #endif
644 
649 //#define MY_NRF5_ESB_REVERSE_ACK_TX
650 
655 //#define MY_NRF5_ESB_REVERSE_ACK_RX // End of NRF5SettingGrpPub group
657 
674 //#define MY_RADIO_RFM69
675 
680 //#define MY_DEBUG_VERBOSE_RFM69
681 
686 //#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
687 
694 //#define MY_RFM69_NEW_DRIVER
695 
711 #ifndef MY_RFM69_FREQUENCY
712 #define MY_RFM69_FREQUENCY (RFM69_868MHZ)
713 #endif
714 
719 //#define MY_IS_RFM69HW
720 
727 #ifdef MY_IS_RFM69HW
728 #define MY_RFM69HW true
729 #else
730 #define MY_RFM69HW false
731 #endif
732 
737 #ifndef MY_RFM69_TX_POWER_DBM
738 #define MY_RFM69_TX_POWER_DBM (5)
739 #endif
740 
745 #ifndef MY_RFM69_ATC_TARGET_RSSI_DBM
746 #define MY_RFM69_ATC_TARGET_RSSI_DBM (-80)
747 #endif
748 
753 //#define MY_RFM69_ATC_MODE_DISABLED
754 
766 //#define MY_RFM69_MAX_POWER_LEVEL_DBM (10u)
767 
772 #ifndef MY_RFM69_NETWORKID
773 #define MY_RFM69_NETWORKID (100)
774 #endif
775 
780 //#define MY_RFM69_RST_PIN (9)
781 
782 #ifdef MY_RF69_RESET
783 #warning MY_RF69_RESET is depreciated, please use MY_RFM69_RST_PIN instead.
784 #define MY_RFM69_RST_PIN MY_RF69_RESET
785 #endif
786 
791 //#define MY_RFM69_POWER_PIN (3)
792 
797 #ifndef MY_RFM69_IRQ_PIN
798 #ifdef MY_RF69_IRQ_PIN
799 #warning MY_RF69_IRQ_PIN is depreciated, please use MY_RFM69_IRQ_PIN instead.
800 #define MY_RFM69_IRQ_PIN MY_RF69_IRQ_PIN
801 #else
802 #define MY_RFM69_IRQ_PIN DEFAULT_RFM69_IRQ_PIN
803 #endif
804 #endif
805 
810 #ifndef MY_RFM69_IRQ_NUM
811 #ifdef MY_RF69_IRQ_NUM
812 #warning MY_RF69_IRQ_NUM is depreciated, please use MY_RFM69_IRQ_NUM instead.
813 #define MY_RFM69_IRQ_NUM MY_RF69_IRQ_NUM
814 #else
815 #define MY_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN)
816 #endif
817 #endif
818 
823 #ifndef MY_RFM69_CS_PIN
824 #ifdef MY_RF69_SPI_CS
825 #warning MY_RF69_SPI_CS is depreciated, please use MY_RFM69_CS_PIN instead.
826 #define MY_RFM69_CS_PIN MY_RF69_SPI_CS
827 #else
828 #define MY_RFM69_CS_PIN DEFAULT_RFM69_CS_PIN
829 #endif
830 #endif
831 
836 #ifndef MY_RFM69_SPI_SPEED
837 #define MY_RFM69_SPI_SPEED (4*1000000ul) // datasheet says 10Mhz max.
838 #endif
839 
848 //#define MY_RFM69_ENABLE_ENCRYPTION
849 
870 //#define MY_RFM69_MODEM_CONFIGURATION (RFM69_FSK_BR55_5_FD50)
871 
872  // End of RFM69SettingGrpPub group
874 
889 //#define MY_RADIO_RFM95
890 
895 //#define MY_DEBUG_VERBOSE_RFM95
896 
907 //#define MY_RFM95_ENABLE_ENCRYPTION
908 
923 #ifndef MY_RFM95_FREQUENCY
924 #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
925 #endif
926 
943 #ifndef MY_RFM95_MODEM_CONFIGRUATION
944 #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
945 #endif
946 
951 //#define MY_RFM95_RST_PIN (9)
952 
957 //#define MY_RFM95_POWER_PIN (3)
958 
963 #ifndef MY_RFM95_IRQ_PIN
964 #define MY_RFM95_IRQ_PIN DEFAULT_RFM95_IRQ_PIN
965 #endif
966 
971 #ifndef MY_RFM95_IRQ_NUM
972 #define MY_RFM95_IRQ_NUM digitalPinToInterrupt(MY_RFM95_IRQ_PIN)
973 #endif
974 
979 #ifndef MY_RFM95_CS_PIN
980 #define MY_RFM95_CS_PIN DEFAULT_RFM95_CS_PIN
981 #endif
982 
987 #ifndef MY_RFM95_SPI_SPEED
988 #define MY_RFM95_SPI_SPEED (4*1000000ul)
989 #endif
990 
997 #ifndef MY_RFM95_TX_POWER_DBM
998 #define MY_RFM95_TX_POWER_DBM (13u) // 20mW
999 #endif
1000 
1005 //#define MY_RFM95_ATC_MODE_DISABLED
1006 
1011 #ifndef MY_RFM95_ATC_TARGET_RSSI
1012 #define MY_RFM95_ATC_TARGET_RSSI (-70)
1013 #endif
1014 
1026 //#define MY_RFM95_MAX_POWER_LEVEL_DBM (10u)
1027 
1034 //#define MY_RFM95_TCXO // End of RFM95SettingGrpPub group
1036 
1052 //#define MY_RADIO_SX126x
1053 
1058 #ifndef MY_SX126x_CS_PIN
1059 #define MY_SX126x_CS_PIN DEFAULT_SX126x_CS_PIN
1060 #endif
1061 
1066 #ifndef MY_SX126x_IRQ_PIN
1067 #define MY_SX126x_IRQ_PIN DEFAULT_SX126x_IRQ_PIN
1068 #endif
1069 
1074 #ifndef MY_SX126x_IRQ_NUM
1075 #define MY_SX126x_IRQ_NUM digitalPinToInterrupt(DEFAULT_SX126x_IRQ_PIN)
1076 #endif
1077 
1092 #ifndef MY_SX126x_FREQUENCY
1093 #define MY_SX126x_FREQUENCY (SX126x_868MHZ)
1094 #endif
1095 
1105 #ifndef MY_SX126x_LORA_SF
1106 #define MY_SX126x_LORA_SF LORA_SF7
1107 #endif
1108 
1129 #ifndef MY_SX126x_LORA_BW
1130 #define MY_SX126x_LORA_BW LORA_BW_125
1131 #endif
1132 
1147 #ifndef MY_SX126x_LORA_CR
1148 #define MY_SX126x_LORA_CR LORA_CR_4_5
1149 #endif
1150 
1168 //#define MY_SX126x_TCXO_VOLTAGE (SX126x_TCXO_3V3)
1169 
1170 
1178 #if !defined(MY_SX126c_TCXO_STARTUP_DELAY) && defined(MY_SX126x_TCXO_VOLTAGE)
1179 #define MY_SX126c_TCXO_STARTUP_DELAY (10)
1180 #endif
1181 
1188 #if !defined(MY_SX126x_USE_TCXO) && defined(MY_SX126x_TCXO_VOLTAGE)
1189 #define MY_SX126x_USE_TCXO
1190 #endif
1191 
1196 //#define MY_SX126x_USE_DIO2_ANT_SWITCH
1197 
1205 //#define MY_SX126x_ANT_SWITCH_PIN (GPIO3)
1206 
1215 #if !defined(MY_SX126x_VARIANT)
1216 #define MY_SX126x_VARIANT (1)
1217 #endif
1218 
1223 //#define MY_SX126x_POWER_PIN (3)
1224 
1229 //#define MY_SX126x_RESET_PIN (47)
1230 
1235 //#define MY_SX126x_BUSY_PIN (39)
1236 
1241 //#define MY_SX126x_DISABLE_ATC
1242 
1247 #ifndef MY_SX126x_ATC_TARGET_DBM
1248 #define MY_SX126x_ATC_TARGET_DBM (-70)
1249 #endif
1250 
1257 #ifndef MY_SX126x_MAX_POWER_LEVEL_DBM
1258 #define MY_SX126x_MAX_POWER_LEVEL_DBM (20)
1259 #endif
1260 
1265 #ifndef MY_SX126x_MIN_POWER_LEVEL_DBM
1266 #define MY_SX126x_MIN_POWER_LEVEL_DBM (-3)
1267 #endif
1268  // End of SX126xSettingGrpPub group
1270 
1285 //#define MY_RADIO_CC1101
1286 
1291 #ifndef MY_CC1101_CS_PIN
1292 #define MY_CC1101_CS_PIN DEFAULT_CC1101_CS_PIN
1293 #endif
1294 
1299 #ifndef MY_CC1101_GD0_PIN
1300 #define MY_CC1101_GD0_PIN DEFAULT_CC1101_GD0_PIN
1301 #endif
1302 #define MY_CC1101_GD0_NUM digitalPinToInterrupt(MY_CC1101_GD0_PIN)
1303 
1316 #ifndef MY_CC1101_FREQUENCY
1317 #define MY_CC1101_FREQUENCY (CC1101_433MHZ)
1318 #endif
1319 
1330 #ifndef MY_CC1101_CHANNEL
1331 #define MY_CC1101_CHANNEL 4
1332 #endif
1333 
1343 //#define MY_CC1101_SYNC_WORD 0xF543
1344 
1360 //#define MY_CC1101_MODEM_CONFIGURATION CC1101_MODEM_M_BR38_4_FD20
1361 
1378 //#define MY_CC1101_POWER_LEVEL CC1101_POWER_AUTO
1379 
1384 #ifndef MY_CC1101_ATC_TARGET_DBM
1385 #define MY_CC1101_ATC_TARGET_DBM (-50)
1386 #endif
1387 
1394 //#define MY_CC1101_MAX_POWER_LEVEL (7)
1395 
1400 //#define MY_CC1101_MIN_POWER_LEVEL (0)
1401  // End of CC1101SettingGrpPub group
1403 
1404 
1405 
1423 //#define MY_SOFTSPI
1424 
1429 #ifndef MY_SOFT_SPI_SCK_PIN
1430 #define MY_SOFT_SPI_SCK_PIN (14)
1431 #endif
1432 
1437 #ifndef MY_SOFT_SPI_MISO_PIN
1438 #define MY_SOFT_SPI_MISO_PIN (16)
1439 #endif
1440 
1445 #ifndef MY_SOFT_SPI_MOSI_PIN
1446 #define MY_SOFT_SPI_MOSI_PIN (15)
1447 #endif
1448  // End of SoftSpiSettingGrpPub group
1449  // End of TransportSettingGrpPub group
1451 
1472 #ifndef MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
1473 #define MY_RAM_ROUTING_TABLE_FEATURE
1474 #endif
1475 
1480 #ifndef MY_ROUTING_TABLE_SAVE_INTERVAL_MS
1481 #define MY_ROUTING_TABLE_SAVE_INTERVAL_MS (30*60*1000ul)
1482 #endif
1483 
1490 //#define MY_REPEATER_FEATURE
1491 
1501 //#define MY_PASSIVE_NODE
1502 
1507 #ifndef MY_NODE_ID
1508 #define MY_NODE_ID (AUTO)
1509 #endif
1510 
1515 #ifndef MY_PARENT_NODE_ID
1516 #define MY_PARENT_NODE_ID (AUTO)
1517 #endif
1518 
1523 //#define MY_PARENT_NODE_IS_STATIC
1524 
1531 //#define MY_TRANSPORT_SANITY_CHECK
1532 
1537 #ifndef MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS
1538 #define MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS (15*60*1000ul)
1539 #endif
1540 
1544 #ifndef MY_TRANSPORT_DISCOVERY_INTERVAL_MS
1545 #define MY_TRANSPORT_DISCOVERY_INTERVAL_MS (20*60*1000ul)
1546 #endif
1547 
1552 //#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
1553 
1558 //#define MY_TRANSPORT_MAX_TX_FAILURES (10u)
1559 
1564 #ifndef MY_TRANSPORT_WAIT_READY_MS
1565 #define MY_TRANSPORT_WAIT_READY_MS (0)
1566 #endif
1567 
1573 //#define MY_SIGNAL_REPORT_ENABLED
1574  // End of RoutingNodeSettingGrpPub group
1576 
1589 #define MY_REGISTRATION_FEATURE
1590 
1596 #ifndef MY_REGISTRATION_RETRIES
1597 #define MY_REGISTRATION_RETRIES (3u)
1598 #endif
1599 
1605 #define MY_REGISTRATION_DEFAULT (true)
1606 
1611 //#define MY_REGISTRATION_CONTROLLER // End of RegistrationSettingGrpPub group
1613 
1624 //#define MY_CORE_ONLY
1625 
1631 #define MY_CORE_COMPATIBILITY_CHECK
1632  // End of CoreSettingGrpPub group
1633 
1644 #ifndef MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS
1645 #define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS (10*1000ul)
1646 #endif
1647 
1655 #ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
1656 #define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
1657 #endif
1658 
1667 //#define MY_SLEEP_HANDLER // End of SleepSettingGrpPub group
1669 
1685 //#define MY_OTA_FIRMWARE_FEATURE
1686 
1691 #ifndef MY_OTA_FLASH_SS
1692 #define MY_OTA_FLASH_SS (8)
1693 #endif
1694 
1699 #ifndef MY_OTA_FLASH_JDECID
1700 #define MY_OTA_FLASH_JDECID (0x1F65)
1701 #endif
1702 
1707 //#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1709 
1720 #ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1721 #define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1722 #endif
1723 
1728 #ifndef MY_GATEWAY_MAX_SEND_LENGTH
1729 #define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1730 #endif
1731 
1736 #ifndef MY_GATEWAY_MAX_CLIENTS
1737 #define MY_GATEWAY_MAX_CLIENTS (1u)
1738 #endif
1739 
1744 //#define MY_INCLUSION_MODE_FEATURE
1745 
1752 //#define MY_INCLUSION_BUTTON_FEATURE
1753 
1754 // Disable inclusion mode button if inclusion mode feature is not enabled
1755 #ifndef MY_INCLUSION_MODE_FEATURE
1756 #undef MY_INCLUSION_BUTTON_FEATURE
1757 #endif
1758 
1766 //#define MY_INCLUSION_LED_PIN (7)
1767 
1772 #ifndef MY_INCLUSION_MODE_BUTTON_PIN
1773 #if defined(ARDUINO_ARCH_ESP8266)
1774 #define MY_INCLUSION_MODE_BUTTON_PIN (5)
1775 #else
1776 #define MY_INCLUSION_MODE_BUTTON_PIN (3)
1777 #endif
1778 #endif
1779 
1784 #ifndef MY_INCLUSION_MODE_DURATION
1785 #define MY_INCLUSION_MODE_DURATION (60)
1786 #endif
1787 
1798 #if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1799 #define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1800 #else
1801 #define MY_INCLUSION_BUTTON_PRESSED (LOW)
1802 #endif
1803 
1804 /**************************************
1805 * Ethernet Gateway Transport Defaults
1806 ***************************************/
1827 // The gateway options available
1828 //#define MY_GATEWAY_W5100
1829 //#define MY_GATEWAY_ENC28J60
1830 //#define MY_GATEWAY_ESP8266
1831 //#define MY_GATEWAY_ESP8266_SECURE
1832 //#define MY_GATEWAY_ESP32
1833 //#define MY_GATEWAY_LINUX
1834 //#define MY_GATEWAY_TINYGSM
1835 //#define MY_GATEWAY_MQTT_CLIENT
1836 //#define MY_GATEWAY_SERIAL
1837 
1838 
1843 //#define MY_DEBUG_VERBOSE_GATEWAY
1844 
1849 //#define MY_WIFI_SSID "MySSID"
1850 
1855 #ifndef MY_WIFI_BSSID
1856 #define MY_WIFI_BSSID NULL
1857 #endif
1858 
1863 //#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1864 
1869 #ifndef MY_HOSTNAME
1870 #define MY_HOSTNAME "MYSENSORS_DEVICE"
1871 #endif
1872 
1877 #ifndef MY_PORT
1878 #ifdef MY_GATEWAY_MQTT_CLIENT
1879 #define MY_PORT 1883
1880 #else
1881 #define MY_PORT 5003
1882 #endif
1883 #endif
1884 
1889 //#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1890 
1899 //#define MY_MQTT_PASSWORD "secretpassword"
1900 
1909 //#define MY_MQTT_USER "username"
1910 
1918 //#define MY_MQTT_CLIENT_ID "mysensors-1"
1919 
1927 //#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1928 
1936 //#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1937 
1973 //#define MY_MQTT_CA_CERT1
1974 
1979 //#define MY_MQTT_CA_CERT2
1980 
1985 //#define MY_MQTT_CA_CERT3
1986 
1987 
2005 //#define MY_MQTT_FINGERPRINT
2006 
2024 //#define MY_MQTT_CLIENT_CERT
2025 
2043 //#define MY_MQTT_CLIENT_KEY
2044 
2051 //#define MY_IP_ADDRESS 192,168,178,66
2052 
2059 //#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
2060 
2067 //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
2068 
2074 //#define MY_USE_UDP
2075 
2081 #ifndef MY_MAC_ADDRESS
2082 #define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
2083 #endif
2084 
2095 //#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
2096 
2107 //#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
2108  // End of GatewaySettingGrpPub group
2110 
2121 //#define MY_GSM_APN
2126 //#define MY_GSM_BAUDRATE (9600u)
2131 //#define MY_GSM_PIN
2136 //#define MY_GSM_PSW
2141 //#define MY_GSM_RX
2146 //#define MY_GSM_SSID
2151 //#define MY_GSM_TX
2156 //#define MY_GSM_USR
2157  // End of GSMSettingGrpPub group
2159 
2174 //#define MY_DEFAULT_ERR_LED_PIN (6)
2175 
2184 //#define MY_DEFAULT_TX_LED_PIN (7)
2185 
2194 //#define MY_DEFAULT_RX_LED_PIN (8)
2195 
2202 //#define MY_WITH_LEDS_BLINKING_INVERSE
2203 
2208 //#define MY_INDICATION_HANDLER
2209 
2214 #ifndef MY_DEFAULT_LED_BLINK_PERIOD
2215 #define MY_DEFAULT_LED_BLINK_PERIOD 300
2216 #endif
2217  // End of LEDSettingGrpPub group
2218 
2259 //#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
2260 #if defined(MY_SECURITY_SIMPLE_PASSWD)
2261 #define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
2262 #define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
2263 #endif
2264 
2277 //#define MY_DEBUG_VERBOSE_SIGNING
2278 
2308 //#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
2309 #if defined(MY_SIGNING_SIMPLE_PASSWD)
2310 #define MY_SIGNING_SOFT
2311 #define MY_SIGNING_REQUEST_SIGNATURES
2312 #endif
2313 
2318 //#define MY_SIGNING_ATSHA204
2319 
2324 //#define MY_SIGNING_SOFT
2325 
2334 //#define MY_SIGNING_REQUEST_SIGNATURES
2335 
2352 //#define MY_SIGNING_WEAK_SECURITY
2353 
2365 #ifndef MY_VERIFICATION_TIMEOUT_MS
2366 #define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
2367 #endif
2368 
2385 //#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
2386 
2391 #ifndef MY_SIGNING_ATSHA204_PIN
2392 #define MY_SIGNING_ATSHA204_PIN (17)
2393 #endif
2394 
2401 #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
2402 #define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
2403 #endif
2404 
2420 //#define MY_LOCK_DEVICE
2421 
2427 #if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
2428 #define MY_SIGNING_FEATURE
2429 #endif
2430  // End of SigningSettingGrpPub group
2431 
2460 //#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
2461 #if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
2462 #ifndef MY_RF24_ENABLE_ENCRYPTION
2463 #define MY_RF24_ENABLE_ENCRYPTION
2464 #endif
2465 #ifndef MY_RFM69_ENABLE_ENCRYPTION
2466 #define MY_RFM69_ENABLE_ENCRYPTION
2467 #endif
2468 #ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
2469 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2470 #endif
2471 #ifndef MY_RFM95_ENABLE_ENCRYPTION
2472 #define MY_RFM95_ENABLE_ENCRYPTION
2473 #endif
2474 #endif
2475 
2482 #if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
2483 #define MY_ENCRYPTION_FEATURE
2484 #endif
2485  // End of EncryptionSettingGrpPub group
2486 
2526 //#define MY_NODE_LOCK_FEATURE
2527 
2536 #ifndef MY_NODE_UNLOCK_PIN
2537 #define MY_NODE_UNLOCK_PIN (14)
2538 #endif
2539 
2546 #ifndef MY_NODE_LOCK_COUNTER_MAX
2547 #define MY_NODE_LOCK_COUNTER_MAX (5)
2548 #endif
2549  // Node lock group // End of SecuritySettingGrpPub group
2551 
2572 #ifndef MY_ESP8266_SERIAL_MODE
2573 #define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2574 #endif
2575  // End of ESP8266SettingGrpPub group
2576 
2584 //
2585 // no ESP32 settings
2586 //
2587  // End of ESP32SettingGrpPub group
2589 
2601 //#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2602 
2607 #ifdef MY_LINUX_SERIAL_PTY
2608 #warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2609 #define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2610 #endif
2611 
2616 #ifdef MY_LINUX_IS_SERIAL_PTY
2617 #warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2618 #define MY_LINUX_SERIAL_IS_PTY
2619 #endif
2620 
2628 //#define MY_LINUX_SERIAL_IS_PTY
2629 
2634 //#define MY_LINUX_SERIAL_GROUPNAME "tty"
2635 
2642 #ifndef MY_LINUX_CONFIG_FILE
2643 #define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2644 #endif
2645  // End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2647 
2648 /*
2649 * "Helper" definitions
2650 */
2651 
2652 /*
2653  * Detect node type
2654  * MY_GATEWAY_FEATURE is set for gateway sketches.
2655  * MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2656  * MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2657  */
2658 #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)
2659 #define MY_GATEWAY_FEATURE
2660 #define MY_IS_GATEWAY (true)
2661 #define MY_NODE_TYPE "GW"
2662 #elif defined(MY_REPEATER_FEATURE)
2663 #define MY_IS_GATEWAY (false)
2664 #define MY_NODE_TYPE "REPEATER"
2665 #elif defined(DOXYGEN)
2666 #define MY_IS_GATEWAY
2667 #define MY_NODE_TYPE
2668 #else
2669 #define MY_IS_GATEWAY (false)
2670 #define MY_NODE_TYPE "NODE"
2671 #endif
2672 
2673 // DEBUG
2674 #if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2675 #undef MY_DEBUG
2676 #endif
2677 #if defined(MY_DEBUG)
2678 // standard debug output
2679 #define MY_DEBUG_VERBOSE_CORE
2680 #define MY_DEBUG_VERBOSE_TRANSPORT
2681 #define MY_DEBUG_VERBOSE_GATEWAY
2682 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2683 #endif
2684 
2685 #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)
2686 #define DEBUG_OUTPUT_ENABLED
2687 #ifndef MY_DEBUG_OTA
2688 #define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2689 #else
2690 #ifndef MY_OTA_LOG_SENDER_FEATURE
2691 #define MY_OTA_LOG_SENDER_FEATURE
2692 #endif
2693 #ifndef MY_DEBUG_OTA_DISABLE_ECHO
2694 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2695 #else
2696 #define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2697 #endif
2698 // disable radio related debugging messages
2699 #undef MY_DEBUG_VERBOSE_RF24
2700 #undef MY_DEBUG_VERBOSE_NRF5_ESB
2701 #undef MY_DEBUG_VERBOSE_RFM69
2702 #undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2703 #undef MY_DEBUG_VERBOSE_RFM95
2704 #undef MY_DEBUG_VERBOSE_SX126x
2705 #endif
2706 #else
2707 #define DEBUG_OUTPUT(x,...)
2708 #endif
2709 
2710 // temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2711 #if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2712 #undef MY_RADIO_RF24
2713 #define MY_RADIO_NRF5_ESB
2714 #endif
2715 
2716 // Enable sensor network "feature" if one of the transport types was enabled
2717 #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) || defined(MY_RADIO_CC1101)
2718 #define MY_SENSOR_NETWORK
2719 #endif
2720 
2721 // LEDS
2722 #if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2723 #define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2724 #endif
2725 
2726 #if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2727 #define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2728 #endif
2729 
2730 #if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2731 #define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2732 #endif
2733 
2734 #endif // MyConfig_h
2735 
2736 // Doxygen specific constructs, not included when built normally
2737 // This is used to enable disabled macros/definitions to be included in the documentation as well.
2738 #if DOXYGEN
2739 
2743 #define ARDUINO_ARCH_SAMD
2744 
2749 #define ARDUINO_ARCH_NRF5
2750 
2755 #define ARDUINO_ARCH_ESP8266
2756 
2761 #define ARDUINO_ARCH_ESP32
2762 
2767 #define ARDUINO_ARCH_AVR
2768 
2773 #define ARDUINO_ARCH_MEGAAVR
2774 
2779 #define ARDUINO_ARCH_STM32
2780 
2785 #define TEENSYDUINO
2786 
2787 // debug
2788 #define MY_DEBUG
2789 #define MY_DEBUGDEVICE
2790 #define MY_DEBUG_OTA
2791 #define MY_DEBUG_OTA_DISABLE_ECHO
2792 #define MY_SPECIAL_DEBUG
2793 #define MY_DISABLED_SERIAL
2794 #define MY_SPLASH_SCREEN_DISABLED
2795 #define MY_DIAGNOSTICS
2796 #define MY_DIAGNOSTICS_CRYPTO
2797 // linux
2798 #define MY_LINUX_SERIAL_PORT
2799 #define MY_LINUX_SERIAL_IS_PTY
2800 #define MY_LINUX_SERIAL_GROUPNAME
2801 #define MY_LINUX_SERIAL_PTY
2802 #define MY_LINUX_IS_SERIAL_PTY
2803 // inclusion mode
2804 #define MY_INCLUSION_MODE_FEATURE
2805 #define MY_INCLUSION_BUTTON_FEATURE
2806 // OTA logging and debug
2807 #define MY_OTA_LOG_RECEIVER_FEATURE
2808 #define MY_OTA_LOG_SENDER_FEATURE
2809 // transport
2810 #define MY_PARENT_NODE_IS_STATIC
2811 #define MY_REGISTRATION_CONTROLLER
2812 #define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2813 #define MY_TRANSPORT_SANITY_CHECK
2814 #define MY_NODE_LOCK_FEATURE
2815 #define MY_REPEATER_FEATURE
2816 #define MY_PASSIVE_NODE
2817 #define MY_MQTT_CLIENT_PUBLISH_RETAIN
2818 #define MY_MQTT_PASSWORD
2819 #define MY_MQTT_USER
2820 #define MY_MQTT_CLIENT_ID
2821 #define MY_MQTT_PUBLISH_TOPIC_PREFIX
2822 #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2823 #define MY_MQTT_CA_CERT1
2824 #define MY_MQTT_CA_CERT2
2825 #define MY_MQTT_CA_CERT3
2826 #define MY_MQTT_FINGERPRINT
2827 #define MY_MQTT_CLIENT_CERT
2828 #define MY_MQTT_CLIENT_KEY
2829 #define MY_SIGNAL_REPORT_ENABLED
2830 // general
2831 #define MY_WITH_LEDS_BLINKING_INVERSE
2832 #define MY_INDICATION_HANDLER
2833 #define MY_DISABLE_REMOTE_RESET
2834 #define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2835 #define MY_LOCK_DEVICE
2836 #define MY_SLEEP_HANDLER
2837 // core
2838 #define MY_CORE_ONLY
2839 // GW
2840 #define MY_DEBUG_VERBOSE_GATEWAY
2841 #define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2842 #define MY_INCLUSION_LED_PIN
2843 #define MY_GATEWAY_W5100
2844 #define MY_GATEWAY_ENC28J60
2845 #define MY_GATEWAY_ESP8266
2846 #define MY_GATEWAY_ESP32
2847 #define MY_WIFI_SSID
2848 #define MY_WIFI_BSSID
2849 #define MY_WIFI_PASSWORD
2850 #define MY_GATEWAY_LINUX
2851 #define MY_GATEWAY_TINYGSM
2852 #define MY_GATEWAY_MQTT_CLIENT
2853 #define MY_GATEWAY_SERIAL
2854 #define MY_IP_ADDRESS
2855 #define MY_IP_GATEWAY_ADDRESS
2856 #define MY_IP_SUBNET_ADDRESS
2857 #define MY_USE_UDP
2858 #define MY_CONTROLLER_IP_ADDRESS
2859 #define MY_CONTROLLER_URL_ADDRESS
2860 // TinyGSM
2861 #define MY_GSM_APN
2862 #define MY_GSM_BAUDRATE
2863 #define MY_GSM_PIN
2864 #define MY_GSM_PSW
2865 #define MY_GSM_RX
2866 #define MY_GSM_SSID
2867 #define MY_GSM_TX
2868 #define MY_GSM_USR
2869 // LED
2870 #define MY_DEFAULT_ERR_LED_PIN
2871 #define MY_DEFAULT_TX_LED_PIN
2872 #define MY_DEFAULT_RX_LED_PIN
2873 // signing
2874 #define MY_SECURITY_SIMPLE_PASSWD
2875 #define MY_SIGNING_SIMPLE_PASSWD
2876 #define MY_ENCRYPTION_SIMPLE_PASSWD
2877 #define MY_SIGNING_ATSHA204
2878 #define MY_SIGNING_SOFT
2879 #define MY_SIGNING_REQUEST_SIGNATURES
2880 #define MY_SIGNING_WEAK_SECURITY
2881 #define MY_SIGNING_NODE_WHITELISTING
2882 #define MY_DEBUG_VERBOSE_SIGNING
2883 #define MY_SIGNING_FEATURE
2884 #define MY_ENCRYPTION_FEATURE
2885 // FOTA update
2886 #define MY_DEBUG_VERBOSE_OTA_UPDATE
2887 #define MY_OTA_USE_I2C_EEPROM
2888 // RS485
2889 #define MY_RS485
2890 #define MY_RS485_DE_PIN
2891 #define MY_RS485_DE_INVERSE
2892 #define MY_RS485_HWSERIAL
2893 // PJON
2894 #define MY_PJON
2895 #define MY_DEBUG_VERBOSE_PJON
2896 // RF24
2897 #define MY_RADIO_RF24
2898 #define MY_RADIO_NRF24 //deprecated
2899 #define MY_DEBUG_VERBOSE_RF24
2900 #define MY_RF24_POWER_PIN
2901 #define MY_RF24_IRQ_PIN
2902 #define MY_RF24_ENABLE_ENCRYPTION
2903 #define MY_RX_MESSAGE_BUFFER_FEATURE
2904 #define MY_RX_MESSAGE_BUFFER_SIZE
2905 // NRF5_ESB
2906 #define MY_RADIO_NRF5_ESB
2907 #define MY_NRF5_ESB_ENABLE_ENCRYPTION
2908 #define MY_DEBUG_VERBOSE_NRF5_ESB
2909 #define MY_NRF5_ESB_REVERSE_ACK_RX
2910 #define MY_NRF5_ESB_REVERSE_ACK_TX
2911 // RFM69
2912 #define MY_RADIO_RFM69
2913 #define MY_IS_RFM69HW
2914 #define MY_RFM69_NEW_DRIVER
2915 #define MY_RFM69_POWER_PIN
2916 #define MY_RFM69_MODEM_CONFIGURATION
2917 #define MY_RFM69_ENABLE_ENCRYPTION
2918 #define MY_RFM69_ATC_MODE_DISABLED
2919 #define MY_RFM69_MAX_POWER_LEVEL_DBM
2920 #define MY_RFM69_RST_PIN
2921 #define MY_DEBUG_VERBOSE_RFM69
2922 #define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2923 // RFM95
2924 #define MY_RADIO_RFM95
2925 #define MY_DEBUG_VERBOSE_RFM95
2926 #define MY_RFM95_ENABLE_ENCRYPTION
2927 #define MY_RFM95_ATC_MODE_DISABLED
2928 #define MY_RFM95_RST_PIN
2929 #define MY_RFM95_MODEM_CONFIGRUATION
2930 #define MY_RFM95_POWER_PIN
2931 #define MY_RFM95_TCXO
2932 #define MY_RFM95_MAX_POWER_LEVEL_DBM
2933 // SX126x
2934 #define MY_RADIO_SX126x
2935 #define MY_SX126x_TCXO_VOLTAGE
2936 #define MY_SX126c_TCXO_STARTUP_DELAY
2937 #define MY_SX126x_USE_TCXO
2938 #define MY_SX126x_USE_DIO2_ANT_SWITCH
2939 #define MY_SX126x_ANT_SWITCH_PIN
2940 #define MY_SX126x_POWER_PIN
2941 #define MY_SX126x_RESET_PIN
2942 #define MY_SX126x_BUSY_PIN
2943 #define MY_SX126x_DISABLE_ATC
2944 #define MY_SX126x_MIN_POWER_LEVEL_DBM
2945 #define MY_SX126x_MAX_POWER_LEVEL_DBM
2946 // SOFT-SPI
2947 #define MY_SOFTSPI
2948 
2953 #define MY_ROUTES_SIZE
2954 
2955 #endif
2956  // End of MyConfig group