Skip to content
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

[Broadlink] Initial contribution #16273

Open
wants to merge 214 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
214 commits
Select commit Hold shift + click to select a range
ee60cd1
Initial import of the broadlink binding for openhab 4.2
AntonJansen Jan 13, 2024
53517db
Cleaned up the binding information files to confirm to coding guideli…
AntonJansen Jan 13, 2024
3acad3f
Added missing artifact to the bom pom.xml such that the CI hopefully …
AntonJansen Jan 14, 2024
5ec10d7
Updated the copyright notice from 2023 to 2024. Happy new year!
AntonJansen Jan 14, 2024
d5dc281
Fixed:
AntonJansen Jan 14, 2024
9c8b29d
Fixed an issue with a new RM Pro 4 not working. Changes include:
AntonJansen Jan 23, 2024
839a384
Created a distinction between a RM 4 Mini and RM 4 Pro.
AntonJansen Jan 25, 2024
afdb598
Add forgotten files for introduction to new RM 4 Mini and Pro distinc…
AntonJansen Jan 25, 2024
8e8bd11
Fixed missing copyright header
AntonJansen Jan 25, 2024
e85a786
Added missing author.
AntonJansen Jan 25, 2024
4d5cf72
Added missing @nonbydefault for new class
AntonJansen Jan 25, 2024
ef48ae1
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
84ffb73
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
63a7dc1
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
9ccaa98
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
1b4a8ab
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
58036a6
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
4bf1958
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
2c7c464
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 27, 2024
4493fb0
Busy creating a new structure for the rm pro types.
AntonJansen Jan 27, 2024
af65950
Fixed SAT errors.
AntonJansen Jan 27, 2024
37974e0
Cleaned up unnecessary log entries.
AntonJansen Jan 27, 2024
51e2572
Added PMD supression for error prone issues with mock logger in tests.
AntonJansen Jan 27, 2024
5f84de0
Added the ability to set the name of a IR/RF command to learn as a pr…
AntonJansen Jan 27, 2024
fc94c4e
Added missed new rmpro-config.
AntonJansen Jan 27, 2024
acb209c
use hypen for things
AntonJansen Jan 28, 2024
789d768
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 28, 2024
aedf310
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Jan 28, 2024
23bdc5a
Fixed naming convention issues and added more explanation to logging …
AntonJansen Jan 28, 2024
bc26a9d
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jan 28, 2024
8975853
Removed legacy files not being used by the binding anymore.
AntonJansen Jan 28, 2024
ec76bbe
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jan 28, 2024
98404df
Cleaned up all the logger.warn() entries to conform to the defined
AntonJansen Jan 28, 2024
b5f9c5a
Did some more logging clean-up.
AntonJansen Jan 28, 2024
59fb96c
Moving constants to right package, cleaning up the other files
AntonJansen Jan 28, 2024
514663d
Moving the handlers to a package under internal.
AntonJansen Jan 28, 2024
d5d78a3
Moved the thing configuration to internal.
AntonJansen Jan 28, 2024
fe04872
Updated the internationalization file.
AntonJansen Jan 30, 2024
3c0c5fd
Busy creating a new structure for the rm pro types.
AntonJansen Jan 27, 2024
1985afe
Added the ability to set the name of a IR/RF command to learn as a pr…
AntonJansen Jan 27, 2024
326846e
Added missed new rmpro-config.
AntonJansen Jan 27, 2024
1cb9287
Merge branch 'rm4pros' of github.com:AntonJansen/openhab-addons into …
AntonJansen Jan 31, 2024
5cf28f0
Fixed logging message using wrong format.
AntonJansen Jan 31, 2024
564afb1
Refactored the storing of properties.
AntonJansen Jan 31, 2024
593fb7a
Managed to get a first rough version of the RF to work! A lot of clea…
AntonJansen Feb 11, 2024
485fa08
Partially updated documentation. Fixed issue with save / refresh not …
AntonJansen Feb 11, 2024
325651a
Fixed a concurrency problem with the file watcher. Update documentation
AntonJansen Feb 11, 2024
22cf2c1
Updated documentation and made the RF channel clearly communicate to …
AntonJansen Feb 16, 2024
18ca6b2
Created a first version for the handling of RF commands that
AntonJansen Feb 17, 2024
8627a65
Fixed an issue in the documentation.
AntonJansen Feb 17, 2024
fc23f4f
Merge branch 'openhab:main' into rm4pros
AntonJansen Mar 18, 2024
ceafc49
Merge branch 'openhab:main' into broadlink-binding-4.2.x
AntonJansen Mar 18, 2024
a7fede2
This commit removes the hability to rename mapping files. This is do…
Mar 19, 2024
7a822a9
Add a logo of broadlink
AntonJansen Mar 19, 2024
1124cc9
This commit introduces the StorageService libraries into the code, an…
Mar 20, 2024
8202eee
Modified normalized map files standard file name.
Mar 21, 2024
b797368
Updated Documentation
Mar 25, 2024
24588a3
Modified the BroadlinkMappingService to use OpenHAB StorageService
Mar 25, 2024
6d686e5
changed fixed filenames so they look prettier
Mar 25, 2024
bffcdcb
Re-Add the capability to change file name
Mar 25, 2024
075e174
Added string ClassLoader to getStorage function calls
Mar 25, 2024
7e16a7f
Corrected conversion script
Mar 25, 2024
55b82de
Removed the broadlink logo, as it should become part of the documenta…
AntonJansen Mar 26, 2024
7382905
Introduce StorageService into test units
Mar 31, 2024
9c5fec7
-Finished including Storagecervice Libraries in Broadlink Mapping Tests
Apr 2, 2024
5176ef2
More compaile warning fixes from the test code
Apr 2, 2024
b21af2c
Remove Unnecessary variables and libraries from BroadlinkMappingService
Apr 3, 2024
76cfd04
Added options on the learn channel to modify and delete commands for …
Apr 3, 2024
4276728
Updated Documentation
Apr 4, 2024
b66dc4e
Improved Interface channel descriptions
Apr 4, 2024
4c92eba
Removed unused code
Apr 4, 2024
06842c0
Modified Learning code to account for the fact that modify and read f…
Apr 4, 2024
8623bca
Resolve TodoCommentCheck on line 64
Apr 4, 2024
a946508
Resolve ConstantNameCheck on lines 33, 34, 36
Apr 4, 2024
a967c99
Resolve SimplifyBooleanExpressions on lines 148, 166, 192, 240
Apr 4, 2024
c155756
Merge pull request #2 from rlarranaga/rm4pros_StorageService
AntonJansen Apr 4, 2024
ff0cb54
- Removed the ability to set the name of the IR/RF code files.
AntonJansen Apr 5, 2024
95a9ab0
Update the Alpha version for people to download to be in sync with
AntonJansen Apr 5, 2024
ecf1e83
Fixed Tests
Apr 5, 2024
f7bad37
-Merged IR and RF functions into 1 set
Apr 5, 2024
d474c8b
Fixes a Bug that loaded IR commands into RF list
Apr 6, 2024
3e177f7
Added some information in the Docs
Apr 6, 2024
fc4304c
Fixed Styling
Apr 6, 2024
a0276c1
-Removed unnecessary variables
Apr 6, 2024
f39d280
-Fixed Bug where Commands for RF were being loaded from the IR Storage
Apr 6, 2024
726ab0c
Fixed bug mixing up the update of the IR and RF channels.
AntonJansen Apr 6, 2024
f3781a1
Merge branch 'openhab:main' into rm4pros
rlarranaga Apr 6, 2024
0a48a44
Fixed Bug in tests
Apr 11, 2024
5471f06
Implemented automatic refresh of command descriptions for all channel…
Apr 11, 2024
2eefba3
Fixed Bug in Automatic command reloading
Apr 11, 2024
df271c1
-Unified naming convention for IR and RF Learn, check, modify and del…
Apr 11, 2024
bb0410a
Merge branch 'commanddescription_reload' into rm4pros and started cle…
AntonJansen Apr 14, 2024
ddd170a
- Fixed a bug with the wrong channel being used to provide feedback t…
AntonJansen Apr 15, 2024
ca43b9d
Refactored the IR adding and modification commands. Cleaned up some
AntonJansen Apr 16, 2024
c95859e
Update the alpha jar file.
AntonJansen Apr 16, 2024
bb194c0
Made the flow in the documentation more user friendly by moving the s…
AntonJansen Apr 16, 2024
890f85e
Merge branch 'rm4pros' into broadlink-binding-4.2.x
AntonJansen Apr 16, 2024
79b6f7d
Removed the snapshot jar.
AntonJansen Apr 16, 2024
435d543
Merge branch 'openhab:main' into rm4pros
AntonJansen Jun 2, 2024
aebfed3
Busy renaming RM2 to the RM Pro, as this is the name people are famil…
AntonJansen Jun 2, 2024
a611aad
Moved RF functionality to base class, so RM Pro can also use it.
AntonJansen Jun 6, 2024
d63ac89
Changed naming of channel ids and types to conform to the code style …
AntonJansen Jun 6, 2024
b5e5f61
Fixed the search & replacement damage on power and nightlight.
AntonJansen Jun 6, 2024
5d400aa
New alpha release with rf support for RM pro models.
AntonJansen Jun 6, 2024
1cbc396
Merge branch 'rm4pros' into broadlink-binding-4.2.x
AntonJansen Jun 7, 2024
5a782c9
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Jul 6, 2024
bd43a21
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Jul 6, 2024
d7ade38
Renaming rmpro to rm-pro.
AntonJansen Jul 6, 2024
9135f89
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 6, 2024
fa212a5
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Jul 6, 2024
adb9490
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Jul 6, 2024
b93b969
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 6, 2024
3ee37cf
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Jul 6, 2024
03f1e37
Busy renaming the channels for the mp types.
AntonJansen Jul 6, 2024
104eb8c
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 6, 2024
9e77a13
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Jul 6, 2024
98ef014
Removed unnecessary null supression.
AntonJansen Jul 7, 2024
e0bd614
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Jul 7, 2024
c93fe9e
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 7, 2024
315f17b
Fixed OpenHAB => openHAB.
AntonJansen Jul 7, 2024
2ecda12
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Jul 7, 2024
1a266a4
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 7, 2024
b638449
Added text explaining that the map file information is needed for mig…
AntonJansen Jul 7, 2024
6003f64
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 7, 2024
81183e0
Added documentation of the socket listener interface.
AntonJansen Jul 7, 2024
a37a5a9
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 7, 2024
cf7a46b
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 7, 2024
aa19951
Refactoring based on Isiepel feedback.
AntonJansen Jul 7, 2024
653093e
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 7, 2024
d1c5393
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 7, 2024
9f6f50b
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 7, 2024
a786447
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 7, 2024
080d487
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 7, 2024
06777b0
Introduced enum type to make the distinction between IR and RF codes.
AntonJansen Jul 7, 2024
d5fbcab
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 7, 2024
4588499
Fixed missing method implementation of abstract discovery service.
AntonJansen Jul 7, 2024
5301297
Replaced complex stringtype arrays with enums.
AntonJansen Jul 8, 2024
2361adb
Merge branch 'openhab:main' into broadlink-binding-4.2.x
AntonJansen Jul 8, 2024
364533a
Updated binding to 4.3.0 version
AntonJansen Jul 8, 2024
ba33d63
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 9, 2024
dcd55fc
Added a check to ensure a hostname or static mac address is defined f…
AntonJansen Jul 9, 2024
64f2dca
Fixed communication error messaging.
AntonJansen Jul 9, 2024
1a39880
Added javadoc to public methods.
AntonJansen Jul 15, 2024
283e077
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 15, 2024
7c1a66e
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 15, 2024
fdbf404
Added javadoc to the public methods being provided in the Utils class.
AntonJansen Jul 16, 2024
b590641
Removed the binding.xml, which is no longer required.
AntonJansen Jul 16, 2024
f5c49b0
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 17, 2024
73f55a2
Adding constants and missing javadoc.
AntonJansen Jul 17, 2024
667e2cf
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Jul 17, 2024
3622b48
Reverted improvement, as it did not work.
AntonJansen Jul 17, 2024
db24029
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Jul 17, 2024
dd60942
Removed null supressions using local variables and added configuratio…
AntonJansen Jul 28, 2024
ffcea49
Cleaned up some more null supressions.
AntonJansen Jul 28, 2024
61e0ed1
Replaced the power-on type with the default openHAB system.power chan…
AntonJansen Jul 28, 2024
d85d0ca
Added some more standard types.
AntonJansen Jul 28, 2024
9ff07a8
Removed the custom energy type, as we now can leverage
AntonJansen Sep 9, 2024
c4ca584
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 10, 2024
5bb2b96
Added an exception to handle authentication issues.
AntonJansen Sep 10, 2024
21f893a
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 10, 2024
f0a0bd8
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Sep 10, 2024
760e2d5
Fixed the following small elements:
AntonJansen Sep 10, 2024
f2938b5
Removed unused device type.
AntonJansen Sep 11, 2024
063b218
Cleaned up device documentation and removed unsupported devices from …
AntonJansen Sep 11, 2024
ba43b80
Refactored the way the item status is being set. The design is now mo…
AntonJansen Sep 17, 2024
c899bde
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
0aba5f9
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
7ee1ee0
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
07cdcf1
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
55800ec
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
180a6e6
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
c496a77
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
29cf844
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
cf182bb
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
ac7d85d
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
119edaf
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
0cccf2c
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
4efd6c1
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
c4694ee
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
a9ad1b7
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
3953d27
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
48a9b35
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
3a16699
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
93962cb
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
20d799f
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 19, 2024
f4547a6
Fixed some typo's that caused compilation issues.
AntonJansen Sep 19, 2024
3e95c48
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Sep 19, 2024
f569f69
Fixed some more compilation issues.
AntonJansen Sep 19, 2024
c44cc22
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
66bc175
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 19, 2024
5550fc0
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 19, 2024
026bade
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 19, 2024
03e6e27
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 19, 2024
be928a8
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 19, 2024
da01a8c
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
03e520c
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
080f5b2
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
682ea5a
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
c34afb1
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
2d70dbb
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
27eabd4
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
2656a86
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
9aae95b
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
cf44d29
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 19, 2024
ff929b5
Apply suggestions from code review
AntonJansen Sep 19, 2024
de74127
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Sep 19, 2024
894fa1c
Update bundles/org.openhab.binding.broadlink/src/main/java/org/openha…
AntonJansen Sep 19, 2024
d94a4d4
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Sep 19, 2024
82f1dba
Update bundles/org.openhab.binding.broadlink/README.md
AntonJansen Sep 29, 2024
d41899a
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 29, 2024
4eefd5f
Update bundles/org.openhab.binding.broadlink/src/main/resources/OH-IN…
AntonJansen Sep 29, 2024
664b6a3
Merge branch 'broadlink-binding-4.2.x' of github.com:AntonJansen/open…
AntonJansen Sep 29, 2024
2d4bbf9
Resolved all the comments received thus far and resolved all the merg…
AntonJansen Sep 29, 2024
0ebe83b
Updated the reference to Ricardo Larranaga.
AntonJansen Sep 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@
<artifactId>org.openhab.binding.bosesoundtouch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.broadlink</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.broadlinkthermostat</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions bundles/org.openhab.binding.broadlink/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This content is produced and maintained by the openHAB project.

* Project home: https://www.openhab.org

== Declared Project Licenses

This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

== Source Code

https://github.com/openhab/openhab-addons
126 changes: 126 additions & 0 deletions bundles/org.openhab.binding.broadlink/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Broadlink Binding

This binding supports a range of home networking devices made by (and occasionally OEM licensed from) [Broadlink](https://www.ibroadlink.com/).

## Supported Things

| Thing ID | Description |
|------------|-------------------------------------------------------------------------|
| a1 | Broadlink A1 multi sensor |
| mp1 | Broadlink MP1 WiFi Smart Power Strip (4 sockets) |
| mp1-1k3s2u | Broadlink MP1 1K3S2U WiFi Smart Power Strip (3 sockets, 2 USB) |
| mp2 | Broadlink MP2 WiFi Smart Power Strip (3 sockets, 3 USB) |
| sp1 | Broadlink SP1 WiFi Smart Socket |
| sp2 | Broadlink SP2 WiFi Smart Socket with night light |
| sp3 | Broadlink SP3/Mini WiFi Smart Socket with night light |
| sp3s | Broadlink SP3s WiFi Smart Socket with Power Meter |
| rm2 | Broadline RM2/Pro WiFi IR/RF Transmitter with temperature sensor |
| rm3 | Broadlink RM3/Mini WiFi IR Transmitter |
| rm3q | Broadlink RM3 WiFi IR Transmitter with Firmware v44057 |
| rm4 | Broadlink RM4 WiFi IR Transmitter with temperature and humidity sensors |

## Discovery

Devices in the above list that are set up and working in the Broadlink mobile app should be discoverable by initiating a discovery from the openHAB UI.

> The `Lock Device` setting must be switched off for your device via the Broadlink app to be discoverable in openHAB.

## Thing Configuration

| Name | Type | Default | description |
|---------------------|---------|---------------|-----------------------------------------------------------------------------------|
| ipAddress | String | | Sets the IP address of the Broadlink device |
| staticIp | Boolean | true | Enabled if your broadlink device has a Static IP set |
| port | Integer | 80 | The network port for the device |
| macAddress | String | | The device's MAC Address |
| pollingInterval | Integer | 30 | The interval in seconds for polling the status of the device |
| ignoreFailedUpdates | Boolean | false | If enabled, failed status requests won't put the device `OFFLINE` |
| mapFilename | String | broadlink.map | The map file that contains remote codes to send via IR |

> The `mapFilename` setting is applicable to the RM series of devices only.

## Channels

| Channel | Supported Devices | Type | Description |
|------------------|--------------------------|----------------------|-------------------------------------------------|
| powerOn | MP2, all SPx | Switch | Power on/off for switches/strips |
| nightLight | SP3 | Switch | Night light on/off |
| temperature | A1, RM2, RM4 | Number:Temperature | Temperature |
| humidity | A1, RM4 | Number:Dimensionless | Air humidity percentage |
| noise | A1 | String | Noise level: `QUIET`/`NORMAL`/`NOISY`/`EXTREME` |
| light | A1 | String | Light level: `DARK`/`DIM`/`NORMAL`/`BRIGHT` |
| air | A1 | String | Air quality: `PERFECT`/`GOOD`/`NORMAL`/`BAD` |
| s1powerOn | MP1, MP1_1k3s2u | Switch | Socket 1 power |
| s2powerOn | MP1, MP1_1k3s2u | Switch | Socket 2 power |
| s3powerOn | MP1, v_1k3s2u | Switch | Socket 3 power |
| s4powerOn | MP1 | Switch | Socket 4 power |
| usbPowerOn | MP1_1k3s2u | Switch | USB power |
| powerConsumption | MP2, SP2s,SP3s | Number:Power | Power consumption |
| command | all RMx | String | IR Command code to transmit |
| learningControl | all RMx | String | Learn mode command channel (see below) |

## Map File

The Broadlink RM family of devices can transmit IR codes.
The map file contains a list of IR command codes to send via the device.
The file uses the [Java Properties File format](https://en.wikipedia.org/wiki/.properties) and is stored in the `<OPENHAB_CONF>/transform` folder.
By default, the file name is `broadlink.map` but can be changed using the `mapFile` setting.

Here is a map file example:

```
TV_POWER=26008c0092961039103a1039101510151014101510151039103a10391015101411141015101510141139101510141114101510151014103a10141139103911391037123a10391000060092961039103911391014111410151015101411391039103a101411141015101510141015103911141015101510141015101510391015103911391039103a1039103911000d05000000000000000000000000
heatpump_off=2600760069380D0C0D0C0D290D0C0D290D0C0D0C0D0C0D290D290D0C0D0C0D0C0D290D290D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D0C0D290D0C0D0C0D0C0D0C0D0C0D0C0D0C0D290D0C0D0C0D0C0D0C0D290D0C0D0C0D0C0D0C0D0C0D0C0D290D0C0D290D290D290D290D290D290E0002900000

```

The above codes are power on/off for Samsung TVs and Power Off for a Fujitsu heat pump.
To send either code, the string `TV_POWER` or `heatpump_off` must be sent to the `command` channel for the device.

## Learning new remote codes

To obtain the command codes, you can get this binding to put your Broadlink RMx device into
"learn mode" and then ask it for the code it learnt. Here are the steps:

1. In the openHAB web UI, navigate to your RMx Thing, and click on its *Channels* tab
2. Find the *Remote Learning Control* channel and create an Item for it
3. Click the item, and click the rectangular area that is marked NULL
4. In the pop-up menu that appears, select "Enter infrared learn mode"
5. *The LED on your RM device will illuminate solidly*
6. Point your IR remote control at your RM device and press the button you'd like to learn
7. *The LED on your RM device will extinguish once it has learnt the command*
8. Now click the rectangular area again (which will now show "Enter infrared learn mode")
9. Select the "Check last captured IR code" menu option in the pop-up menu
10. Inspect the `openhab.log` file on your openHAB server - you should see the following:

```
AntonJansen marked this conversation as resolved.
Show resolved Hide resolved
[BroadlinkRemoteHandler] - BEGIN LAST LEARNT CODE (976 bytes)
[BroadlinkRemoteHandler] - 2600bc017239100d0e2b0e0f100c107f55747be51a3e1d4ff4......f5be8b3d4ff4b
4d77c44d105fa530546becaa2bcfbd348b30145447f55747be51a3747be51a3e1d4ff4b3f4f4f......a3e1d4ff4b348
0145447f55747be51a3e1d4ff4b
[BroadlinkRemoteHandler] - END LAST LEARNT CODE (1944 characters)
```

11. If you carefully copy the log line between the `BEGIN` and `END` messages,
it should have exactly the number of characters as advised in the `END` message.

12. You can now paste a new entry into your `map` file, with the name of your choice; for example:

```
AntonJansen marked this conversation as resolved.
Show resolved Hide resolved
BLURAY_ON=2600bc017239100d0e2b0e0f100c107f55747be51a3e1d4ff4...0145447f55747be51a3e1d4ff4b
```


AntonJansen marked this conversation as resolved.
Show resolved Hide resolved
## Full Example

Items file example; `sockets.items`:

```
Switch BroadlinkSP3 "Christmas Lights" [ "Lighting" ] { channel="broadlink:sp3:34-ea-34-22-44-66:powerOn" }
```

## Credits

- [Cato Sognen](https://community.openhab.org/u/cato_sognen)
- [JAD](http://www.javadecompilers.com/jad) (Java Decompiler)

25 changes: 25 additions & 0 deletions bundles/org.openhab.binding.broadlink/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.2.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.broadlink</artifactId>

<name>openHAB Add-ons :: Bundles :: Broadlink Binding</name>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.broadlink-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<feature name="openhab-binding-broadlink" description="Broadlink Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.broadlink/${project.version}</bundle>
</feature>
</features>
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
/**
* Copyright (c) 2010-2024 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.broadlink.internal;

import java.util.HashMap;
import java.util.Map;

import javax.measure.Unit;
import javax.measure.quantity.Dimensionless;
import javax.measure.quantity.Power;
import javax.measure.quantity.Temperature;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.library.unit.SIUnits;
import org.openhab.core.library.unit.Units;
import org.openhab.core.thing.ThingTypeUID;

/**
* The {@link BroadlinkBindingConstants} class defines common constants, which are
* used across the whole binding.
*
* @author John Marshall/Cato Sognen - Initial contribution
*/
@NonNullByDefault
public class BroadlinkBindingConstants {

AntonJansen marked this conversation as resolved.
Show resolved Hide resolved
public static final ThingTypeUID THING_TYPE_RM2 = new ThingTypeUID("broadlink", "rm2");
public static final ThingTypeUID THING_TYPE_RM3 = new ThingTypeUID("broadlink", "rm3");
public static final ThingTypeUID THING_TYPE_RM3Q = new ThingTypeUID("broadlink", "rm3q");
public static final ThingTypeUID THING_TYPE_RM4_MINI = new ThingTypeUID("broadlink", "rm4mini");
public static final ThingTypeUID THING_TYPE_RM4_PRO = new ThingTypeUID("broadlink", "rm4pro");
public static final ThingTypeUID THING_TYPE_A1 = new ThingTypeUID("broadlink", "a1");
public static final ThingTypeUID THING_TYPE_MP1 = new ThingTypeUID("broadlink", "mp1");
public static final ThingTypeUID THING_TYPE_MP1_1K3S2U = new ThingTypeUID("broadlink", "mp1-1k3s2u");
public static final ThingTypeUID THING_TYPE_MP2 = new ThingTypeUID("broadlink", "mp2");
public static final ThingTypeUID THING_TYPE_SP1 = new ThingTypeUID("broadlink", "sp1");
public static final ThingTypeUID THING_TYPE_SP2 = new ThingTypeUID("broadlink", "sp2");
public static final ThingTypeUID THING_TYPE_SP2S = new ThingTypeUID("broadlink", "sp2s");
public static final ThingTypeUID THING_TYPE_SP3 = new ThingTypeUID("broadlink", "sp3");
public static final ThingTypeUID THING_TYPE_SP3S = new ThingTypeUID("broadlink", "sp3s");
public static final ThingTypeUID THING_TYPE_PIR = new ThingTypeUID("broadlink", "s1p");
public static final ThingTypeUID THING_TYPE_MAGNET = new ThingTypeUID("broadlink", "s1m");

public static final String RM2 = "Broadlink RM2";
public static final String RM3 = "Broadlink RM3";
public static final String RM3Q = "Broadlink RM3 v11057";
public static final String RM4_MINI = "Broadlink RM4 Mini";
public static final String RM4_PRO = "Broadlink RM4 Pro";
public static final String A1 = "Broadlink A1";
public static final String MP1 = "Broadlink MP1";
public static final String MP1_1K3S2U = "Broadlink MP1 1K3S2U";
public static final String MP2 = "Broadlink MP2";

public static final String SP1 = "Broadlink SP1";
public static final String SP2 = "Broadlink SP2";
public static final String SP2S = "Broadlink SP2s";
public static final String SP3 = "Broadlink SP3";
public static final String SP3S = "Broadlink SP3s";
public static final String S1P = "Smart One PIR Sensor";
public static final String S1M = "Smart One Magnet Sensor";

public static final String BROADLINK_AUTH_KEY = "097628343fe99e23765c1513accf8b02";
public static final String BROADLINK_IV = "562e17996d093d28ddb3ba695a2e6f58";

public static final String COMMAND_CHANNEL = "command";
public static final String LEARNING_CONTROL_CHANNEL = "learningControl";
public static final String LEARNING_CONTROL_COMMAND_LEARN = "LEARN";
public static final String LEARNING_CONTROL_COMMAND_CHECK = "CHECK";
public static final String CHANNEL_TEMPERATURE = "temperature";
public static final String CHANNEL_HUMIDITY = "humidity";
public static final String CHANNEL_POWER_CONSUMPTION = "powerConsumption";

public static final String COMMAND_POWER_ON = "powerOn";
public static final String COMMAND_NIGHTLIGHT = "nightLight";

public static final Unit<Temperature> BROADLINK_TEMPERATURE_UNIT = SIUnits.CELSIUS;
public static final Unit<Dimensionless> BROADLINK_HUMIDITY_UNIT = Units.PERCENT;
public static final Unit<Power> BROADLINK_POWER_CONSUMPTION_UNIT = Units.WATT;

public static final Map<ThingTypeUID, String> SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP = new HashMap<>();

static {
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_RM2, RM2);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_RM3, RM3);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_RM3Q, RM3Q);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_RM4_MINI, RM4_MINI);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_RM4_PRO, RM4_PRO);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_A1, A1);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_MP1, MP1);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_MP1_1K3S2U, MP1_1K3S2U);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_MP2, MP2);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_SP1, SP1);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_SP2, SP2);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_SP2S, SP2S);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_SP3, SP3);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_SP3S, SP3S);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_PIR, S1P);
SUPPORTED_THING_TYPES_UIDS_TO_NAME_MAP.put(THING_TYPE_MAGNET, S1M);
}
}
Loading