MySensors Library & Examples
2.3.2-121-g2834d0f8
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
528
//#define MY_RF24_INVERTED_ACK
529
541
#ifndef MY_RF24_DATARATE
542
#define MY_RF24_DATARATE (RF24_250KBPS)
543
#endif
544
552
#ifndef MY_RF24_BASE_RADIO_ID
553
#define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8
554
#endif
555
560
#ifndef MY_RF24_ADDR_WIDTH
561
#define MY_RF24_ADDR_WIDTH (5)
562
#endif
563
// End of RF24SettingGrpPub group
564
586
//#define MY_RADIO_NRF5_ESB
587
598
//#define MY_NRF5_ESB_ENABLE_ENCRYPTION
599
604
//#define MY_DEBUG_VERBOSE_NRF5_ESB
605
615
#ifndef MY_NRF5_ESB_PA_LEVEL
616
#define MY_NRF5_ESB_PA_LEVEL (NRF5_PA_MAX)
617
#endif
618
639
#ifndef MY_NRF5_ESB_CHANNEL
640
#define MY_NRF5_ESB_CHANNEL (76)
641
#endif
642
652
#ifndef MY_NRF5_ESB_MODE
653
#ifdef RADIO_MODE_MODE_Nrf_250Kbit
654
#define MY_NRF5_ESB_MODE (NRF5_250KBPS)
655
#else
656
#define MY_NRF5_ESB_MODE (NRF5_1MBPS)
657
#endif
658
#endif
659
667
#ifndef MY_NRF5_ESB_BASE_RADIO_ID
668
#define MY_NRF5_ESB_BASE_RADIO_ID 0x00, 0xFC, 0xE1, 0xA8, 0xA8
669
#endif
670
675
#ifndef MY_NRF5_ESB_ADDR_WIDTH
676
#define MY_NRF5_ESB_ADDR_WIDTH (5)
677
#endif
678
683
#ifndef MY_NRF5_ESB_RX_BUFFER_SIZE
684
#define MY_NRF5_ESB_RX_BUFFER_SIZE (20)
685
#endif
686
691
//#define MY_NRF5_ESB_REVERSE_ACK_TX
692
697
//#define MY_NRF5_ESB_REVERSE_ACK_RX // End of NRF5SettingGrpPub group
699
716
//#define MY_RADIO_RFM69
717
722
//#define MY_DEBUG_VERBOSE_RFM69
723
728
//#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
729
736
//#define MY_RFM69_NEW_DRIVER
737
753
#ifndef MY_RFM69_FREQUENCY
754
#define MY_RFM69_FREQUENCY (RFM69_868MHZ)
755
#endif
756
761
//#define MY_IS_RFM69HW
762
769
#ifdef MY_IS_RFM69HW
770
#define MY_RFM69HW true
771
#else
772
#define MY_RFM69HW false
773
#endif
774
779
#ifndef MY_RFM69_TX_POWER_DBM
780
#define MY_RFM69_TX_POWER_DBM (5)
781
#endif
782
787
#ifndef MY_RFM69_ATC_TARGET_RSSI_DBM
788
#define MY_RFM69_ATC_TARGET_RSSI_DBM (-80)
789
#endif
790
795
//#define MY_RFM69_ATC_MODE_DISABLED
796
808
//#define MY_RFM69_MAX_POWER_LEVEL_DBM (10u)
809
814
#ifndef MY_RFM69_NETWORKID
815
#define MY_RFM69_NETWORKID (100)
816
#endif
817
822
//#define MY_RFM69_RST_PIN (9)
823
824
#ifdef MY_RF69_RESET
825
#warning MY_RF69_RESET is depreciated, please use MY_RFM69_RST_PIN instead.
826
#define MY_RFM69_RST_PIN MY_RF69_RESET
827
#endif
828
833
//#define MY_RFM69_POWER_PIN (3)
834
839
#ifndef MY_RFM69_IRQ_PIN
840
#ifdef MY_RF69_IRQ_PIN
841
#warning MY_RF69_IRQ_PIN is depreciated, please use MY_RFM69_IRQ_PIN instead.
842
#define MY_RFM69_IRQ_PIN MY_RF69_IRQ_PIN
843
#else
844
#define MY_RFM69_IRQ_PIN DEFAULT_RFM69_IRQ_PIN
845
#endif
846
#endif
847
852
#ifndef MY_RFM69_IRQ_NUM
853
#ifdef MY_RF69_IRQ_NUM
854
#warning MY_RF69_IRQ_NUM is depreciated, please use MY_RFM69_IRQ_NUM instead.
855
#define MY_RFM69_IRQ_NUM MY_RF69_IRQ_NUM
856
#else
857
#define MY_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN)
858
#endif
859
#endif
860
865
#ifndef MY_RFM69_CS_PIN
866
#ifdef MY_RF69_SPI_CS
867
#warning MY_RF69_SPI_CS is depreciated, please use MY_RFM69_CS_PIN instead.
868
#define MY_RFM69_CS_PIN MY_RF69_SPI_CS
869
#else
870
#define MY_RFM69_CS_PIN DEFAULT_RFM69_CS_PIN
871
#endif
872
#endif
873
878
#ifndef MY_RFM69_SPI_SPEED
879
#define MY_RFM69_SPI_SPEED (4*1000000ul) // datasheet says 10Mhz max.
880
#endif
881
890
//#define MY_RFM69_ENABLE_ENCRYPTION
891
912
//#define MY_RFM69_MODEM_CONFIGURATION (RFM69_FSK_BR55_5_FD50)
913
914
// End of RFM69SettingGrpPub group
916
931
//#define MY_RADIO_RFM95
932
937
//#define MY_DEBUG_VERBOSE_RFM95
938
949
//#define MY_RFM95_ENABLE_ENCRYPTION
950
965
#ifndef MY_RFM95_FREQUENCY
966
#define MY_RFM95_FREQUENCY (RFM95_868MHZ)
967
#endif
968
985
#ifndef MY_RFM95_MODEM_CONFIGRUATION
986
#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
987
#endif
988
993
//#define MY_RFM95_RST_PIN (9)
994
999
//#define MY_RFM95_POWER_PIN (3)
1000
1005
#ifndef MY_RFM95_IRQ_PIN
1006
#define MY_RFM95_IRQ_PIN DEFAULT_RFM95_IRQ_PIN
1007
#endif
1008
1013
#ifndef MY_RFM95_IRQ_NUM
1014
#define MY_RFM95_IRQ_NUM digitalPinToInterrupt(MY_RFM95_IRQ_PIN)
1015
#endif
1016
1021
#ifndef MY_RFM95_CS_PIN
1022
#define MY_RFM95_CS_PIN DEFAULT_RFM95_CS_PIN
1023
#endif
1024
1029
#ifndef MY_RFM95_SPI_SPEED
1030
#define MY_RFM95_SPI_SPEED (4*1000000ul)
1031
#endif
1032
1039
#ifndef MY_RFM95_TX_POWER_DBM
1040
#define MY_RFM95_TX_POWER_DBM (13u) // 20mW
1041
#endif
1042
1047
//#define MY_RFM95_ATC_MODE_DISABLED
1048
1053
#ifndef MY_RFM95_ATC_TARGET_RSSI
1054
#define MY_RFM95_ATC_TARGET_RSSI (-70)
1055
#endif
1056
1068
//#define MY_RFM95_MAX_POWER_LEVEL_DBM (10u)
1069
1076
//#define MY_RFM95_TCXO // End of RFM95SettingGrpPub group
1078
1094
//#define MY_RADIO_SX126x
1095
1100
#ifndef MY_SX126x_CS_PIN
1101
#define MY_SX126x_CS_PIN DEFAULT_SX126x_CS_PIN
1102
#endif
1103
1108
#ifndef MY_SX126x_IRQ_PIN
1109
#define MY_SX126x_IRQ_PIN DEFAULT_SX126x_IRQ_PIN
1110
#endif
1111
1116
#ifndef MY_SX126x_IRQ_NUM
1117
#define MY_SX126x_IRQ_NUM digitalPinToInterrupt(DEFAULT_SX126x_IRQ_PIN)
1118
#endif
1119
1134
#ifndef MY_SX126x_FREQUENCY
1135
#define MY_SX126x_FREQUENCY (SX126x_868MHZ)
1136
#endif
1137
1147
#ifndef MY_SX126x_LORA_SF
1148
#define MY_SX126x_LORA_SF LORA_SF7
1149
#endif
1150
1171
#ifndef MY_SX126x_LORA_BW
1172
#define MY_SX126x_LORA_BW LORA_BW_125
1173
#endif
1174
1189
#ifndef MY_SX126x_LORA_CR
1190
#define MY_SX126x_LORA_CR LORA_CR_4_5
1191
#endif
1192
1210
//#define MY_SX126x_TCXO_VOLTAGE (SX126x_TCXO_3V3)
1211
1212
1220
#if !defined(MY_SX126c_TCXO_STARTUP_DELAY) && defined(MY_SX126x_TCXO_VOLTAGE)
1221
#define MY_SX126c_TCXO_STARTUP_DELAY (10)
1222
#endif
1223
1230
#if !defined(MY_SX126x_USE_TCXO) && defined(MY_SX126x_TCXO_VOLTAGE)
1231
#define MY_SX126x_USE_TCXO
1232
#endif
1233
1238
//#define MY_SX126x_USE_DIO2_ANT_SWITCH
1239
1247
//#define MY_SX126x_ANT_SWITCH_PIN (GPIO3)
1248
1257
#if !defined(MY_SX126x_VARIANT)
1258
#define MY_SX126x_VARIANT (1)
1259
#endif
1260
1265
//#define MY_SX126x_POWER_PIN (3)
1266
1271
//#define MY_SX126x_RESET_PIN (47)
1272
1277
//#define MY_SX126x_BUSY_PIN (39)
1278
1283
//#define MY_SX126x_DISABLE_ATC
1284
1289
#ifndef MY_SX126x_ATC_TARGET_DBM
1290
#define MY_SX126x_ATC_TARGET_DBM (-70)
1291
#endif
1292
1299
#ifndef MY_SX126x_MAX_POWER_LEVEL_DBM
1300
#define MY_SX126x_MAX_POWER_LEVEL_DBM (20)
1301
#endif
1302
1307
#ifndef MY_SX126x_MIN_POWER_LEVEL_DBM
1308
#define MY_SX126x_MIN_POWER_LEVEL_DBM (-3)
1309
#endif
1310
// End of SX126xSettingGrpPub group
1312
1327
//#define MY_RADIO_CC1101
1328
1333
#ifndef MY_CC1101_CS_PIN
1334
#define MY_CC1101_CS_PIN DEFAULT_CC1101_CS_PIN
1335
#endif
1336
1341
#ifndef MY_CC1101_GD0_PIN
1342
#define MY_CC1101_GD0_PIN DEFAULT_CC1101_GD0_PIN
1343
#endif
1344
#define MY_CC1101_GD0_NUM digitalPinToInterrupt(MY_CC1101_GD0_PIN)
1345
1358
#ifndef MY_CC1101_FREQUENCY
1359
#define MY_CC1101_FREQUENCY (CC1101_433MHZ)
1360
#endif
1361
1372
#ifndef MY_CC1101_CHANNEL
1373
#define MY_CC1101_CHANNEL 4
1374
#endif
1375
1385
//#define MY_CC1101_SYNC_WORD 0xF543
1386
1402
//#define MY_CC1101_MODEM_CONFIGURATION CC1101_MODEM_M_BR38_4_FD20
1403
1420
//#define MY_CC1101_POWER_LEVEL CC1101_POWER_AUTO
1421
1426
#ifndef MY_CC1101_ATC_TARGET_DBM
1427
#define MY_CC1101_ATC_TARGET_DBM (-50)
1428
#endif
1429
1436
//#define MY_CC1101_MAX_POWER_LEVEL (7)
1437
1442
//#define MY_CC1101_MIN_POWER_LEVEL (0)
1443
// End of CC1101SettingGrpPub group
1445
1446
1447
1465
//#define MY_SOFTSPI
1466
1471
#ifndef MY_SOFT_SPI_SCK_PIN
1472
#define MY_SOFT_SPI_SCK_PIN (14)
1473
#endif
1474
1479
#ifndef MY_SOFT_SPI_MISO_PIN
1480
#define MY_SOFT_SPI_MISO_PIN (16)
1481
#endif
1482
1487
#ifndef MY_SOFT_SPI_MOSI_PIN
1488
#define MY_SOFT_SPI_MOSI_PIN (15)
1489
#endif
1490
// End of SoftSpiSettingGrpPub group
1491
// End of TransportSettingGrpPub group
1493
1514
#ifndef MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
1515
#define MY_RAM_ROUTING_TABLE_FEATURE
1516
#endif
1517
1522
#ifndef MY_ROUTING_TABLE_SAVE_INTERVAL_MS
1523
#define MY_ROUTING_TABLE_SAVE_INTERVAL_MS (30*60*1000ul)
1524
#endif
1525
1532
//#define MY_REPEATER_FEATURE
1533
1543
//#define MY_PASSIVE_NODE
1544
1549
#ifndef MY_NODE_ID
1550
#define MY_NODE_ID (AUTO)
1551
#endif
1552
1557
#ifndef MY_PARENT_NODE_ID
1558
#define MY_PARENT_NODE_ID (AUTO)
1559
#endif
1560
1565
//#define MY_PARENT_NODE_IS_STATIC
1566
1573
//#define MY_TRANSPORT_SANITY_CHECK
1574
1579
#ifndef MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS
1580
#define MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS (15*60*1000ul)
1581
#endif
1582
1586
#ifndef MY_TRANSPORT_DISCOVERY_INTERVAL_MS
1587
#define MY_TRANSPORT_DISCOVERY_INTERVAL_MS (20*60*1000ul)
1588
#endif
1589
1597
//#define MY_TRANSPORT_SEND_RETRIES (5)
1598
1603
//#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
1604
1609
//#define MY_TRANSPORT_MAX_TX_FAILURES (10u)
1610
1615
#ifndef MY_TRANSPORT_WAIT_READY_MS
1616
#define MY_TRANSPORT_WAIT_READY_MS (0)
1617
#endif
1618
1624
//#define MY_SIGNAL_REPORT_ENABLED
1625
// End of RoutingNodeSettingGrpPub group
1627
1640
#define MY_REGISTRATION_FEATURE
1641
1647
#ifndef MY_REGISTRATION_RETRIES
1648
#define MY_REGISTRATION_RETRIES (3u)
1649
#endif
1650
1656
#define MY_REGISTRATION_DEFAULT (true)
1657
1662
//#define MY_REGISTRATION_CONTROLLER // End of RegistrationSettingGrpPub group
1664
1675
//#define MY_CORE_ONLY
1676
1682
#define MY_CORE_COMPATIBILITY_CHECK
1683
1689
//#define MY_DISABLE_CONFIG_REQUEST
1690
// End of CoreSettingGrpPub group
1692
1703
#ifndef MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS
1704
#define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS (10*1000ul)
1705
#endif
1706
1714
#ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
1715
#define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
1716
#endif
1717
1726
//#define MY_SLEEP_HANDLER // End of SleepSettingGrpPub group
1728
1744
//#define MY_OTA_FIRMWARE_FEATURE
1745
1750
#ifndef MY_OTA_FLASH_SS
1751
#define MY_OTA_FLASH_SS (8)
1752
#endif
1753
1758
#ifndef MY_OTA_FLASH_JDECID
1759
#define MY_OTA_FLASH_JDECID (0x1F65)
1760
#endif
1761
1766
//#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1768
1779
#ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1780
#define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1781
#endif
1782
1787
#ifndef MY_GATEWAY_MAX_SEND_LENGTH
1788
#define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1789
#endif
1790
1795
#ifndef MY_GATEWAY_MAX_CLIENTS
1796
#define MY_GATEWAY_MAX_CLIENTS (1u)
1797
#endif
1798
1803
//#define MY_INCLUSION_MODE_FEATURE
1804
1811
//#define MY_INCLUSION_BUTTON_FEATURE
1812
1813
// Disable inclusion mode button if inclusion mode feature is not enabled
1814
#ifndef MY_INCLUSION_MODE_FEATURE
1815
#undef MY_INCLUSION_BUTTON_FEATURE
1816
#endif
1817
1825
//#define MY_INCLUSION_LED_PIN (7)
1826
1831
#ifndef MY_INCLUSION_MODE_BUTTON_PIN
1832
#if defined(ARDUINO_ARCH_ESP8266)
1833
#define MY_INCLUSION_MODE_BUTTON_PIN (5)
1834
#else
1835
#define MY_INCLUSION_MODE_BUTTON_PIN (3)
1836
#endif
1837
#endif
1838
1843
#ifndef MY_INCLUSION_MODE_DURATION
1844
#define MY_INCLUSION_MODE_DURATION (60)
1845
#endif
1846
1857
#if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1858
#define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1859
#else
1860
#define MY_INCLUSION_BUTTON_PRESSED (LOW)
1861
#endif
1862
1863
/**************************************
1864
* Ethernet Gateway Transport Defaults
1865
***************************************/
1886
// The gateway options available
1887
//#define MY_GATEWAY_W5100
1888
//#define MY_GATEWAY_ENC28J60
1889
//#define MY_GATEWAY_ESP8266
1890
//#define MY_GATEWAY_ESP8266_SECURE
1891
//#define MY_GATEWAY_ESP32
1892
//#define MY_GATEWAY_LINUX
1893
//#define MY_GATEWAY_TINYGSM
1894
//#define MY_GATEWAY_MQTT_CLIENT
1895
//#define MY_GATEWAY_SERIAL
1896
1897
1902
//#define MY_DEBUG_VERBOSE_GATEWAY
1903
1908
//#define MY_WIFI_SSID "MySSID"
1909
1914
#ifndef MY_WIFI_BSSID
1915
#define MY_WIFI_BSSID NULL
1916
#endif
1917
1922
//#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1923
1928
#ifndef MY_HOSTNAME
1929
#define MY_HOSTNAME "MYSENSORS_DEVICE"
1930
#endif
1931
1936
#ifndef MY_PORT
1937
#ifdef MY_GATEWAY_MQTT_CLIENT
1938
#define MY_PORT 1883
1939
#else
1940
#define MY_PORT 5003
1941
#endif
1942
#endif
1943
1948
//#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1949
1958
//#define MY_MQTT_PASSWORD "secretpassword"
1959
1968
//#define MY_MQTT_USER "username"
1969
1977
//#define MY_MQTT_CLIENT_ID "mysensors-1"
1978
1986
//#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1987
1995
//#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1996
2032
//#define MY_MQTT_CA_CERT1
2033
2038
//#define MY_MQTT_CA_CERT2
2039
2044
//#define MY_MQTT_CA_CERT3
2045
2046
2064
//#define MY_MQTT_FINGERPRINT
2065
2083
//#define MY_MQTT_CLIENT_CERT
2084
2102
//#define MY_MQTT_CLIENT_KEY
2103
2108
//#define MY_IP_CONFIGURATION_EEPROM
2109
2116
//#define MY_IP_ADDRESS 192,168,178,66
2117
2124
//#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
2125
2132
//#define MY_IP_SUBNET_ADDRESS 255,255,255,0
2133
2139
//#define MY_USE_UDP
2140
2146
#ifndef MY_MAC_ADDRESS
2147
#define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
2148
#endif
2149
2160
//#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
2161
2172
//#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
2173
// End of GatewaySettingGrpPub group
2175
2186
//#define MY_GSM_APN
2191
//#define MY_GSM_BAUDRATE (9600u)
2196
//#define MY_GSM_PIN
2201
//#define MY_GSM_PSW
2206
//#define MY_GSM_RX
2211
//#define MY_GSM_SSID
2216
//#define MY_GSM_TX
2221
//#define MY_GSM_USR
2222
// End of GSMSettingGrpPub group
2224
2239
//#define MY_DEFAULT_ERR_LED_PIN (6)
2240
2249
//#define MY_DEFAULT_TX_LED_PIN (7)
2250
2259
//#define MY_DEFAULT_RX_LED_PIN (8)
2260
2267
//#define MY_WITH_LEDS_BLINKING_INVERSE
2268
2273
//#define MY_INDICATION_HANDLER
2274
2279
#ifndef MY_DEFAULT_LED_BLINK_PERIOD
2280
#define MY_DEFAULT_LED_BLINK_PERIOD 300
2281
#endif
2282
// End of LEDSettingGrpPub group
2283
2324
//#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
2325
#if defined(MY_SECURITY_SIMPLE_PASSWD)
2326
#define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
2327
#define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
2328
#endif
2329
2342
//#define MY_DEBUG_VERBOSE_SIGNING
2343
2373
//#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
2374
#if defined(MY_SIGNING_SIMPLE_PASSWD)
2375
#define MY_SIGNING_SOFT
2376
#define MY_SIGNING_REQUEST_SIGNATURES
2377
#endif
2378
2383
//#define MY_SIGNING_ATSHA204
2384
2389
//#define MY_SIGNING_SOFT
2390
2399
//#define MY_SIGNING_REQUEST_SIGNATURES
2400
2417
//#define MY_SIGNING_WEAK_SECURITY
2418
2430
#ifndef MY_VERIFICATION_TIMEOUT_MS
2431
#define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
2432
#endif
2433
2450
//#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
2451
2456
#ifndef MY_SIGNING_ATSHA204_PIN
2457
#define MY_SIGNING_ATSHA204_PIN (17)
2458
#endif
2459
2466
#ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
2467
#define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
2468
#endif
2469
2485
//#define MY_LOCK_DEVICE
2486
2492
#if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
2493
#define MY_SIGNING_FEATURE
2494
#endif
2495
// End of SigningSettingGrpPub group
2496
2525
//#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
2526
#if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
2527
#ifndef MY_RF24_ENABLE_ENCRYPTION
2528
#define MY_RF24_ENABLE_ENCRYPTION
2529
#endif
2530
#ifndef MY_RFM69_ENABLE_ENCRYPTION
2531
#define MY_RFM69_ENABLE_ENCRYPTION
2532
#endif
2533
#ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
2534
#define MY_NRF5_ESB_ENABLE_ENCRYPTION
2535
#endif
2536
#ifndef MY_RFM95_ENABLE_ENCRYPTION
2537
#define MY_RFM95_ENABLE_ENCRYPTION
2538
#endif
2539
#endif
2540
2547
#if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
2548
#define MY_ENCRYPTION_FEATURE
2549
#endif
2550
// End of EncryptionSettingGrpPub group
2551
2591
//#define MY_NODE_LOCK_FEATURE
2592
2601
#ifndef MY_NODE_UNLOCK_PIN
2602
#define MY_NODE_UNLOCK_PIN (14)
2603
#endif
2604
2611
#ifndef MY_NODE_LOCK_COUNTER_MAX
2612
#define MY_NODE_LOCK_COUNTER_MAX (5)
2613
#endif
2614
// Node lock group // End of SecuritySettingGrpPub group
2616
2637
#ifndef MY_ESP8266_SERIAL_MODE
2638
#define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2639
#endif
2640
// End of ESP8266SettingGrpPub group
2641
2649
//
2650
// no ESP32 settings
2651
//
2652
// End of ESP32SettingGrpPub group
2654
2666
//#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2667
2672
#ifdef MY_LINUX_SERIAL_PTY
2673
#warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2674
#define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2675
#endif
2676
2681
#ifdef MY_LINUX_IS_SERIAL_PTY
2682
#warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2683
#define MY_LINUX_SERIAL_IS_PTY
2684
#endif
2685
2693
//#define MY_LINUX_SERIAL_IS_PTY
2694
2699
//#define MY_LINUX_SERIAL_GROUPNAME "tty"
2700
2707
#ifndef MY_LINUX_CONFIG_FILE
2708
#define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2709
#endif
2710
// End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2712
2713
/*
2714
* "Helper" definitions
2715
*/
2716
2717
/*
2718
* Detect node type
2719
* MY_GATEWAY_FEATURE is set for gateway sketches.
2720
* MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2721
* MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2722
*/
2723
#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)
2724
#define MY_GATEWAY_FEATURE
2725
#define MY_IS_GATEWAY (true)
2726
#define MY_NODE_TYPE "GW"
2727
#elif defined(MY_REPEATER_FEATURE)
2728
#define MY_IS_GATEWAY (false)
2729
#define MY_NODE_TYPE "REPEATER"
2730
#elif defined(DOXYGEN)
2731
#define MY_IS_GATEWAY
2732
#define MY_NODE_TYPE
2733
#else
2734
#define MY_IS_GATEWAY (false)
2735
#define MY_NODE_TYPE "NODE"
2736
#endif
2737
2738
// DEBUG
2739
#if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2740
#undef MY_DEBUG
2741
#endif
2742
#if defined(MY_DEBUG)
2743
// standard debug output
2744
#define MY_DEBUG_VERBOSE_CORE
2745
#define MY_DEBUG_VERBOSE_TRANSPORT
2746
#define MY_DEBUG_VERBOSE_GATEWAY
2747
#define MY_DEBUG_VERBOSE_OTA_UPDATE
2748
#endif
2749
2750
#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)
2751
#define DEBUG_OUTPUT_ENABLED
2752
#ifndef MY_DEBUG_OTA
2753
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2754
#else
2755
#ifndef MY_OTA_LOG_SENDER_FEATURE
2756
#define MY_OTA_LOG_SENDER_FEATURE
2757
#endif
2758
#ifndef MY_DEBUG_OTA_DISABLE_ECHO
2759
#define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2760
#else
2761
#define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2762
#endif
2763
// disable radio related debugging messages
2764
#undef MY_DEBUG_VERBOSE_RF24
2765
#undef MY_DEBUG_VERBOSE_NRF5_ESB
2766
#undef MY_DEBUG_VERBOSE_RFM69
2767
#undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2768
#undef MY_DEBUG_VERBOSE_RFM95
2769
#undef MY_DEBUG_VERBOSE_SX126x
2770
#endif
2771
#else
2772
#define DEBUG_OUTPUT(x,...)
2773
#endif
2774
2775
// temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2776
#if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2777
#undef MY_RADIO_RF24
2778
#define MY_RADIO_NRF5_ESB
2779
#endif
2780
2781
// Enable sensor network "feature" if one of the transport types was enabled
2782
#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)
2783
#define MY_SENSOR_NETWORK
2784
#endif
2785
2786
// LEDS
2787
#if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2788
#define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2789
#endif
2790
2791
#if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2792
#define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2793
#endif
2794
2795
#if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2796
#define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2797
#endif
2798
2799
#endif // MyConfig_h
2800
2801
// Doxygen specific constructs, not included when built normally
2802
// This is used to enable disabled macros/definitions to be included in the documentation as well.
2803
#if DOXYGEN
2804
2808
#define ARDUINO_ARCH_SAMD
2809
2814
#define ARDUINO_ARCH_NRF5
2815
2820
#define ARDUINO_ARCH_ESP8266
2821
2826
#define ARDUINO_ARCH_ESP32
2827
2832
#define ARDUINO_ARCH_AVR
2833
2838
#define ARDUINO_ARCH_MEGAAVR
2839
2844
#define ARDUINO_ARCH_STM32
2845
2850
#define TEENSYDUINO
2851
2852
// debug
2853
#define MY_DEBUG
2854
#define MY_DEBUGDEVICE
2855
#define MY_DEBUG_OTA
2856
#define MY_DEBUG_OTA_DISABLE_ECHO
2857
#define MY_SPECIAL_DEBUG
2858
#define MY_DISABLED_SERIAL
2859
#define MY_SPLASH_SCREEN_DISABLED
2860
#define MY_DIAGNOSTICS
2861
#define MY_DIAGNOSTICS_CRYPTO
2862
// linux
2863
#define MY_LINUX_SERIAL_PORT
2864
#define MY_LINUX_SERIAL_IS_PTY
2865
#define MY_LINUX_SERIAL_GROUPNAME
2866
#define MY_LINUX_SERIAL_PTY
2867
#define MY_LINUX_IS_SERIAL_PTY
2868
// inclusion mode
2869
#define MY_INCLUSION_MODE_FEATURE
2870
#define MY_INCLUSION_BUTTON_FEATURE
2871
// OTA logging and debug
2872
#define MY_OTA_LOG_RECEIVER_FEATURE
2873
#define MY_OTA_LOG_SENDER_FEATURE
2874
// transport
2875
#define MY_PARENT_NODE_IS_STATIC
2876
#define MY_REGISTRATION_CONTROLLER
2877
#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2878
#define MY_TRANSPORT_SANITY_CHECK
2879
#define MY_NODE_LOCK_FEATURE
2880
#define MY_REPEATER_FEATURE
2881
#define MY_PASSIVE_NODE
2882
#define MY_MQTT_CLIENT_PUBLISH_RETAIN
2883
#define MY_MQTT_PASSWORD
2884
#define MY_MQTT_USER
2885
#define MY_MQTT_CLIENT_ID
2886
#define MY_MQTT_PUBLISH_TOPIC_PREFIX
2887
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2888
#define MY_MQTT_CA_CERT1
2889
#define MY_MQTT_CA_CERT2
2890
#define MY_MQTT_CA_CERT3
2891
#define MY_MQTT_FINGERPRINT
2892
#define MY_MQTT_CLIENT_CERT
2893
#define MY_MQTT_CLIENT_KEY
2894
#define MY_SIGNAL_REPORT_ENABLED
2895
// general
2896
#define MY_WITH_LEDS_BLINKING_INVERSE
2897
#define MY_INDICATION_HANDLER
2898
#define MY_DISABLE_REMOTE_RESET
2899
#define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2900
#define MY_LOCK_DEVICE
2901
#define MY_SLEEP_HANDLER
2902
// core
2903
#define MY_CORE_ONLY
2904
// GW
2905
#define MY_DEBUG_VERBOSE_GATEWAY
2906
#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2907
#define MY_INCLUSION_LED_PIN
2908
#define MY_GATEWAY_W5100
2909
#define MY_GATEWAY_ENC28J60
2910
#define MY_GATEWAY_ESP8266
2911
#define MY_GATEWAY_ESP32
2912
#define MY_WIFI_SSID
2913
#define MY_WIFI_BSSID
2914
#define MY_WIFI_PASSWORD
2915
#define MY_GATEWAY_LINUX
2916
#define MY_GATEWAY_TINYGSM
2917
#define MY_GATEWAY_MQTT_CLIENT
2918
#define MY_GATEWAY_SERIAL
2919
#define MY_IP_ADDRESS
2920
#define MY_IP_GATEWAY_ADDRESS
2921
#define MY_IP_SUBNET_ADDRESS
2922
#define MY_USE_UDP
2923
#define MY_CONTROLLER_IP_ADDRESS
2924
#define MY_CONTROLLER_URL_ADDRESS
2925
// TinyGSM
2926
#define MY_GSM_APN
2927
#define MY_GSM_BAUDRATE
2928
#define MY_GSM_PIN
2929
#define MY_GSM_PSW
2930
#define MY_GSM_RX
2931
#define MY_GSM_SSID
2932
#define MY_GSM_TX
2933
#define MY_GSM_USR
2934
// LED
2935
#define MY_DEFAULT_ERR_LED_PIN
2936
#define MY_DEFAULT_TX_LED_PIN
2937
#define MY_DEFAULT_RX_LED_PIN
2938
// signing
2939
#define MY_SECURITY_SIMPLE_PASSWD
2940
#define MY_SIGNING_SIMPLE_PASSWD
2941
#define MY_ENCRYPTION_SIMPLE_PASSWD
2942
#define MY_SIGNING_ATSHA204
2943
#define MY_SIGNING_SOFT
2944
#define MY_SIGNING_REQUEST_SIGNATURES
2945
#define MY_SIGNING_WEAK_SECURITY
2946
#define MY_SIGNING_NODE_WHITELISTING
2947
#define MY_DEBUG_VERBOSE_SIGNING
2948
#define MY_SIGNING_FEATURE
2949
#define MY_ENCRYPTION_FEATURE
2950
// FOTA update
2951
#define MY_DEBUG_VERBOSE_OTA_UPDATE
2952
#define MY_OTA_USE_I2C_EEPROM
2953
// RS485
2954
#define MY_RS485
2955
#define MY_RS485_DE_PIN
2956
#define MY_RS485_DE_INVERSE
2957
#define MY_RS485_HWSERIAL
2958
// PJON
2959
#define MY_PJON
2960
#define MY_DEBUG_VERBOSE_PJON
2961
// RF24
2962
#define MY_RADIO_RF24
2963
#define MY_RADIO_NRF24 //deprecated
2964
#define MY_DEBUG_VERBOSE_RF24
2965
#define MY_RF24_POWER_PIN
2966
#define MY_RF24_IRQ_PIN
2967
#define MY_RF24_ENABLE_ENCRYPTION
2968
#define MY_RX_MESSAGE_BUFFER_FEATURE
2969
#define MY_RX_MESSAGE_BUFFER_SIZE
2970
// NRF5_ESB
2971
#define MY_RADIO_NRF5_ESB
2972
#define MY_NRF5_ESB_ENABLE_ENCRYPTION
2973
#define MY_DEBUG_VERBOSE_NRF5_ESB
2974
#define MY_NRF5_ESB_REVERSE_ACK_RX
2975
#define MY_NRF5_ESB_REVERSE_ACK_TX
2976
// RFM69
2977
#define MY_RADIO_RFM69
2978
#define MY_IS_RFM69HW
2979
#define MY_RFM69_NEW_DRIVER
2980
#define MY_RFM69_POWER_PIN
2981
#define MY_RFM69_MODEM_CONFIGURATION
2982
#define MY_RFM69_ENABLE_ENCRYPTION
2983
#define MY_RFM69_ATC_MODE_DISABLED
2984
#define MY_RFM69_MAX_POWER_LEVEL_DBM
2985
#define MY_RFM69_RST_PIN
2986
#define MY_DEBUG_VERBOSE_RFM69
2987
#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2988
// RFM95
2989
#define MY_RADIO_RFM95
2990
#define MY_DEBUG_VERBOSE_RFM95
2991
#define MY_RFM95_ENABLE_ENCRYPTION
2992
#define MY_RFM95_ATC_MODE_DISABLED
2993
#define MY_RFM95_RST_PIN
2994
#define MY_RFM95_MODEM_CONFIGRUATION
2995
#define MY_RFM95_POWER_PIN
2996
#define MY_RFM95_TCXO
2997
#define MY_RFM95_MAX_POWER_LEVEL_DBM
2998
// SX126x
2999
#define MY_RADIO_SX126x
3000
#define MY_SX126x_TCXO_VOLTAGE
3001
#define MY_SX126c_TCXO_STARTUP_DELAY
3002
#define MY_SX126x_USE_TCXO
3003
#define MY_SX126x_USE_DIO2_ANT_SWITCH
3004
#define MY_SX126x_ANT_SWITCH_PIN
3005
#define MY_SX126x_POWER_PIN
3006
#define MY_SX126x_RESET_PIN
3007
#define MY_SX126x_BUSY_PIN
3008
#define MY_SX126x_DISABLE_ATC
3009
#define MY_SX126x_MIN_POWER_LEVEL_DBM
3010
#define MY_SX126x_MAX_POWER_LEVEL_DBM
3011
// SOFT-SPI
3012
#define MY_SOFTSPI
3013
3018
#define MY_ROUTES_SIZE
3019
3020
#endif
3021
// End of MyConfig group
Copyright (C) 2013-2026 Sensnology AB. Generated by
doxygen
1.8.17