mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 04:06:34 +00:00
Add influxdb support to zigbee (#16417)
This commit is contained in:
parent
5639b48c1a
commit
a43eaef01b
@ -500,6 +500,8 @@
|
|||||||
#undef FALLBACK_MODULE
|
#undef FALLBACK_MODULE
|
||||||
#define FALLBACK_MODULE SONOFF_ZB_BRIDGE // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
#define FALLBACK_MODULE SONOFF_ZB_BRIDGE // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
||||||
|
|
||||||
|
#define USE_INFLUXDB // Enable influxdb support (+5k code)
|
||||||
|
|
||||||
#undef SERIAL_LOG_LEVEL
|
#undef SERIAL_LOG_LEVEL
|
||||||
#define SERIAL_LOG_LEVEL LOG_LEVEL_NONE // [SerialLog] (LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE)
|
#define SERIAL_LOG_LEVEL LOG_LEVEL_NONE // [SerialLog] (LOG_LEVEL_NONE, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, LOG_LEVEL_DEBUG_MORE)
|
||||||
|
|
||||||
|
@ -459,6 +459,8 @@
|
|||||||
#undef FALLBACK_MODULE
|
#undef FALLBACK_MODULE
|
||||||
#define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
#define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template
|
||||||
|
|
||||||
|
#define USE_INFLUXDB // Enable influxdb support (+5k code)
|
||||||
|
|
||||||
#undef USE_DOMOTICZ
|
#undef USE_DOMOTICZ
|
||||||
#undef USE_HOME_ASSISTANT
|
#undef USE_HOME_ASSISTANT
|
||||||
#define USE_TASMOTA_DISCOVERY // Enable Tasmota Discovery support (+2k code)
|
#define USE_TASMOTA_DISCOVERY // Enable Tasmota Discovery support (+2k code)
|
||||||
|
@ -565,6 +565,10 @@ void Z_Device::jsonPublishAttrList(const char * json_prefix, const Z_attribute_l
|
|||||||
ResponseAppend_P(PSTR("}"));
|
ResponseAppend_P(PSTR("}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USE_INFLUXDB
|
||||||
|
InfluxDbProcess(1); // Use a copy of ResponseData
|
||||||
|
#endif
|
||||||
|
|
||||||
if (Settings->flag4.zigbee_distinct_topics) {
|
if (Settings->flag4.zigbee_distinct_topics) {
|
||||||
char subtopic[TOPSZ];
|
char subtopic[TOPSZ];
|
||||||
if (Settings->flag4.zb_topic_fname && friendlyName && strlen(friendlyName)) {
|
if (Settings->flag4.zb_topic_fname && friendlyName && strlen(friendlyName)) {
|
||||||
|
@ -373,7 +373,7 @@ void InfluxDbProcessJson(bool use_copy = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InfluxDbProcess(bool use_copy) {
|
void InfluxDbProcess(bool use_copy) {
|
||||||
if (Settings->sbflag1.influxdb_sensor) {
|
if (Settings->sbflag1.influxdb_sensor) { // IfxSensor
|
||||||
InfluxDbProcessJson(use_copy);
|
InfluxDbProcessJson(use_copy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -476,9 +476,9 @@ void CmndInfluxDbState(void) {
|
|||||||
|
|
||||||
void CmndInfluxDbSensor(void) {
|
void CmndInfluxDbSensor(void) {
|
||||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) {
|
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) {
|
||||||
Settings->sbflag1.influxdb_sensor = XdrvMailbox.payload;
|
Settings->sbflag1.influxdb_sensor = XdrvMailbox.payload; // IfxSensor
|
||||||
}
|
}
|
||||||
ResponseCmndStateText(Settings->sbflag1.influxdb_sensor);
|
ResponseCmndStateText(Settings->sbflag1.influxdb_sensor); // IfxSensor
|
||||||
}
|
}
|
||||||
|
|
||||||
void CmndInfluxDbLog(void) {
|
void CmndInfluxDbLog(void) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user