diff --git a/NodeManager.cpp b/NodeManager.cpp index bcee7dba9955c185105416e4434117ff70972403..e996aab2b5a8552de5a388063d0e5ac5ed852698 100755 --- a/NodeManager.cpp +++ b/NodeManager.cpp @@ -303,16 +303,27 @@ char* Sensor::getValueString() { return _last_value_string; } +// After how many seconds the sensor will report back its measure +void Sensor::setReportIntervalSeconds(int value) { + _report_timer->start(value,SECONDS); +} + // After how many minutes the sensor will report back its measure void Sensor::setReportIntervalMinutes(int value) { _report_timer->start(value,MINUTES); } -// After how many seconds the sensor will report back its measure -void Sensor::setReportIntervalSeconds(int value) { - _report_timer->start(value,SECONDS); +// After how many minutes the sensor will report back its measure +void Sensor::setReportIntervalHours(int value) { + _report_timer->start(value,HOURS); +} + +// After how many minutes the sensor will report back its measure +void Sensor::setReportIntervalDays(int value) { + _report_timer->start(value,DAYS); } + // return true if the report interval has been already configured bool Sensor::isReportIntervalConfigured() { return _report_timer->isConfigured(); @@ -471,6 +482,8 @@ void Sensor::process(Request & request) { #endif case 16: setReportIntervalMinutes(request.getValueInt()); break; case 17: setReportIntervalSeconds(request.getValueInt()); break; + case 19: setReportIntervalHours(request.getValueInt()); break; + case 20: setReportIntervalDays(request.getValueInt()); break; case 18: setForceUpdateHours(request.getValueInt()); break; default: return; } @@ -2957,9 +2970,18 @@ int NodeManager::getRetries() { void NodeManager::setBatteryMax(float value) { _battery_max = value; } + void NodeManager::setBatteryReportSeconds(int value) { + _battery_report_timer.set(value,SECONDS); + } void NodeManager::setBatteryReportMinutes(int value) { _battery_report_timer.set(value,MINUTES); } + void NodeManager::setBatteryReportHours(int value) { + _battery_report_timer.set(value,HOURS); + } + void NodeManager::setBatteryReportDays(int value) { + _battery_report_timer.set(value,DAYS); + } void NodeManager::setBatteryInternalVcc(bool value) { _battery_internal_vcc = value; } @@ -2973,6 +2995,7 @@ int NodeManager::getRetries() { _battery_report_with_interrupt = value; } #endif + void NodeManager::setSleepSeconds(int value) { // set the status to AWAKE if the time provided is 0, SLEEP otherwise if (value == 0) _status = AWAKE; @@ -3354,7 +3377,9 @@ void NodeManager::before() { } // print out MySensors' library capabilities #if DEBUG == 1 - Serial.print(F("LIB R=")); + Serial.print(F("LIB V=")); + Serial.print(MYSENSORS_LIBRARY_VERSION); + Serial.print(F(" R=")); Serial.print(MY_CAP_RADIO); #ifdef MY_CAP_ENCR Serial.print(F(" E=")); @@ -3380,6 +3405,11 @@ void NodeManager::before() { if (! _battery_report_timer.isConfigured()) _battery_report_timer.set(60,MINUTES); _battery_report_timer.start(); #endif + #if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + // if not already configured, report signal level every 60 minutes + if (! _signal_report_timer.isConfigured()) _signal_report_timer.set(60,MINUTES); + _signal_report_timer.start(); + #endif // setup individual sensors for (int i = 1; i <= MAX_SENSORS; i++) { if (_sensors[i] == 0) continue; @@ -3408,6 +3438,12 @@ void NodeManager::presentation() { // report battery level batteryReport(); #endif + #if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + // present the signal service + _present(SIGNAL_CHILD_ID, S_SOUND); + // report battery level + signalReport(); + #endif // present each sensor for (int i = 1; i <= MAX_SENSORS; i++) { if (_sensors[i] == 0) continue; @@ -3457,6 +3493,17 @@ void NodeManager::loop() { _battery_report_timer.restart(); } #endif + #if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + // update the timer for signal report when not waking up from an interrupt + if (_signal_report_timer.isRunning() && _last_interrupt_pin == -1) _signal_report_timer.update(); + // if it is time to report the signal level + if (_signal_report_timer.isOver()) { + // time to report the signal level again + signalReport(); + // restart the timer + _signal_report_timer.restart(); + } + #endif #if POWER_MANAGER == 1 // turn on the pin powering all the sensors if (_auto_power_pins) powerOn(); @@ -3610,6 +3657,21 @@ void NodeManager::process(Request & request) { case 30: setSleepOrWait(request.getValueInt()); break; case 31: setRebootPin(request.getValueInt()); break; case 32: setADCOff(); break; + #if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + case 33: setSignalReportMinutes(request.getValueInt()); break; + case 43: setSignalReportSeconds(request.getValueInt()); break; + case 44: setSignalReportHours(request.getValueInt()); break; + case 45: setSignalReportDays(request.getValueInt()); break; + case 34: setSignalCommand(request.getValueInt()); break; + case 35: signalReport(); break; + #endif + case 36: setReportIntervalSeconds(request.getValueInt()); break; + case 37: setReportIntervalMinutes(request.getValueInt()); break; + case 38: setReportIntervalHours(request.getValueInt()); break; + case 39: setReportIntervalDays(request.getValueInt()); break; + case 40: setBatteryReportSeconds(request.getValueInt()); break; + case 41: setBatteryReportHours(request.getValueInt()); break; + case 42: setBatteryReportDays(request.getValueInt()); break; default: return; } _send(_msg.set(function)); @@ -3759,14 +3821,24 @@ int NodeManager::getLastInterruptPin() { return _last_interrupt_pin; } +// set the default interval in seconds all the sensors will report their measures +void NodeManager::setReportIntervalSeconds(int value) { + _report_interval_seconds = value; +} + // set the default interval in minutes all the sensors will report their measures void NodeManager::setReportIntervalMinutes(int value) { _report_interval_seconds = value*60; } -// set the default interval in seconds all the sensors will report their measures -void NodeManager::setReportIntervalSeconds(int value) { - _report_interval_seconds = value; +// set the default interval in hours all the sensors will report their measures +void NodeManager::setReportIntervalHours(int value) { + _report_interval_seconds = value*60*60; +} + +// set the default interval in days all the sensors will report their measures +void NodeManager::setReportIntervalDays(int value) { + _report_interval_seconds = value*60*60*24; } // if set and when the board is battery powered, sleep() is always called instead of wait() @@ -3794,6 +3866,34 @@ void NodeManager::sleepOrWait(long value) { else wait(value); } +#if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + void NodeManager::setSignalReportSeconds(int value) { + _signal_report_timer.set(value,SECONDS); + } + void NodeManager::setSignalReportMinutes(int value) { + _signal_report_timer.set(value,MINUTES); + } + void NodeManager::setSignalReportHours(int value) { + _signal_report_timer.set(value,HOURS); + } + void NodeManager::setSignalReportDays(int value) { + _signal_report_timer.set(value,DAYS); + } + void NodeManager::setSignalCommand(int value) { + _signal_command = value; + } + void NodeManager::signalReport() { + int16_t value = transportGetSignalReport(_signal_command); + #if DEBUG == 1 + Serial.print(F("SIG V=")); + Serial.println(value); + #endif + // report signal level + MyMessage signal_msg(SIGNAL_CHILD_ID, V_LEVEL); + _send(signal_msg.set(value)); + } +#endif + // handle an interrupt void NodeManager::_onInterrupt_1() { long now = millis(); diff --git a/NodeManager.h b/NodeManager.h index a0f94b8282fb4904dc013b972f99cf9bc84bf45e..87d3b68b423c2d80e9d8a7ec7521b71ddd14aedf 100755 --- a/NodeManager.h +++ b/NodeManager.h @@ -80,10 +80,14 @@ #ifndef SERVICE_MESSAGES #define SERVICE_MESSAGES 0 #endif -// if enabled, a battery sensor will be created at BATTERY_CHILD_ID and will report vcc voltage together with the battery level percentage +// 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 #ifndef BATTERY_SENSOR #define BATTERY_SENSOR 1 #endif +// if enabled, a RSSI sensor will be created at SIGNAL_CHILD_ID (202 by default) and will report the signal quality of the transport layer +#ifndef SIGNAL_SENSOR + #define SIGNAL_SENSOR 1 +#endif // the child id used to allow remote configuration #ifndef CONFIGURATION_CHILD_ID @@ -93,6 +97,10 @@ #ifndef BATTERY_CHILD_ID #define BATTERY_CHILD_ID 201 #endif +// the child id used to report the rssi level to the controller +#ifndef SIGNAL_CHILD_ID + #define SIGNAL_CHILD_ID 202 +#endif // define the maximum number of sensors that can be managed #ifndef MAX_SENSORS #define MAX_SENSORS 10 @@ -324,6 +332,8 @@ enum supported_sensors { // include MySensors libraries #include <core/MySensorsCore.h> #include <core/MyCapabilities.h> +#include <core/MyTransport.h> +#include <core/Version.h> // include third party libraries #if MODULE_DHT == 1 @@ -523,10 +533,14 @@ class Sensor { int getValueInt(); float getValueFloat(); char* getValueString(); - // [16] After how many minutes the sensor will report back its measure (default: 10 minutes) - void setReportIntervalMinutes(int value); // [17] After how many minutes the sensor will report back its measure (default: 10 minutes) void setReportIntervalSeconds(int value); + // [16] After how many minutes the sensor will report back its measure (default: 10 minutes) + void setReportIntervalMinutes(int value); + // [19] After how many hours the sensor will report back its measure (default: 10 minutes) + void setReportIntervalHours(int value); + // [20] After how many days the sensor will report back its measure (default: 10 minutes) + void setReportIntervalDays(int value); // return true if the report interval has been already configured bool isReportIntervalConfigured(); // process a remote request @@ -1388,8 +1402,14 @@ class NodeManager { void setBatteryMin(float value); // [12] the expected vcc when the batter is fully charged, used to calculate the percentage (default: 3.3) void setBatteryMax(float value); - // [14] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60) + // [14] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) void setBatteryReportMinutes(int value); + // [40] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) + void setBatteryReportSeconds(int value); + // [41] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) + void setBatteryReportHours(int value); + // [42] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) + void setBatteryReportDays(int value); // [15] if true, the battery level will be evaluated by measuring the internal vcc without the need to connect any pin, if false the voltage divider methon will be used (default: true) void setBatteryInternalVcc(bool value); // [16] if setBatteryInternalVcc() is set to false, the analog pin to which the battery's vcc is attached (https://www.mysensors.org/build/battery) (default: -1) @@ -1476,11 +1496,14 @@ class NodeManager { void setupInterrupts(); // return the pin from which the last interrupt came int getLastInterruptPin(); - // set the default interval in minutes all the sensors will report their measures. - // If the same function is called on a specific sensor, this will not change the previously set value - // For sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) - void setReportIntervalMinutes(int value); + // [36] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) void setReportIntervalSeconds(int value); + // [37] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) + void setReportIntervalMinutes(int value); + // [38] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) + void setReportIntervalHours(int value); + // [39] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) + void setReportIntervalDays(int value); // [30] if set and when the board is battery powered, sleep() is always called instead of wait() (default: true) void setSleepOrWait(bool value); // sleep if the node is a battery powered or wait if it is not for the given number of milliseconds @@ -1489,6 +1512,20 @@ class NodeManager { void setRebootPin(int value); // [32] turn the ADC off so to save 0.2 mA void setADCOff(); + #if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + // [33] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportMinutes(int value); + // [43] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportSeconds(int value); + // [44] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportHours(int value); + // [45] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportDays(int value); + // [34] define which signal report to send. Possible values are SR_UPLINK_QUALITY, SR_TX_POWER_LEVEL, SR_TX_POWER_PERCENT, SR_TX_RSSI, SR_RX_RSSI, SR_TX_SNR, SR_RX_SNR (default: SR_RX_RSSI) + void setSignalCommand(int value); + // [35] report the signal level to the controller + void signalReport(); + #endif // hook into the main sketch functions void before(); void presentation(); @@ -1514,6 +1551,10 @@ class NodeManager { PowerManager _powerManager; bool _auto_power_pins = true; #endif + #if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + Timer _signal_report_timer = Timer(this); + int _signal_command = SR_RX_RSSI; + #endif MyMessage _msg; void _send(MyMessage & msg); int _status = AWAKE; diff --git a/NodeManager.ino b/NodeManager.ino index e42bf43569716623021feac9af3f81754a5cce06..7d585c64a924189701311ee44b5d5307193f79b9 100755 --- a/NodeManager.ino +++ b/NodeManager.ino @@ -36,7 +36,6 @@ void before() { - /* * Register above your sensors */ diff --git a/README.md b/README.md index e5cb7f1695ea070b45b0219010c1a71026fe993f..37039ed16d2999733b059b7e3cfb348a3d30028a 100755 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ NodeManager includes the following main components: * Allow waking up a sleeping node remotely at the end of a sleeping cycle * Allow powering on each connected sensor only while the node is awake to save battery * Report battery level periodically and automatically or on demand +* Report signal level periodically and automatically or on demand * Calculate battery level without requiring an additional pin and the resistors * Allow rebooting the board remotely * Provide out-of-the-box sensors personalities and automatically execute their main task at each cycle @@ -157,30 +158,32 @@ The next step is to enable NodeManager's additional functionalities and the modu #define DEBUG 1 // if enabled, enable the capability to power on sensors with the arduino's pins to save battery while sleeping -#define POWER_MANAGER 0 +#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 0 +#define BATTERY_MANAGER 1 // if enabled, allow modifying the configuration remotely by interacting with the configuration child id -#define REMOTE_CONFIGURATION 0 +#define REMOTE_CONFIGURATION 1 // if enabled, persist the remote configuration settings on EEPROM #define PERSIST 0 // if enabled, a battery sensor will be created at BATTERY_CHILD_ID and will report vcc voltage together with the battery level percentage -#define BATTERY_SENSOR 0 +#define BATTERY_SENSOR 1 +// 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 // 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 // Enable this module to use one of the following sensors: SENSOR_ANALOG_INPUT, SENSOR_LDR, SENSOR_THERMISTOR, SENSOR_ML8511, SENSOR_ACS712, SENSOR_RAIN_GAUGE, SENSOR_RAIN, SENSOR_SOIL_MOISTURE #define MODULE_ANALOG_INPUT 1 // Enable this module to use one of the following sensors: SENSOR_DIGITAL_INPUT -#define MODULE_DIGITAL_INPUT 0 +#define MODULE_DIGITAL_INPUT 1 // Enable this module to use one of the following sensors: SENSOR_DIGITAL_OUTPUT, SENSOR_RELAY, SENSOR_LATCHING_RELAY -#define MODULE_DIGITAL_OUTPUT 0 +#define MODULE_DIGITAL_OUTPUT 1 // Enable this module to use one of the following sensors: SENSOR_DHT11, SENSOR_DHT22 #define MODULE_DHT 0 // Enable this module to use one of the following sensors: SENSOR_SHT21 #define MODULE_SHT21 0 // Enable this module to use one of the following sensors: SENSOR_SWITCH, SENSOR_DOOR, SENSOR_MOTION -#define MODULE_SWITCH 1 +#define MODULE_SWITCH 0 // Enable this module to use one of the following sensors: SENSOR_DS18B20 #define MODULE_DS18B20 0 // Enable this module to use one of the following sensors: SENSOR_BH1750 @@ -246,8 +249,14 @@ The next step is to configure NodeManager with settings which will instruct how void setBatteryMin(float value); // [12] the expected vcc when the batter is fully charged, used to calculate the percentage (default: 3.3) void setBatteryMax(float value); - // [14] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60) + // [14] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) void setBatteryReportMinutes(int value); + // [40] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) + void setBatteryReportSeconds(int value); + // [41] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) + void setBatteryReportHours(int value); + // [42] after how many minutes report the battery level to the controller. When reset the battery is always reported (default: 60 minutes) + void setBatteryReportDays(int value); // [15] if true, the battery level will be evaluated by measuring the internal vcc without the need to connect any pin, if false the voltage divider methon will be used (default: true) void setBatteryInternalVcc(bool value); // [16] if setBatteryInternalVcc() is set to false, the analog pin to which the battery's vcc is attached (https://www.mysensors.org/build/battery) (default: -1) @@ -334,11 +343,14 @@ The next step is to configure NodeManager with settings which will instruct how void setupInterrupts(); // return the pin from which the last interrupt came int getLastInterruptPin(); - // set the default interval in minutes all the sensors will report their measures. - // If the same function is called on a specific sensor, this will not change the previously set value - // For sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) - void setReportIntervalMinutes(int value); + // [36] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) void setReportIntervalSeconds(int value); + // [37] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) + void setReportIntervalMinutes(int value); + // [38] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) + void setReportIntervalHours(int value); + // [39] set the default interval in minutes all the sensors will report their measures. If the same function is called on a specific sensor, this will not change the previously set value. or sleeping sensors, the elapsed time can be evaluated only upon wake up (default: 10 minutes) + void setReportIntervalDays(int value); // [30] if set and when the board is battery powered, sleep() is always called instead of wait() (default: true) void setSleepOrWait(bool value); // sleep if the node is a battery powered or wait if it is not for the given number of milliseconds @@ -347,17 +359,32 @@ The next step is to configure NodeManager with settings which will instruct how void setRebootPin(int value); // [32] turn the ADC off so to save 0.2 mA void setADCOff(); + #if SIGNAL_SENSOR == 1 && defined(MY_SIGNAL_REPORT_ENABLED) + // [33] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportMinutes(int value); + // [43] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportSeconds(int value); + // [44] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportHours(int value); + // [45] How frequenly to send a signal report to the controller (default: 60 minutes) + void setSignalReportDays(int value); + // [34] define which signal report to send. Possible values are SR_UPLINK_QUALITY, SR_TX_POWER_LEVEL, SR_TX_POWER_PERCENT, SR_TX_RSSI, SR_RX_RSSI, SR_TX_SNR, SR_RX_SNR (default: SR_RX_RSSI) + void setSignalCommand(int value); + // [35] report the signal level to the controller + void signalReport(); + #endif ~~~ ### Set reporting intervals and sleeping cycles -If not instructed differently, the node will stay in awake, all the sensors will report every 10 minutes and the battery level will be automatically reported every 60 minutes. To change those settings, you can call the following functions on the nodeManager object: +If not instructed differently, the node will stay in awake, all the sensors will report every 10 minutes. Battery level and signal level will be automatically reported every 60 minutes. To change those settings, you can call the following functions on the nodeManager object: Function | Description ------------ | ------------- setSleepSeconds()/setSleepMinutes()/setSleepHours()/setSleepDays() | the time interval the node will spend in a (smart) sleep cycle -setReportIntervalMinutes() / setReportIntervalSeconds() | the time interval the node will report the measures of all the attached sensors -setBatteryReportMinutes() | the time interval the node will report the battery level +setReportIntervalSeconds()/setReportIntervalMinutes()/setReportIntervalHours()/setReportIntervalDays() | the time interval the node will report the measures of all the attached sensors +setBatteryReportSeconds()/setBatteryReportMinutes()/setBatteryReportHours()/setBatteryReportDays() | the time interval the node will report the battery level +setSignalReportSeconds()/setSignalReportMinutes()/setSignalReportHours()/setSignalReportDays() | the time interval the node will report the radio signal level For example, to put the node to sleep in cycles of 10 minutes: @@ -506,10 +533,14 @@ The following methods are available for all the sensors and can be called on the int getValueInt(); float getValueFloat(); char* getValueString(); - // [16] After how many minutes the sensor will report back its measure (default: 10 minutes) - void setReportIntervalMinutes(int value); // [17] After how many minutes the sensor will report back its measure (default: 10 minutes) void setReportIntervalSeconds(int value); + // [16] After how many minutes the sensor will report back its measure (default: 10 minutes) + void setReportIntervalMinutes(int value); + // [19] After how many hours the sensor will report back its measure (default: 10 minutes) + void setReportIntervalHours(int value); + // [20] After how many days the sensor will report back its measure (default: 10 minutes) + void setReportIntervalDays(int value); // return true if the report interval has been already configured bool isReportIntervalConfigured(); // process a remote request @@ -1365,6 +1396,7 @@ v1.6: * Added support for MH-Z19 CO2 sensor * Added buil-in rain and soil moisture analog sensors * Added support for generic dimmer sensor (PWM output) +* Radio signal level is reported automatically and on demand through child 202 * SensorRainGauge now supports sleep mode * SensorSwitch now supports awake mode * SensorLatchingRealy now handles automatically both on and off commands diff --git a/config.h b/config.h index c367a80a6cee31989108e5aa9ae9d187f0a6597f..4a64b2cd0babee11638d6cd3b09c67c85a5f9f62 100755 --- a/config.h +++ b/config.h @@ -118,8 +118,10 @@ #define REMOTE_CONFIGURATION 1 // if enabled, persist the remote configuration settings on EEPROM #define PERSIST 0 -// if enabled, a battery sensor will be created at BATTERY_CHILD_ID and will report vcc voltage together with the battery level percentage +// 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 #define BATTERY_SENSOR 1 +// 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 // 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