Merge pull request #13235 from ascillato/Allow-KNX-and-Zigbee

Fix Optional Compilation of ZigBee with KNX
This commit is contained in:
Adrian Scillato 2021-09-29 17:11:33 -03:00 committed by GitHub
commit 86e72bbedd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -61,7 +61,7 @@ lib_extra_dirs = lib/lib_basic
[env:tasmota-zbbridge]
build_flags = ${env.build_flags} -DFIRMWARE_ZBBRIDGE
board = esp8266_zbbridge
lib_extra_dirs = lib/lib_basic, lib/lib_ssl
lib_extra_dirs = lib/lib_basic, lib/lib_ssl, lib/lib_div
[env:tasmota-zigbee]
build_flags = ${env.build_flags} -DUSE_ZIGBEE -DUSE_CCLOADER -DUSE_UFILESYS

View File

@ -503,7 +503,7 @@
#define USE_TLS // flag indicates we need to include TLS code
#endif // USE_ZBBRIDGE_TLS
#undef USE_KNX // Disable KNX IP Protocol Support
//#undef USE_KNX // Disable KNX IP Protocol Support
//#undef USE_WEBSERVER // Disable Webserver
#undef USE_ENHANCED_GUI_WIFI_SCAN // Disable wifi scan output with BSSID (+0k5 code)
//#undef USE_WEBSEND_RESPONSE // Disable command WebSend response message (+1k code)

View File

@ -644,6 +644,7 @@ void KNX_CB_Action(message_t const &msg, void *arg)
knx.answer_4byte_float(msg.received_on, last_hum);
}
}
#if defined(USE_ENERGY_SENSOR)
else if (chan->type == KNX_ENERGY_VOLTAGE) // Reply KNX_ENERGY_VOLTAGE
{
knx.answer_4byte_float(msg.received_on, Energy.voltage[0]);
@ -701,6 +702,7 @@ void KNX_CB_Action(message_t const &msg, void *arg)
knx.answer_4byte_float(msg.received_on, Energy.total);
}
}
#endif
#ifdef USE_RULES
else if ((chan->type >= KNX_SLOT1) && (chan->type <= KNX_SLOT5)) // KNX RX SLOTs (read command)
{