MySensors Library & Examples
2.3.2
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-2019 Sensnology AB
10
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11
*
12
* Documentation: http://www.mysensors.org
13
* Support Forum: http://forum.mysensors.org
14
*
15
* This program is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU General Public License
17
* version 2 as published by the Free Software Foundation.
18
*/
19
28
#ifndef MyConfig_h
29
#define MyConfig_h
30
48
//#define MY_DEBUG
49
64
//#define MY_DEBUGDEVICE
65
86
//#define MY_DEBUG_OTA (0)
87
97
//#define MY_DEBUG_OTA_DISABLE_ECHO
98
#if defined(MY_DEBUG_OTA_DISABLE_ACK) && !defined(DOXYGEN)
99
#warning MY_DEBUG_OTA_DISABLE_ACK is deprecated, please use MY_DEBUG_OTA_DISABLE_ECHO instead
100
#define MY_DEBUG_OTA_DISABLE_ECHO
101
#endif
102
110
//#define MY_OTA_LOG_RECEIVER_FEATURE
111
119
//#define MY_OTA_LOG_SENDER_FEATURE
120
134
//#define MY_SPECIAL_DEBUG
135
143
//#define MY_DISABLED_SERIAL
144
152
//#define MY_SPLASH_SCREEN_DISABLED
153
162
#ifndef MY_BAUD_RATE
163
#define MY_BAUD_RATE (115200ul)
164
#endif
165
172
#ifndef MY_SERIAL_OUTPUT_SIZE
173
#define MY_SERIAL_OUTPUT_SIZE (120u)
174
#endif
175
// End of SerialDebugGrpPub group
176
181
//#define MY_DEBUG_VERBOSE_OTA_UPDATE
182
190
//#define MY_OTA_USE_I2C_EEPROM
191
192
#ifdef MY_OTA_USE_I2C_EEPROM
193
// I2C address of EEPROM. Wire will shift this left, i.e. 0x50->0xA0
194
#ifndef MY_OTA_I2C_ADDR
195
#define MY_OTA_I2C_ADDR 0x50
196
#endif
197
#endif
198
199
219
//#define MY_RS485
220
225
#ifndef MY_RS485_BAUD_RATE
226
#define MY_RS485_BAUD_RATE (9600)
227
#endif
228
233
#ifndef MY_RS485_MAX_MESSAGE_LENGTH
234
#define MY_RS485_MAX_MESSAGE_LENGTH (40)
235
#endif
236
241
#ifndef MY_RS485_SOH_COUNT
242
#define MY_RS485_SOH_COUNT (1)
243
#endif
244
245
250
//#define MY_RS485_DE_PIN (2)
251
256
//#define MY_RS485_DE_INVERSE
257
264
//#define MY_RS485_HWSERIAL (Serial1) // End of RS485SettingGrpPub group
266
287
// legacy - remove for 3.0.0
293
#ifdef MY_RADIO_NRF24
294
#warning MY_RADIO_NRF24 is deprecated, use MY_RADIO_RF24 instead.
295
#undef MY_RADIO_NRF24
296
#define MY_RADIO_RF24
297
#endif
298
303
//#define MY_RADIO_RF24
304
315
//#define MY_RF24_ENABLE_ENCRYPTION
316
321
//#define MY_DEBUG_VERBOSE_RF24
322
329
#ifndef MY_RF24_SPI_SPEED
330
#define MY_RF24_SPI_SPEED (2*1000000ul)
331
#endif
332
337
#ifndef MY_RF24_CE_PIN
338
#define MY_RF24_CE_PIN (DEFAULT_RF24_CE_PIN)
339
#endif
340
345
#ifndef MY_RF24_CS_PIN
346
#define MY_RF24_CS_PIN (DEFAULT_RF24_CS_PIN)
347
#endif
348
353
//#define MY_RF24_IRQ_PIN (2)
354
359
//#define MY_RF24_POWER_PIN (3)
360
372
//#define MY_RX_MESSAGE_BUFFER_FEATURE
373
380
#ifdef MY_RX_MESSAGE_BUFFER_FEATURE
381
#ifndef MY_RX_MESSAGE_BUFFER_SIZE
382
#define MY_RX_MESSAGE_BUFFER_SIZE (20)
383
#endif
384
#endif
385
395
#ifndef MY_RF24_PA_LEVEL
396
#define MY_RF24_PA_LEVEL (RF24_PA_HIGH)
397
#endif
398
419
#ifndef MY_RF24_CHANNEL
420
#define MY_RF24_CHANNEL (76)
421
#endif
422
434
#ifndef MY_RF24_DATARATE
435
#define MY_RF24_DATARATE (RF24_250KBPS)
436
#endif
437
445
#ifndef MY_RF24_BASE_RADIO_ID
446
#define MY_RF24_BASE_RADIO_ID 0x00,0xFC,0xE1,0xA8,0xA8
447
#endif
448
453
#ifndef MY_RF24_ADDR_WIDTH
454
#define MY_RF24_ADDR_WIDTH (5)
455
#endif
456
// End of RF24SettingGrpPub group
457
479
//#define MY_RADIO_NRF5_ESB
480
491
//#define MY_NRF5_ESB_ENABLE_ENCRYPTION
492
497
//#define MY_DEBUG_VERBOSE_NRF5_ESB
498
508
#ifndef MY_NRF5_ESB_PA_LEVEL
509
#define MY_NRF5_ESB_PA_LEVEL (NRF5_PA_MAX)
510
#endif
511
532
#ifndef MY_NRF5_ESB_CHANNEL
533
#define MY_NRF5_ESB_CHANNEL (76)
534
#endif
535
545
#ifndef MY_NRF5_ESB_MODE
546
#define MY_NRF5_ESB_MODE (NRF5_250KBPS)
547
#endif
548
556
#ifndef MY_NRF5_ESB_BASE_RADIO_ID
557
#define MY_NRF5_ESB_BASE_RADIO_ID 0x00, 0xFC, 0xE1, 0xA8, 0xA8
558
#endif
559
564
#ifndef MY_NRF5_ESB_ADDR_WIDTH
565
#define MY_NRF5_ESB_ADDR_WIDTH (5)
566
#endif
567
572
#ifndef MY_NRF5_ESB_RX_BUFFER_SIZE
573
#define MY_NRF5_ESB_RX_BUFFER_SIZE (20)
574
#endif
575
580
//#define MY_NRF5_ESB_REVERSE_ACK_TX
581
586
//#define MY_NRF5_ESB_REVERSE_ACK_RX // End of NRF5SettingGrpPub group
588
605
//#define MY_RADIO_RFM69
606
611
//#define MY_DEBUG_VERBOSE_RFM69
612
617
//#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
618
625
//#define MY_RFM69_NEW_DRIVER
626
642
#ifndef MY_RFM69_FREQUENCY
643
#define MY_RFM69_FREQUENCY (RFM69_868MHZ)
644
#endif
645
650
//#define MY_IS_RFM69HW
651
658
#ifdef MY_IS_RFM69HW
659
#define MY_RFM69HW true
660
#else
661
#define MY_RFM69HW false
662
#endif
663
668
#ifndef MY_RFM69_TX_POWER_DBM
669
#define MY_RFM69_TX_POWER_DBM (5)
670
#endif
671
676
#ifndef MY_RFM69_ATC_TARGET_RSSI_DBM
677
#define MY_RFM69_ATC_TARGET_RSSI_DBM (-80)
678
#endif
679
684
//#define MY_RFM69_ATC_MODE_DISABLED
685
697
//#define MY_RFM69_MAX_POWER_LEVEL_DBM (10u)
698
703
#ifndef MY_RFM69_NETWORKID
704
#define MY_RFM69_NETWORKID (100)
705
#endif
706
711
//#define MY_RFM69_RST_PIN (9)
712
713
#ifdef MY_RF69_RESET
714
#warning MY_RF69_RESET is depreciated, please use MY_RFM69_RST_PIN instead.
715
#define MY_RFM69_RST_PIN MY_RF69_RESET
716
#endif
717
722
//#define MY_RFM69_POWER_PIN (3)
723
728
#ifndef MY_RFM69_IRQ_PIN
729
#ifdef MY_RF69_IRQ_PIN
730
#warning MY_RF69_IRQ_PIN is depreciated, please use MY_RFM69_IRQ_PIN instead.
731
#define MY_RFM69_IRQ_PIN MY_RF69_IRQ_PIN
732
#else
733
#define MY_RFM69_IRQ_PIN DEFAULT_RFM69_IRQ_PIN
734
#endif
735
#endif
736
741
#ifndef MY_RFM69_IRQ_NUM
742
#ifdef MY_RF69_IRQ_NUM
743
#warning MY_RF69_IRQ_NUM is depreciated, please use MY_RFM69_IRQ_NUM instead.
744
#define MY_RFM69_IRQ_NUM MY_RF69_IRQ_NUM
745
#else
746
#define MY_RFM69_IRQ_NUM digitalPinToInterrupt(MY_RFM69_IRQ_PIN)
747
#endif
748
#endif
749
754
#ifndef MY_RFM69_CS_PIN
755
#ifdef MY_RF69_SPI_CS
756
#warning MY_RF69_SPI_CS is depreciated, please use MY_RFM69_CS_PIN instead.
757
#define MY_RFM69_CS_PIN MY_RF69_SPI_CS
758
#else
759
#define MY_RFM69_CS_PIN DEFAULT_RFM69_CS_PIN
760
#endif
761
#endif
762
767
#ifndef MY_RFM69_SPI_SPEED
768
#define MY_RFM69_SPI_SPEED (4*1000000ul) // datasheet says 10Mhz max.
769
#endif
770
779
//#define MY_RFM69_ENABLE_ENCRYPTION
780
801
//#define MY_RFM69_MODEM_CONFIGURATION (RFM69_FSK_BR55_5_FD50)
802
803
// End of RFM69SettingGrpPub group
805
820
//#define MY_RADIO_RFM95
821
826
//#define MY_DEBUG_VERBOSE_RFM95
827
838
//#define MY_RFM95_ENABLE_ENCRYPTION
839
854
#ifndef MY_RFM95_FREQUENCY
855
#define MY_RFM95_FREQUENCY (RFM95_868MHZ)
856
#endif
857
874
#ifndef MY_RFM95_MODEM_CONFIGRUATION
875
#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128
876
#endif
877
882
//#define MY_RFM95_RST_PIN (9)
883
888
//#define MY_RFM95_POWER_PIN (3)
889
894
#ifndef MY_RFM95_IRQ_PIN
895
#define MY_RFM95_IRQ_PIN DEFAULT_RFM95_IRQ_PIN
896
#endif
897
902
#ifndef MY_RFM95_IRQ_NUM
903
#define MY_RFM95_IRQ_NUM digitalPinToInterrupt(MY_RFM95_IRQ_PIN)
904
#endif
905
910
#ifndef MY_RFM95_CS_PIN
911
#define MY_RFM95_CS_PIN DEFAULT_RFM95_CS_PIN
912
#endif
913
918
#ifndef MY_RFM95_SPI_SPEED
919
#define MY_RFM95_SPI_SPEED (4*1000000ul)
920
#endif
921
928
#ifndef MY_RFM95_TX_POWER_DBM
929
#define MY_RFM95_TX_POWER_DBM (13u) // 20mW
930
#endif
931
936
//#define MY_RFM95_ATC_MODE_DISABLED
937
942
#ifndef MY_RFM95_ATC_TARGET_RSSI
943
#define MY_RFM95_ATC_TARGET_RSSI (-70)
944
#endif
945
957
//#define MY_RFM95_MAX_POWER_LEVEL_DBM (10u)
958
965
//#define MY_RFM95_TCXO // End of RFM95SettingGrpPub group
967
985
//#define MY_SOFTSPI
986
991
#ifndef MY_SOFT_SPI_SCK_PIN
992
#define MY_SOFT_SPI_SCK_PIN (14)
993
#endif
994
999
#ifndef MY_SOFT_SPI_MISO_PIN
1000
#define MY_SOFT_SPI_MISO_PIN (16)
1001
#endif
1002
1007
#ifndef MY_SOFT_SPI_MOSI_PIN
1008
#define MY_SOFT_SPI_MOSI_PIN (15)
1009
#endif
1010
// End of SoftSpiSettingGrpPub group
1011
// End of TransportSettingGrpPub group
1013
1034
#ifndef MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
1035
#define MY_RAM_ROUTING_TABLE_FEATURE
1036
#endif
1037
1042
#ifndef MY_ROUTING_TABLE_SAVE_INTERVAL_MS
1043
#define MY_ROUTING_TABLE_SAVE_INTERVAL_MS (30*60*1000ul)
1044
#endif
1045
1052
//#define MY_REPEATER_FEATURE
1053
1063
//#define MY_PASSIVE_NODE
1064
1069
#ifndef MY_NODE_ID
1070
#define MY_NODE_ID (AUTO)
1071
#endif
1072
1077
#ifndef MY_PARENT_NODE_ID
1078
#define MY_PARENT_NODE_ID (AUTO)
1079
#endif
1080
1085
//#define MY_PARENT_NODE_IS_STATIC
1086
1093
//#define MY_TRANSPORT_SANITY_CHECK
1094
1099
#ifndef MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS
1100
#define MY_TRANSPORT_SANITY_CHECK_INTERVAL_MS (15*60*1000ul)
1101
#endif
1102
1106
#ifndef MY_TRANSPORT_DISCOVERY_INTERVAL_MS
1107
#define MY_TRANSPORT_DISCOVERY_INTERVAL_MS (20*60*1000ul)
1108
#endif
1109
1114
//#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
1115
1120
//#define MY_TRANSPORT_MAX_TX_FAILURES (10u)
1121
1126
#ifndef MY_TRANSPORT_WAIT_READY_MS
1127
#define MY_TRANSPORT_WAIT_READY_MS (0)
1128
#endif
1129
1135
//#define MY_SIGNAL_REPORT_ENABLED
1136
// End of RoutingNodeSettingGrpPub group
1138
1151
#define MY_REGISTRATION_FEATURE
1152
1158
#ifndef MY_REGISTRATION_RETRIES
1159
#define MY_REGISTRATION_RETRIES (3u)
1160
#endif
1161
1167
#define MY_REGISTRATION_DEFAULT (true)
1168
1173
//#define MY_REGISTRATION_CONTROLLER // End of RegistrationSettingGrpPub group
1175
1186
//#define MY_CORE_ONLY
1187
1193
#define MY_CORE_COMPATIBILITY_CHECK
1194
// End of CoreSettingGrpPub group
1195
1206
#ifndef MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS
1207
#define MY_SLEEP_TRANSPORT_RECONNECT_TIMEOUT_MS (10*1000ul)
1208
#endif
1209
1217
#ifndef MY_SMART_SLEEP_WAIT_DURATION_MS
1218
#define MY_SMART_SLEEP_WAIT_DURATION_MS (500ul)
1219
#endif
1220
// End of SleepSettingGrpPub group
1221
1237
//#define MY_OTA_FIRMWARE_FEATURE
1238
1243
#ifndef MY_OTA_FLASH_SS
1244
#define MY_OTA_FLASH_SS (8)
1245
#endif
1246
1251
#ifndef MY_OTA_FLASH_JDECID
1252
#define MY_OTA_FLASH_JDECID (0x1F65)
1253
#endif
1254
1259
//#define MY_DISABLE_REMOTE_RESET // End of OTASettingGrpPub group
1261
1272
#ifndef MY_GATEWAY_MAX_RECEIVE_LENGTH
1273
#define MY_GATEWAY_MAX_RECEIVE_LENGTH (100u)
1274
#endif
1275
1280
#ifndef MY_GATEWAY_MAX_SEND_LENGTH
1281
#define MY_GATEWAY_MAX_SEND_LENGTH (120u)
1282
#endif
1283
1288
#ifndef MY_GATEWAY_MAX_CLIENTS
1289
#define MY_GATEWAY_MAX_CLIENTS (1u)
1290
#endif
1291
1296
//#define MY_INCLUSION_MODE_FEATURE
1297
1304
//#define MY_INCLUSION_BUTTON_FEATURE
1305
1306
// Disable inclusion mode button if inclusion mode feature is not enabled
1307
#ifndef MY_INCLUSION_MODE_FEATURE
1308
#undef MY_INCLUSION_BUTTON_FEATURE
1309
#endif
1310
1318
//#define MY_INCLUSION_LED_PIN (7)
1319
1324
#ifndef MY_INCLUSION_MODE_BUTTON_PIN
1325
#if defined(ARDUINO_ARCH_ESP8266)
1326
#define MY_INCLUSION_MODE_BUTTON_PIN (5)
1327
#else
1328
#define MY_INCLUSION_MODE_BUTTON_PIN (3)
1329
#endif
1330
#endif
1331
1336
#ifndef MY_INCLUSION_MODE_DURATION
1337
#define MY_INCLUSION_MODE_DURATION (60)
1338
#endif
1339
1350
#if defined(MY_INCLUSION_BUTTON_EXTERNAL_PULLUP)
1351
#define MY_INCLUSION_BUTTON_PRESSED (HIGH)
1352
#else
1353
#define MY_INCLUSION_BUTTON_PRESSED (LOW)
1354
#endif
1355
1356
1357
/**************************************
1358
* Ethernet Gateway Transport Defaults
1359
***************************************/
1378
// The gateway options available
1379
//#define MY_GATEWAY_W5100
1380
//#define MY_GATEWAY_ENC28J60
1381
//#define MY_GATEWAY_ESP8266
1382
//#define MY_GATEWAY_ESP32
1383
//#define MY_GATEWAY_LINUX
1384
//#define MY_GATEWAY_TINYGSM
1385
//#define MY_GATEWAY_MQTT_CLIENT
1386
//#define MY_GATEWAY_SERIAL
1387
1388
1393
//#define MY_DEBUG_VERBOSE_GATEWAY
1394
1399
//#define MY_WIFI_SSID "MySSID"
1400
1405
#ifndef MY_WIFI_BSSID
1406
#define MY_WIFI_BSSID NULL
1407
#endif
1408
1413
//#define MY_WIFI_PASSWORD "MyVerySecretPassword"
1414
1419
#ifndef MY_HOSTNAME
1420
#define MY_HOSTNAME "MYSENSORS_DEVICE"
1421
#endif
1422
1427
#ifndef MY_PORT
1428
#ifdef MY_GATEWAY_MQTT_CLIENT
1429
#define MY_PORT 1883
1430
#else
1431
#define MY_PORT 5003
1432
#endif
1433
#endif
1434
1439
//#define MY_MQTT_CLIENT_PUBLISH_RETAIN
1440
1449
//#define MY_MQTT_PASSWORD "secretpassword"
1450
1459
//#define MY_MQTT_USER "username"
1460
1468
//#define MY_MQTT_CLIENT_ID "mysensors-1"
1469
1477
//#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
1478
1486
//#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
1487
1494
//#define MY_IP_ADDRESS 192,168,178,66
1495
1502
//#define MY_IP_GATEWAY_ADDRESS 192,168,1,1
1503
1510
//#define MY_IP_SUBNET_ADDRESS 255,255,255,0
1511
1517
//#define MY_USE_UDP
1518
1523
#ifndef MY_IP_RENEWAL_INTERVAL_MS
1524
#define MY_IP_RENEWAL_INTERVAL_MS (60*1000ul)
1525
#endif
1526
1532
#ifndef MY_MAC_ADDRESS
1533
#define MY_MAC_ADDRESS 0xDE,0xAD,0xBE,0xEF,0xFE,0xED
1534
#endif
1535
1546
//#define MY_CONTROLLER_IP_ADDRESS 192,168,178,254
1547
1558
//#define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
1559
// End of GatewaySettingGrpPub group
1561
1572
//#define MY_GSM_APN
1577
//#define MY_GSM_BAUDRATE (9600u)
1582
//#define MY_GSM_PIN
1587
//#define MY_GSM_PSW
1592
//#define MY_GSM_RX
1597
//#define MY_GSM_SSID
1602
//#define MY_GSM_TX
1607
//#define MY_GSM_USR
1608
// End of GSMSettingGrpPub group
1610
1625
//#define MY_DEFAULT_ERR_LED_PIN (6)
1626
1635
//#define MY_DEFAULT_TX_LED_PIN (7)
1636
1645
//#define MY_DEFAULT_RX_LED_PIN (8)
1646
1653
//#define MY_WITH_LEDS_BLINKING_INVERSE
1654
1659
//#define MY_INDICATION_HANDLER
1660
1665
#ifndef MY_DEFAULT_LED_BLINK_PERIOD
1666
#define MY_DEFAULT_LED_BLINK_PERIOD 300
1667
#endif
1668
// End of LEDSettingGrpPub group
1669
1710
//#define MY_SECURITY_SIMPLE_PASSWD "MyInsecurePassword"
1711
#if defined(MY_SECURITY_SIMPLE_PASSWD)
1712
#define MY_SIGNING_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1713
#define MY_ENCRYPTION_SIMPLE_PASSWD MY_SECURITY_SIMPLE_PASSWD
1714
#endif
1715
1728
//#define MY_DEBUG_VERBOSE_SIGNING
1729
1759
//#define MY_SIGNING_SIMPLE_PASSWD "MyInsecurePassword"
1760
#if defined(MY_SIGNING_SIMPLE_PASSWD)
1761
#define MY_SIGNING_SOFT
1762
#define MY_SIGNING_REQUEST_SIGNATURES
1763
#endif
1764
1769
//#define MY_SIGNING_ATSHA204
1770
1775
//#define MY_SIGNING_SOFT
1776
1785
//#define MY_SIGNING_REQUEST_SIGNATURES
1786
1803
//#define MY_SIGNING_WEAK_SECURITY
1804
1816
#ifndef MY_VERIFICATION_TIMEOUT_MS
1817
#define MY_VERIFICATION_TIMEOUT_MS (5*1000ul)
1818
#endif
1819
1836
//#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
1837
1842
#ifndef MY_SIGNING_ATSHA204_PIN
1843
#define MY_SIGNING_ATSHA204_PIN (17)
1844
#endif
1845
1852
#ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
1853
#define MY_SIGNING_SOFT_RANDOMSEED_PIN (7)
1854
#endif
1855
1871
//#define MY_LOCK_DEVICE
1872
1878
#if defined(MY_SIGNING_ATSHA204) || defined(MY_SIGNING_SOFT)
1879
#define MY_SIGNING_FEATURE
1880
#endif
1881
// End of SigningSettingGrpPub group
1882
1911
//#define MY_ENCRYPTION_SIMPLE_PASSWD "MyInsecurePassword"
1912
#if defined(MY_ENCRYPTION_SIMPLE_PASSWD)
1913
#ifndef MY_RF24_ENABLE_ENCRYPTION
1914
#define MY_RF24_ENABLE_ENCRYPTION
1915
#endif
1916
#ifndef MY_RFM69_ENABLE_ENCRYPTION
1917
#define MY_RFM69_ENABLE_ENCRYPTION
1918
#endif
1919
#ifndef MY_NRF5_ESB_ENABLE_ENCRYPTION
1920
#define MY_NRF5_ESB_ENABLE_ENCRYPTION
1921
#endif
1922
#ifndef MY_RFM95_ENABLE_ENCRYPTION
1923
#define MY_RFM95_ENABLE_ENCRYPTION
1924
#endif
1925
#endif
1926
1933
#if defined(MY_RF24_ENABLE_ENCRYPTION) || defined(MY_RFM69_ENABLE_ENCRYPTION) || defined(MY_NRF5_ESB_ENABLE_ENCRYPTION) || defined(MY_RFM95_ENABLE_ENCRYPTION)
1934
#define MY_ENCRYPTION_FEATURE
1935
#endif
1936
// End of EncryptionSettingGrpPub group
1937
1977
//#define MY_NODE_LOCK_FEATURE
1978
1987
#ifndef MY_NODE_UNLOCK_PIN
1988
#define MY_NODE_UNLOCK_PIN (14)
1989
#endif
1990
1997
#ifndef MY_NODE_LOCK_COUNTER_MAX
1998
#define MY_NODE_LOCK_COUNTER_MAX (5)
1999
#endif
2000
// Node lock group // End of SecuritySettingGrpPub group
2002
2023
#ifndef MY_ESP8266_SERIAL_MODE
2024
#define MY_ESP8266_SERIAL_MODE SERIAL_FULL
2025
#endif
2026
// End of ESP8266SettingGrpPub group
2027
2035
//
2036
// no ESP32 settings
2037
//
2038
// End of ESP32SettingGrpPub group
2040
2052
//#define MY_LINUX_SERIAL_PORT "/dev/ttyUSB0"
2053
2058
#ifdef MY_LINUX_SERIAL_PTY
2059
#warning MY_LINUX_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_PORT
2060
#define MY_LINUX_SERIAL_PORT MY_LINUX_SERIAL_PTY
2061
#endif
2062
2067
#ifdef MY_LINUX_IS_SERIAL_PTY
2068
#warning MY_LINUX_IS_SERIAL_PTY is deprecated, please use MY_LINUX_SERIAL_IS_PTY
2069
#define MY_LINUX_SERIAL_IS_PTY
2070
#endif
2071
2079
//#define MY_LINUX_SERIAL_IS_PTY
2080
2085
//#define MY_LINUX_SERIAL_GROUPNAME "tty"
2086
2093
#ifndef MY_LINUX_CONFIG_FILE
2094
#define MY_LINUX_CONFIG_FILE "/etc/mysensors.conf"
2095
#endif
2096
// End of LinuxSettingGrpPub group // End of PlatformSettingGrpPub group
2098
2099
/*
2100
* "Helper" definitions
2101
*/
2102
2103
/*
2104
* Detect node type
2105
* MY_GATEWAY_FEATURE is set for gateway sketches.
2106
* MY_IS_GATEWAY is true when @ref MY_GATEWAY_FEATURE is set.
2107
* MY_NODE_TYPE contain a string describing the class of sketch/node (gateway/repeater/node).
2108
*/
2109
#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)
2110
#define MY_GATEWAY_FEATURE
2111
#define MY_IS_GATEWAY (true)
2112
#define MY_NODE_TYPE "GW"
2113
#elif defined(MY_REPEATER_FEATURE)
2114
#define MY_IS_GATEWAY (false)
2115
#define MY_NODE_TYPE "REPEATER"
2116
#elif defined(DOXYGEN)
2117
#define MY_IS_GATEWAY
2118
#define MY_NODE_TYPE
2119
#else
2120
#define MY_IS_GATEWAY (false)
2121
#define MY_NODE_TYPE "NODE"
2122
#endif
2123
2124
// DEBUG
2125
#if defined(MY_DISABLED_SERIAL) && !defined(MY_DEBUG_OTA)
2126
#undef MY_DEBUG
2127
#endif
2128
#if defined(MY_DEBUG)
2129
// standard debug output
2130
#define MY_DEBUG_VERBOSE_CORE
2131
#define MY_DEBUG_VERBOSE_TRANSPORT
2132
#define MY_DEBUG_VERBOSE_GATEWAY
2133
#define MY_DEBUG_VERBOSE_OTA_UPDATE
2134
#endif
2135
2136
#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)
2137
#define DEBUG_OUTPUT_ENABLED
2138
#ifndef MY_DEBUG_OTA
2139
#define DEBUG_OUTPUT(x,...) hwDebugPrint(x, ##__VA_ARGS__)
2140
#else
2141
#ifndef MY_OTA_LOG_SENDER_FEATURE
2142
#define MY_OTA_LOG_SENDER_FEATURE
2143
#endif
2144
#ifndef MY_DEBUG_OTA_DISABLE_ECHO
2145
#define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), true, x, ##__VA_ARGS__)
2146
#else
2147
#define DEBUG_OUTPUT(x,...) OTALog((MY_DEBUG_OTA), false, x, ##__VA_ARGS__)
2148
#endif
2149
// disable radio related debugging messages
2150
#undef MY_DEBUG_VERBOSE_RF24
2151
#undef MY_DEBUG_VERBOSE_NRF5_ESB
2152
#undef MY_DEBUG_VERBOSE_RFM69
2153
#undef MY_DEBUG_VERBOSE_RFM69_REGISTERS
2154
#undef MY_DEBUG_VERBOSE_RFM95
2155
#endif
2156
#else
2157
#define DEBUG_OUTPUT(x,...)
2158
#endif
2159
2160
// temp. workaround for nRF5 verifier: redirect RF24 to NRF_ESB
2161
#if defined(ARDUINO_ARCH_NRF5) && (defined(MY_RADIO_RF24) )
2162
#undef MY_RADIO_RF24
2163
#define MY_RADIO_NRF5_ESB
2164
#endif
2165
2166
// Enable sensor network "feature" if one of the transport types was enabled
2167
#if defined(MY_RADIO_RF24) || defined(MY_RADIO_NRF5_ESB) || defined(MY_RADIO_RFM69) || defined(MY_RADIO_RFM95) || defined(MY_RS485)
2168
#define MY_SENSOR_NETWORK
2169
#endif
2170
2171
// LEDS
2172
#if !defined(MY_DEFAULT_ERR_LED_PIN) && defined(MY_HW_ERR_LED_PIN)
2173
#define MY_DEFAULT_ERR_LED_PIN MY_HW_ERR_LED_PIN
2174
#endif
2175
2176
#if !defined(MY_DEFAULT_TX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2177
#define MY_DEFAULT_TX_LED_PIN MY_HW_TX_LED_PIN
2178
#endif
2179
2180
#if !defined(MY_DEFAULT_RX_LED_PIN) && defined(MY_HW_TX_LED_PIN)
2181
#define MY_DEFAULT_RX_LED_PIN MY_HW_TX_LED_PIN
2182
#endif
2183
2184
#endif // MyConfig_h
2185
2186
// Doxygen specific constructs, not included when built normally
2187
// This is used to enable disabled macros/definitions to be included in the documentation as well.
2188
#if DOXYGEN
2189
2193
#define ARDUINO_ARCH_SAMD
2194
2199
#define ARDUINO_ARCH_NRF5
2200
2205
#define ARDUINO_ARCH_ESP8266
2206
2211
#define ARDUINO_ARCH_ESP32
2212
2217
#define ARDUINO_ARCH_AVR
2218
2223
#define ARDUINO_ARCH_STM32F1
2224
2229
#define TEENSYDUINO
2230
2231
// debug
2232
#define MY_DEBUG
2233
#define MY_DEBUGDEVICE
2234
#define MY_DEBUG_OTA
2235
#define MY_DEBUG_OTA_DISABLE_ECHO
2236
#define MY_SPECIAL_DEBUG
2237
#define MY_DISABLED_SERIAL
2238
#define MY_SPLASH_SCREEN_DISABLED
2239
// linux
2240
#define MY_LINUX_SERIAL_PORT
2241
#define MY_LINUX_SERIAL_IS_PTY
2242
#define MY_LINUX_SERIAL_GROUPNAME
2243
#define MY_LINUX_SERIAL_PTY
2244
#define MY_LINUX_IS_SERIAL_PTY
2245
// inclusion mode
2246
#define MY_INCLUSION_MODE_FEATURE
2247
#define MY_INCLUSION_BUTTON_FEATURE
2248
// OTA logging and debug
2249
#define MY_OTA_LOG_RECEIVER_FEATURE
2250
#define MY_OTA_LOG_SENDER_FEATURE
2251
// transport
2252
#define MY_PARENT_NODE_IS_STATIC
2253
#define MY_REGISTRATION_CONTROLLER
2254
#define MY_TRANSPORT_UPLINK_CHECK_DISABLED
2255
#define MY_TRANSPORT_SANITY_CHECK
2256
#define MY_NODE_LOCK_FEATURE
2257
#define MY_REPEATER_FEATURE
2258
#define MY_PASSIVE_NODE
2259
#define MY_MQTT_CLIENT_PUBLISH_RETAIN
2260
#define MY_MQTT_PASSWORD
2261
#define MY_MQTT_USER
2262
#define MY_MQTT_CLIENT_ID
2263
#define MY_MQTT_PUBLISH_TOPIC_PREFIX
2264
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX
2265
#define MY_SIGNAL_REPORT_ENABLED
2266
// general
2267
#define MY_WITH_LEDS_BLINKING_INVERSE
2268
#define MY_INDICATION_HANDLER
2269
#define MY_DISABLE_REMOTE_RESET
2270
#define MY_DISABLE_RAM_ROUTING_TABLE_FEATURE
2271
#define MY_LOCK_DEVICE
2272
// core
2273
#define MY_CORE_ONLY
2274
// GW
2275
#define MY_DEBUG_VERBOSE_GATEWAY
2276
#define MY_INCLUSION_BUTTON_EXTERNAL_PULLUP
2277
#define MY_INCLUSION_LED_PIN
2278
#define MY_GATEWAY_W5100
2279
#define MY_GATEWAY_ENC28J60
2280
#define MY_GATEWAY_ESP8266
2281
#define MY_GATEWAY_ESP32
2282
#define MY_WIFI_SSID
2283
#define MY_WIFI_BSSID
2284
#define MY_WIFI_PASSWORD
2285
#define MY_HOSTNAME
2286
#define MY_GATEWAY_LINUX
2287
#define MY_GATEWAY_TINYGSM
2288
#define MY_GATEWAY_MQTT_CLIENT
2289
#define MY_GATEWAY_SERIAL
2290
#define MY_IP_ADDRESS
2291
#define MY_IP_GATEWAY_ADDRESS
2292
#define MY_IP_SUBNET_ADDRESS
2293
#define MY_USE_UDP
2294
#define MY_CONTROLLER_IP_ADDRESS
2295
#define MY_CONTROLLER_URL_ADDRESS
2296
// TinyGSM
2297
#define MY_GSM_APN
2298
#define MY_GSM_BAUDRATE
2299
#define MY_GSM_PIN
2300
#define MY_GSM_PSW
2301
#define MY_GSM_RX
2302
#define MY_GSM_SSID
2303
#define MY_GSM_TX
2304
#define MY_GSM_USR
2305
// LED
2306
#define MY_DEFAULT_ERR_LED_PIN
2307
#define MY_DEFAULT_TX_LED_PIN
2308
#define MY_DEFAULT_RX_LED_PIN
2309
// signing
2310
#define MY_SECURITY_SIMPLE_PASSWD
2311
#define MY_SIGNING_SIMPLE_PASSWD
2312
#define MY_ENCRYPTION_SIMPLE_PASSWD
2313
#define MY_SIGNING_ATSHA204
2314
#define MY_SIGNING_SOFT
2315
#define MY_SIGNING_REQUEST_SIGNATURES
2316
#define MY_SIGNING_WEAK_SECURITY
2317
#define MY_SIGNING_NODE_WHITELISTING
2318
#define MY_DEBUG_VERBOSE_SIGNING
2319
#define MY_SIGNING_FEATURE
2320
#define MY_ENCRYPTION_FEATURE
2321
// FOTA update
2322
#define MY_DEBUG_VERBOSE_OTA_UPDATE
2323
#define MY_OTA_USE_I2C_EEPROM
2324
// RS485
2325
#define MY_RS485
2326
#define MY_RS485_DE_PIN
2327
#define MY_RS485_DE_INVERSE
2328
#define MY_RS485_HWSERIAL
2329
// RF24
2330
#define MY_RADIO_RF24
2331
#define MY_RADIO_NRF24 //deprecated
2332
#define MY_DEBUG_VERBOSE_RF24
2333
#define MY_RF24_POWER_PIN
2334
#define MY_RF24_IRQ_PIN
2335
#define MY_RF24_ENABLE_ENCRYPTION
2336
#define MY_RX_MESSAGE_BUFFER_FEATURE
2337
#define MY_RX_MESSAGE_BUFFER_SIZE
2338
// NRF5_ESB
2339
#define MY_RADIO_NRF5_ESB
2340
#define MY_NRF5_ESB_ENABLE_ENCRYPTION
2341
#define MY_DEBUG_VERBOSE_NRF5_ESB
2342
#define MY_NRF5_ESB_REVERSE_ACK_RX
2343
#define MY_NRF5_ESB_REVERSE_ACK_TX
2344
// RFM69
2345
#define MY_RADIO_RFM69
2346
#define MY_IS_RFM69HW
2347
#define MY_RFM69_NEW_DRIVER
2348
#define MY_RFM69_POWER_PIN
2349
#define MY_RFM69_MODEM_CONFIGURATION
2350
#define MY_RFM69_ENABLE_ENCRYPTION
2351
#define MY_RFM69_ATC_MODE_DISABLED
2352
#define MY_RFM69_MAX_POWER_LEVEL_DBM
2353
#define MY_RFM69_RST_PIN
2354
#define MY_DEBUG_VERBOSE_RFM69
2355
#define MY_DEBUG_VERBOSE_RFM69_REGISTERS
2356
// RFM95
2357
#define MY_RADIO_RFM95
2358
#define MY_DEBUG_VERBOSE_RFM95
2359
#define MY_RFM95_ENABLE_ENCRYPTION
2360
#define MY_RFM95_ATC_MODE_DISABLED
2361
#define MY_RFM95_RST_PIN
2362
#define MY_RFM95_MODEM_CONFIGRUATION
2363
#define MY_RFM95_POWER_PIN
2364
#define MY_RFM95_TCXO
2365
#define MY_RFM95_MAX_POWER_LEVEL_DBM
2366
// SOFT-SPI
2367
#define MY_SOFTSPI
2368
#endif
2369
// End of MyConfig group
Copyright (C) 2013-2019 Sensnology AB. Generated by
doxygen
1.8.17