diff --git a/tasmota/berry/modules/Webui_Status.tapp b/tasmota/berry/modules/Webui_Status.tapp new file mode 100644 index 000000000..9675e3c0d Binary files /dev/null and b/tasmota/berry/modules/Webui_Status.tapp differ diff --git a/tasmota/berry/modules/webui_status/autoexec.be b/tasmota/berry/modules/webui_status/autoexec.be new file mode 100644 index 000000000..5e2f597e3 --- /dev/null +++ b/tasmota/berry/modules/webui_status/autoexec.be @@ -0,0 +1,3 @@ +# rm Webui_Status.tapp; zip -j -0 Webui_Status.tapp webui_status/* +import webui_status +global._webui_status = webui_status diff --git a/tasmota/berry/modules/webui_status/webui_status.be b/tasmota/berry/modules/webui_status/webui_status.be new file mode 100644 index 000000000..dd8070e27 --- /dev/null +++ b/tasmota/berry/modules/webui_status/webui_status.be @@ -0,0 +1,37 @@ +# display Wifi and Free Heap in the Web Status line +class webui_status + static var HTTP_HEAD_STYLE_WIFI = + "" + + def init() + tasmota.add_driver(self) + end + + def remove() + tasmota.remove_driver(self) + end + def web_status_line_left() + import webserver + # display wifi + if tasmota.wifi('up') + webserver.content_send(format(self.HTTP_HEAD_STYLE_WIFI, tasmota.webcolor(2 #-COL_FORM-#), tasmota.webcolor(18 #-COL_TITLE-#))) + var rssi = tasmota.wifi('rssi') + webserver.content_send(format("
", + tasmota.wifi('quality'), rssi, + rssi >= -55 ? "active" : "", + rssi >= -70 ? "active" : "", + rssi >= -85 ? "active" : "")) + end + # display free heap + webserver.content_send(f" {tasmota.memory('heap_free')}k") + end +end +return webui_status()