config.h 6.19 KB
Newer Older
DV's avatar
DV committed
1
2
3
#ifndef config_h
#define config_h

DV's avatar
DV committed
4
5
6
7
/**********************************
 * Sketch configuration
 */

8
#define SKETCH_NAME "NodeManager"
user2684's avatar
user2684 committed
9
#define SKETCH_VERSION "1.0"
DV's avatar
DV committed
10

DV's avatar
DV committed
11
/**********************************
12
 * MySensors node configuration
DV's avatar
DV committed
13
 */
14
15

// General settings
16
#define MY_BAUD_RATE 9600
DV's avatar
DV committed
17
//#define MY_DEBUG
18
//#define MY_NODE_ID 100
19
//#define MY_SMART_SLEEP_WAIT_DURATION_MS 500
DV's avatar
DV committed
20

21
// NRF24 radio settings
user2684's avatar
user2684 committed
22
#define MY_RADIO_NRF24
23
//#define MY_RF24_ENABLE_ENCRYPTION
DV's avatar
DV committed
24
//#define MY_RF24_CHANNEL 76
25
//#define MY_RF24_PA_LEVEL RF24_PA_HIGH
26
//#define MY_DEBUG_VERBOSE_RF24
27
//#define MY_RF24_DATARATE RF24_250KBPS
DV's avatar
DV committed
28

29
// RFM69 radio settings
DV's avatar
DV committed
30
31
32
//#define MY_RADIO_RFM69
//#define MY_RFM69_FREQUENCY RF69_868MHZ
//#define MY_IS_RFM69HW
33
//#define MY_DEBUG_VERBOSE_RFM69
34
//#define MY_RFM69_NEW_DRIVER
DV's avatar
DV committed
35
36
//#define MY_RFM69_ENABLE_ENCRYPTION
//#define MY_RFM69_NETWORKID 100
37
38
39
40
//#define MY_RF69_IRQ_PIN D1
//#define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN
//#define MY_RF69_SPI_CS D2

user2684's avatar
user2684 committed
41
42
43
44
45
46
47
// RS485 serial transport settings
//#define MY_RS485
//#define MY_RS485_BAUD_RATE 9600
//#define MY_RS485_DE_PIN 2
//#define MY_RS485_MAX_MESSAGE_LENGTH 40
//#define MY_RS485_HWSERIAL Serial1

48
49
50
51
52
53
54
55
56
57
58
59
// Message signing settings
//#define MY_SIGNING_SOFT
//#define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
//#define MY_SIGNING_REQUEST_SIGNATURES
//#define MY_SIGNING_ATSHA204

// OTA Firmware update settings
//#define MY_OTA_FIRMWARE_FEATURE
//#define OTA_WAIT_PERIOD 300
//#define FIRMWARE_MAX_REQUESTS 2
//#define MY_OTA_RETRY 2

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/**********************************
 * MySensors gateway configuration
 */
// Common gateway settings
//#define MY_REPEATER_FEATURE

// Serial gateway settings
//#define MY_GATEWAY_SERIAL

// Ethernet gateway settings
//#define MY_GATEWAY_W5100

// ESP8266 gateway settings
//#define MY_GATEWAY_ESP8266
//#define MY_ESP8266_SSID ""
//#define MY_ESP8266_PASSWORD ""

// Gateway networking settings
//#define MY_IP_ADDRESS 192,168,178,87
//#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
//#define MY_IP_SUBNET_ADDRESS 255,255,255,0
//#define MY_PORT 5003
//#define MY_GATEWAY_MAX_CLIENTS 2
//#define MY_USE_UDP

// Gateway MQTT settings
//#define MY_GATEWAY_MQTT_CLIENT
//#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
//#define MY_PORT 1883
//#define MY_MQTT_USER "username"
//#define MY_MQTT_PASSWORD "password"
//#define MY_MQTT_CLIENT_ID "mysensors-1"
//#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
//#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"

// Gateway inclusion mode
//#define MY_INCLUSION_MODE_FEATURE
//#define MY_INCLUSION_BUTTON_FEATURE
//#define MY_INCLUSION_MODE_DURATION 60
//#define MY_DEFAULT_LED_BLINK_PERIOD 300

// Gateway Leds settings
//#define MY_DEFAULT_ERR_LED_PIN 4
//#define MY_DEFAULT_RX_LED_PIN  5
//#define MY_DEFAULT_TX_LED_PIN  6
DV's avatar
DV committed
105
106
107
108

/***********************************
 * NodeManager configuration
 */
DV's avatar
DV committed
109
110
111
112

// if enabled, enable debug messages on serial port
#define DEBUG 1

DV's avatar
DV committed
113
114
115
116
117
118
// if enabled, enable the capability to power on sensors with the arduino's pins to save battery while sleeping
#define POWER_MANAGER 1
// if enabled, will load the battery manager library to allow the battery level to be reported automatically or on demand
#define BATTERY_MANAGER 1
// if enabled, allow modifying the configuration remotely by interacting with the configuration child id
#define REMOTE_CONFIGURATION 1
DV's avatar
DV committed
119
// if enabled, persist the remote configuration settings on EEPROM
DV's avatar
DV committed
120
#define PERSIST 0
user2684's avatar
user2684 committed
121
// if enabled, a battery sensor will be created at BATTERY_CHILD_ID (201 by default) and will report vcc voltage together with the battery level percentage
DV's avatar
DV committed
122
#define BATTERY_SENSOR 1
user2684's avatar
user2684 committed
123
124
// if enabled, a signal sensor will be created at RSSI_CHILD_ID (202 by default) and will report the signal quality of the transport layer
#define SIGNAL_SENSOR 1
125
126
// if enabled, send a SLEEPING and AWAKE service messages just before entering and just after leaving a sleep cycle and STARTED when starting/rebooting
#define SERVICE_MESSAGES 0
DV's avatar
DV committed
127

128
// Enable this module to use one of the following sensors: SENSOR_ANALOG_INPUT, SENSOR_LDR, SENSOR_THERMISTOR, SENSOR_ML8511, SENSOR_ACS712, SENSOR_RAIN, SENSOR_SOIL_MOISTURE
DV's avatar
DV committed
129
130
#define MODULE_ANALOG_INPUT 1
// Enable this module to use one of the following sensors: SENSOR_DIGITAL_INPUT
131
#define MODULE_DIGITAL_INPUT 1
DV's avatar
DV committed
132
// Enable this module to use one of the following sensors: SENSOR_DIGITAL_OUTPUT, SENSOR_RELAY, SENSOR_LATCHING_RELAY
133
#define MODULE_DIGITAL_OUTPUT 1
134
// Enable this module to use one of the following sensors: SENSOR_DHT11, SENSOR_DHT22, SENSOR_DHT21
DV's avatar
DV committed
135
#define MODULE_DHT 0
DV's avatar
DV committed
136
137
// Enable this module to use one of the following sensors: SENSOR_SHT21
#define MODULE_SHT21 0
DV's avatar
DV committed
138
139
140
141
// Enable this module to use one of the following sensors: SENSOR_SWITCH, SENSOR_DOOR, SENSOR_MOTION
#define MODULE_SWITCH 0
// Enable this module to use one of the following sensors: SENSOR_DS18B20
#define MODULE_DS18B20 0
DV's avatar
DV committed
142
143
144
145
// Enable this module to use one of the following sensors: SENSOR_BH1750
#define MODULE_BH1750 0
// Enable this module to use one of the following sensors: SENSOR_MLX90614
#define MODULE_MLX90614 0
146
147
// Enable this module to use one of the following sensors: SENSOR_BME280
#define MODULE_BME280 0
148
149
150
151
152
153
// Enable this module to use one of the following sensors: SENSOR_SONOFF
#define MODULE_SONOFF 0
// Enable this module to use one of the following sensors: SENSOR_BMP085
#define MODULE_BMP085 0
// Enable this module to use one of the following sensors: SENSOR_HCSR04
#define MODULE_HCSR04 0
154
155
// Enable this module to use one of the following sensors: SENSOR_MCP9808
#define MODULE_MCP9808 0
156
157
// Enable this module to use one of the following sensors: SENSOR_MQ
#define MODULE_MQ 0
158
159
// Enable this module to use one of the following sensors: SENSOR_MHZ19
#define MODULE_MHZ19 0
160
161
162
163
164
165
// Enable this module to use one of the following sensors: SENSOR_AM2320    
#define MODULE_AM2320 0
// Enable this module to use one of the following sensors: SENSOR_TSL2561    
#define MODULE_TSL2561 0
// Enable this module to use one of the following sensors: SENSOR_PT100
#define MODULE_PT100 0
166
167
// Enable this module to use one of the following sensors: SENSOR_BMP280
#define MODULE_BMP280 0
168
169
// Enable this module to use one of the following sensors: SENSOR_DIMMER
#define MODULE_DIMMER 0
170
171
// Enable this module to use one of the following sensors: SENSOR_RAIN_GAUGE, SENSOR_POWER_METER, SENSOR_WATER_METER
#define MODULE_PULSE_METER 0
172

DV's avatar
DV committed
173
#endif
174