-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mqtt.awtrix3] Initial contribution #18242
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Thomas Lauterbach <[email protected]>
Signed-off-by: Thomas Lauterbach <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution. Have not looked at the two handlers yet. Besides these comments, there are some more files that need to be changed:
Please add yourself to the CODEWONER file.
Also add the binding to:
openhab-addons/bundles/pom.xml
openhab-addons\features\openhab-addons\src\main\resources\footer.xml
| `awtrixclock` (Bridge) | Represents an Awtrix 3 display device. Acts as a bridge for apps. | | ||
| `awtrixapp` | Represents an app running on the Awtrix display. Apps can show text, icons, notifications, etc. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please stick to the naming convention for thing id's
| `awtrixclock` (Bridge) | Represents an Awtrix 3 display device. Acts as a bridge for apps. | | |
| `awtrixapp` | Represents an app running on the Awtrix display. Apps can show text, icons, notifications, etc. | | |
| `awtrix-clock` (Bridge) | Represents an Awtrix 3 display device. Acts as a bridge for apps. | | |
| `awtrix-app` | Represents an app running on the Awtrix display. Apps can show text, icons, notifications, etc. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -0,0 +1,380 @@ | |||
# MQTT Awtrix 3 Binding | |||
|
|||
This binding allows you to control Awtrix 3 (formerly Awtrix Light) LED matrix displays via MQTT. The Awtrix 3 is a customizable 32x8 LED matrix display that can show various information like time, weather, notifications and custom text/graphics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each sentence on its own line, please do so for the whole readme.
This binding allows you to control Awtrix 3 (formerly Awtrix Light) LED matrix displays via MQTT. The Awtrix 3 is a customizable 32x8 LED matrix display that can show various information like time, weather, notifications and custom text/graphics. | |
This binding allows you to control Awtrix 3 (formerly Awtrix Light) LED matrix displays via MQTT. | |
The Awtrix 3 is a customizable 32x8 LED matrix display that can show various information like time, weather, notifications and custom text/graphics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| Channel | Type | Description | | ||
|-------------------|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `app` | String | Currently active app: Will show the name of the app that is currently shown on the display. | | ||
| `autoBrightness` | Switch | Automatic brightness control: The clock will adjust the display brightness automatically based on ambient light. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lower-case-hyphen
naming convention should be used for the channel id's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
### Things | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add language to code blocks.
``` | |
```java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
### Items | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
``` | |
```java |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<tags> | ||
<tag>Control</tag> | ||
</tags> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop the tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<tags> | ||
<tag>Control</tag> | ||
</tags> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop the tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
<tags> | ||
<tag>Control</tag> | ||
<tag>Duration</tag> | ||
</tags> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop the tags, there is no duration being controlled here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
bundles/org.openhab.binding.mqtt.awtrixlight/src/main/resources/OH-INF/update/app-updates.xml
Outdated
Show resolved
Hide resolved
...les/org.openhab.binding.mqtt.awtrixlight/src/main/resources/OH-INF/update/bridge-updates.xml
Outdated
Show resolved
Hide resolved
Thank you for your first review results. I'm already going through the checklist and currently making first changes. This list is very helpful, maybe it would make sense to mention it in the binding development documentation. |
Signed-off-by: Thomas Lauterbach <[email protected]>
Signed-off-by: Thomas Lauterbach <[email protected]>
Signed-off-by: Thomas Lauterbach <[email protected]>
Signed-off-by: Thomas Lauterbach <[email protected]>
By going through the checklist I realized that I should get rid of the use of BigDecimal in my binding and replace it with int wherever possible (probably in most places). What do you think? |
[mqtt.awtrix3] Initial Contribution
Description
This pull request contributes a new binding to control Awtrix 3 devices via MQTT. Awtrix 3 is a custom firmware that can be flashed on to a Ulanzi tc001 clock but compatible devices can also be custom made. This binding is based on the existing MQTT binding. The Ulanzi clock is a very popular alternative to the LaMetric Time clock but much less expensive. The binding was available on the marketplace for quite some time now and is potentially used by quite a few OH users. The binding itself has proven to be stable and just got some minor functional adjustments in the last few releases. The final changes made before this PR were:
Current marketplace release and discussions: https://community.openhab.org/t/awtrix-3-binding-formerly-awtrix-light/149739
Testing
Link will be provided once this has been built