From 58d00a719defd06696d07bd20aa942bc38e032b0 Mon Sep 17 00:00:00 2001 From: Thomas Lauterbach <2452988+DrRSatzteil@users.noreply.github.com> Date: Fri, 10 Oct 2025 20:22:05 +0200 Subject: [PATCH 1/2] Corrected DSL Code and better App examples Signed-off-by: Thomas Lauterbach <2452988+DrRSatzteil@users.noreply.github.com> --- .../README.md | 109 +++++++++--------- 1 file changed, 53 insertions(+), 56 deletions(-) diff --git a/bundles/org.openhab.binding.mqtt.awtrixlight/README.md b/bundles/org.openhab.binding.mqtt.awtrixlight/README.md index 9eee021b5f433..e6c960f12af01 100644 --- a/bundles/org.openhab.binding.mqtt.awtrixlight/README.md +++ b/bundles/org.openhab.binding.mqtt.awtrixlight/README.md @@ -284,15 +284,11 @@ The following actions are supported: ```java Bridge mqtt:broker:myBroker [ host="localhost", port=1883 ] { - // .. Other things on your MQTT network - Bridge mqtt:awtrix-clock:myBroker:myAwtrix "Living Room Display" (mqtt:broker:myBroker) [ basetopic="awtrix", appLockTimeout=10, lowBatteryThreshold=25 ] { - - // These do not (!) represent native Awtrix apps. Native apps cannot be controlled by this binding - Thing awtrix-app myClock "Clock App" [ appname="clock", useButtons=true ] - Thing awtrix-app myWeather "Weather App" [ appname="weather" ] - Thing awtrix-app myCalendar "Calendar App" [ appname="calendar" ] - Thing awtrix-app myCustom "Custom App" [ appname="custom" ] + Thing awtrix-app washing "My Washing Machine App" [ appname="washing", useButtons=true ] + Thing awtrix-app doorbell "My Doorbell App" [ appname="doorbell" ] + Thing awtrix-app mediaplayer "My MediaPlayer App" [ appname="mediaplayer" ] + Thing awtrix-app other "My Other App" [ appname="other" ] } } ``` @@ -314,31 +310,32 @@ Switch Display_LowBattery "Low Battery" (gAwtrix) { channel="mqtt:awtrix-clock:m Number:Power Display_WiFi "WiFi Signal [%d dBm]" (gAwtrix) { channel="mqtt:awtrix-clock:myBroker:myAwtrix:rssi", unit="dBm" } String Display_CurrentApp "Active App [%s]" (gAwtrix) { channel="mqtt:awtrix-clock:myBroker:myAwtrix:app" } -// Clock App items -Group gAwtrixClock "Clock App" -Switch Clock_Active "Clock Active" (gAwtrixClock) { channel="mqtt:awtrix-app:myBroker:myAwtrix:clock:active" } -String Clock_Text "Clock Text" (gAwtrixClock) { channel="mqtt:awtrix-app:myBroker:myAwtrix:clock:text" } -Color Clock_Color "Clock Color" (gAwtrixClock) { channel="mqtt:awtrix-app:myBroker:myAwtrix:clock:color" } -Number Clock_Duration "Clock Duration" (gAwtrixClock) { channel="mqtt:awtrix-app:myBroker:myAwtrix:clock:duration" } - -// Weather App items -Group gAwtrixWeather "Weather App" -Switch Weather_Active "Weather Active" (gAwtrixWeather) { channel="mqtt:awtrix-app:myBroker:myAwtrix:weather:active" } -String Weather_Text "Weather Text" (gAwtrixWeather) { channel="mqtt:awtrix-app:myBroker:myAwtrix:weather:text" } -String Weather_Icon "Weather Icon" (gAwtrixWeather) { channel="mqtt:awtrix-app:myBroker:myAwtrix:weather:icon" } -Color Weather_Color "Weather Color" (gAwtrixWeather) { channel="mqtt:awtrix-app:myBroker:myAwtrix:weather:color" } -Switch Weather_Rainbow "Weather Rainbow Effect" (gAwtrixWeather) { channel="mqtt:awtrix-app:myBroker:myAwtrix:weather:rainbow" } - -// Custom App items with advanced features -Switch Custom_Active "Custom App Active" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:active" } -String Custom_Text "Custom Text" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:text" } -String Custom_Icon "Custom Icon" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:icon" } -Color Custom_Color "Text Color" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:color" } -Color Custom_Background "Background Color" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:background" } -Number:Dimensionless Custom_ScrollSpeed "Scroll Speed" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:scrollSpeed" } -Switch Custom_Center "Center Text" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:center" } -Number:Dimensionless Custom_Progress "Progress [%d %%]" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:progress" } -Color Custom_ProgressColor "Progress Color" (gAwtrix) { channel="mqtt:awtrix-app:myBroker:myAwtrix:custom:progressColor" } +// Washing Machine App items +Group gAwtrixWashing "Washing Machine App" +Switch Washing_Active "Washing Active" (gAwtrixWashing) { channel="mqtt:awtrix-app:myBroker:myAwtrix:washing:active" } +String Washing_Text "Washing Text" (gAwtrixWashing) { channel="mqtt:awtrix-app:myBroker:myAwtrix:washing:text" } +Color Washing_Color "Washing Color" (gAwtrixWashing) { channel="mqtt:awtrix-app:myBroker:myAwtrix:washing:color" } +Number Washing_Duration "Washing Duration" (gAwtrixWashing) { channel="mqtt:awtrix-app:myBroker:myAwtrix:washing:duration" } + +// Doorbell App items +Group gAwtrixDoorbell "Doorbell App" +Switch Doorbell_Active "Doorbell Active" (gAwtrixDoorbell) { channel="mqtt:awtrix-app:myBroker:myAwtrix:doorbell:active" } +String Doorbell_Text "Doorbell Text" (gAwtrixDoorbell) { channel="mqtt:awtrix-app:myBroker:myAwtrix:doorbell:text" } +String Doorbell_Icon "Doorbell Icon" (gAwtrixDoorbell) { channel="mqtt:awtrix-app:myBroker:myAwtrix:doorbell:icon" } +Color Doorbell_Color "Doorbell Color" (gAwtrixDoorbell) { channel="mqtt:awtrix-app:myBroker:myAwtrix:doorbell:color" } +Switch Doorbell_Rainbow "Doorbell Rainbow Effect" (gAwtrixDoorbell) { channel="mqtt:awtrix-app:myBroker:myAwtrix:doorbell:rainbow" } + +// Media Player App App items with advanced features +Group gAwtrixMediaPlayer "Media Player App" +Switch MediaPlayer_Active "Media Player Active" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:active" } +String MediaPlayer_Text "Media Player Text" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:text" } +String MediaPlayer_Icon "Media Player Icon" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:icon" } +Color MediaPlayer_Color "Media Player Color" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:color" } +Color MediaPlayer_Background "Background Color" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:background" } +Number:Dimensionless MediaPlayer_ScrollSpeed "Scroll Speed" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:scrollSpeed" } +Switch MediaPlayer_Center "Center Text" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:center" } +Number:Dimensionless MediaPlayer_Progress "Progress [%d %%]" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:progress" } +Color MediaPlayer_ProgressColor "Progress Color" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:progressColor" } ``` ### Sitemap @@ -359,31 +356,31 @@ sitemap awtrix label="Awtrix Display" { Text item=Display_CurrentApp } - Frame label="Clock App" { - Switch item=Clock_Active - Text item=Clock_Text - Colorpicker item=Clock_Color - Slider item=Clock_Duration + Frame label="Washing Machine App" { + Switch item=Washing_Active + Text item=Washing_Text + Colorpicker item=Washing_Color + Slider item=Washing_Duration } - Frame label="Weather App" { - Switch item=Weather_Active - Text item=Weather_Text - Text item=Weather_Icon - Colorpicker item=Weather_Color - Switch item=Weather_Rainbow + Frame label="Doorbell App" { + Switch item=Doorbell_Active + Text item=Doorbell_Text + Text item=Doorbell_Icon + Colorpicker item=Doorbell_Color + Switch item=Doorbell_Rainbow } - Frame label="Custom App" { - Switch item=Custom_Active - Text item=Custom_Text - Text item=Custom_Icon - Colorpicker item=Custom_Color - Colorpicker item=Custom_Background - Slider item=Custom_ScrollSpeed - Switch item=Custom_Center - Slider item=Custom_Progress - Colorpicker item=Custom_ProgressColor + Frame label="Media Player App" { + Switch item=MediaPlayer_Active + Text item=MediaPlayer_Text + Text item=MediaPlayer_Icon + Colorpicker item=MediaPlayer_Color + Colorpicker item=MediaPlayer_Background + Slider item=MediaPlayer_ScrollSpeed + Switch item=MediaPlayer_Center + Slider item=MediaPlayer_Progress + Colorpicker item=MediaPlayer_ProgressColor } } @@ -462,7 +459,7 @@ awtrixActions.showNotification("Hello World", "alert") val params = newHashMap( 'text' -> 'Custom Message', 'icon' -> 'warning', - 'color' -> [255,165,0], // Orange color + 'color' -> newArrayList(255,165,0), // Orange color 'rainbow' -> true, 'duration' -> 10 ) @@ -526,7 +523,7 @@ then var params = newHashMap( 'text' -> "Doorbell", 'icon' -> "bell-ring", - 'color' -> [0,255,255], // Cyan color + 'color' -> newArrayList(0,255,255), // Cyan color 'pushIcon' -> "PUSHOUT", 'center' -> true ) From c33beaada1bb0a77a68d4a6ff48e020602926484 Mon Sep 17 00:00:00 2001 From: lsiepel Date: Sat, 11 Oct 2025 13:12:40 +0200 Subject: [PATCH 2/2] Update bundles/org.openhab.binding.mqtt.awtrixlight/README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: lsiepel --- bundles/org.openhab.binding.mqtt.awtrixlight/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.mqtt.awtrixlight/README.md b/bundles/org.openhab.binding.mqtt.awtrixlight/README.md index e6c960f12af01..e52eafb3b58d7 100644 --- a/bundles/org.openhab.binding.mqtt.awtrixlight/README.md +++ b/bundles/org.openhab.binding.mqtt.awtrixlight/README.md @@ -325,7 +325,7 @@ String Doorbell_Icon "Doorbell Icon" (gAwtrixDoorbell) { channel="mqtt:awtrix-ap Color Doorbell_Color "Doorbell Color" (gAwtrixDoorbell) { channel="mqtt:awtrix-app:myBroker:myAwtrix:doorbell:color" } Switch Doorbell_Rainbow "Doorbell Rainbow Effect" (gAwtrixDoorbell) { channel="mqtt:awtrix-app:myBroker:myAwtrix:doorbell:rainbow" } -// Media Player App App items with advanced features +// Media Player App items with advanced features Group gAwtrixMediaPlayer "Media Player App" Switch MediaPlayer_Active "Media Player Active" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:active" } String MediaPlayer_Text "Media Player Text" (gAwtrixMediaPlayer) { channel="mqtt:awtrix-app:myBroker:myAwtrix:mediaplayer:text" }