diff --git a/docs/upload/web-install.md b/docs/upload/web-install.md index 300ad92ee5..c35faa45dd 100644 --- a/docs/upload/web-install.md +++ b/docs/upload/web-install.md @@ -8,10 +8,7 @@ If you want to use the BLE decoding capabilities of OpenMQTTGateway with a table ::: warning Note If you are on macOS and have a LilyGo LoRa32 V2.1 board, make sure you have the [correct driver for the CH9102 Serial Chip](https://github.com/WCHSoftGroup/ch34xser_macos) installed and selected in the popup when initiating the web install. -::: - To finalise the driver installation don't forget the confirmation in the **Security** section of **System Preferences** after the restart. - The correct driver to then select in the popup of this web install is `/dev/cu.wchusbserialXXXXXXXXXXX` ::: diff --git a/main/ZmqttDiscovery.ino b/main/ZmqttDiscovery.ino index da513e8220..30a46a514f 100644 --- a/main/ZmqttDiscovery.ino +++ b/main/ZmqttDiscovery.ino @@ -424,6 +424,39 @@ void pubMqttDiscovery() { "", "", "", "", false, // device name, device manufacturer, device model, device ID, retain stateClassNone //State Class ); + +# ifdef ZdisplaySSD1306 + createDiscovery("switch", //set Type + subjectSSD1306toMQTT, "SS1306: Control", (char*)getUniqueId("onstate", "").c_str(), //set state_topic,name,uniqueId + will_Topic, "", "{{ value_json.onstate }}", //set availability_topic,device_class,value_template, + "{\"onstate\":true,\"save\":true}", "{\"onstate\":false,\"save\":true}", "", //set,payload_on,payload_off,unit_of_meas, + 0, //set off_delay + Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoSSD1306set, //set,payload_available,payload_not available ,is a gateway entity, command topic + "", "", "", "", false, // device name, device manufacturer, device model, device MAC, retain + stateClassNone, //State Class + "false", "true" //state_off, state_on + ); + createDiscovery("switch", //set Type + subjectSSD1306toMQTT, "SS1306: Display metric", (char*)getUniqueId("displaymetric", "").c_str(), //set state_topic,name,uniqueId + will_Topic, "", "{{ value_json.displaymetric }}", //set availability_topic,device_class,value_template, + "{\"displaymetric\":true,\"save\":true}", "{\"displaymetric\":false,\"save\":true}", "", //set,payload_on,payload_off,unit_of_meas, + 0, //set off_delay + Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoSSD1306set, //set,payload_available,payload_not available ,is a gateway entity, command topic + "", "", "", "", false, // device name, device manufacturer, device model, device MAC, retain + stateClassNone, //State Class + "false", "true" //state_off, state_on + ); + createDiscovery("number", //set Type + subjectSSD1306toMQTT, "SSD1306: Brightness", (char*)getUniqueId("brightness", "").c_str(), //set state_topic,name,uniqueId + will_Topic, "", "{{ value_json.brightness }}", //set availability_topic,device_class,value_template, + "{\"brightness\":{{value}},\"save\":true}", "", "", //set,payload_on,payload_off,unit_of_meas, + 0, //set off_delay + Gateway_AnnouncementMsg, will_Message, true, subjectMQTTtoSSD1306set, //set,payload_available,payload_not available,is a gateway entity, command topic + "", "", "", "", false, // device name, device manufacturer, device model, device ID, retain + stateClassNone //State Class + ); +# endif + # ifndef ESP32_ETHERNET createDiscovery("sensor", //set Type subjectSYStoMQTT, "SYS: Rssi", (char*)getUniqueId("rssi", "").c_str(), //set state_topic,name,uniqueId