Mqtt discovery (#320)
* add mqtt discovery (compatibile with home assistant) with omg status binary sensor & bme280 sensor * added mqtt discovery to Test_config.h for ESP32 (ESP8266 & other boards was not tested) * include support for ESP8266 & arduino mega * fix getting MAC for esp8266 * esp8266 fix * make mqtt discovery functions functions more generic, readable and easy to use & extend * make mqtt discovery functions functions more generic, readable and easy to use & extend PART 2 * remove the macro for each attribute and supposing that if there is a bme280 we expose all
This commit is contained in:
1 parent
67dd7ac078
commit
81c02c850e
5 files changed
+218
-5
No files matched your search
@@ -129,6 +129,7 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
|
||||
#define ZgatewayRFM69 "RFM69"// If you uncomment this you can't use RF and BT due to the fact that RF use also D8 and BT use also D6/D7
|
||||
#define ZsensorGPIOInput "GPIOInput"
|
||||
#define ZsensorGPIOKeyCode "GPIOKeyCode"
|
||||
#define ZmqttDiscovery "HADiscovery"//ESP8266, Arduino, EPS32, Sonoff RF Bridge
|
||||
#define jsonPublishing true
|
||||
#define simplePublishing true
|
||||
#elif ESP32
|
||||
@@ -149,6 +150,7 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
|
||||
#define ZgatewayRFM69 "RFM69"
|
||||
#define ZsensorGPIOInput "GPIOInput"
|
||||
#define ZsensorGPIOKeyCode "GPIOKeyCode"
|
||||
#define ZmqttDiscovery "HADiscovery"//ESP8266, Arduino, EPS32, Sonoff RF Bridge
|
||||
#define jsonPublishing true
|
||||
#define simplePublishing true
|
||||
#elif defined(__AVR_ATmega1280__)
|
||||
@@ -171,6 +173,7 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress
|
||||
#define ZgatewayRFM69 "RFM69"// If you uncomment this you can't use RF and BT due to the fact that RF use also D8 and BT use also D6/D7
|
||||
#define ZsensorGPIOInput "GPIOInput"
|
||||
#define ZsensorGPIOKeyCode "GPIOKeyCode"
|
||||
#define ZmqttDiscovery "HADiscovery"//ESP8266, Arduino, EPS32, Sonoff RF Bridge
|
||||
#define jsonPublishing true
|
||||
#define simplePublishing true
|
||||
#else // for arduino Uno
|
||||
|
||||
Reference in new issue
Block a user