-
-
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
[kaleidescape] Kaleidescape Movie Player Binding - initial contribution #7568
Conversation
update fork
update fork
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Test build available here: If you receive an error about openhab-transport-serial, issue the following command in the openhab console: feature:install openhab-transport-serial |
Travis tests were successfulHey @mlobstein, |
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
update fork
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
update fork
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
update fork
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Travis tests were successfulHey @mlobstein, |
Travis tests were successfulHey @mlobstein, |
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.
LGTM
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.
LGTM
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.
Everything looks pretty good. I was only able to find a couple of things worth pointing out.
...ava/org/openhab/binding/kaleidescape/internal/communication/KaleidescapeSerialConnector.java
Outdated
Show resolved
Hide resolved
...ape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeHandler.java
Outdated
Show resolved
Hide resolved
...n/java/org/openhab/binding/kaleidescape/internal/discovery/KaleidescapeDiscoveryService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
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 yet another contribution 😄 Looks good. Nice use of enum method overriding. Not really any big review comments.
...n/java/org/openhab/binding/kaleidescape/internal/discovery/KaleidescapeDiscoveryService.java
Outdated
Show resolved
Hide resolved
...rg/openhab/binding/kaleidescape/internal/communication/KaleidescapeMessageEventListener.java
Outdated
Show resolved
Hide resolved
...ape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeHandler.java
Show resolved
Hide resolved
...ape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeHandler.java
Outdated
Show resolved
Hide resolved
...ape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeHandler.java
Outdated
Show resolved
Hide resolved
...ape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeHandler.java
Outdated
Show resolved
Hide resolved
...ape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeHandler.java
Outdated
Show resolved
Hide resolved
new ArrayList<String>(Arrays.asList(GET_VIDEO_COLOR, GET_CONTENT_COLOR))); | ||
} | ||
|
||
initialCommands.forEach(command -> { |
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.
I have used ExpiringCache
with a small timout, like 3 seconds. When the cache expires it will call the method passed. You could use this channels have the same command, such that when multiple of these channels are updated they are not all sending the command. And when using a cache you can probably iterate over the channels here, check if the channel is linked (i.e. if it actually make sense to update the channel) and then call handleRefresh
with the channel instead of directly sending the command here. There is also an ExpiringCacheMap
to handle multiple caches.
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
@Hilbrand I tried using ExpiringCache but it didn't really work with the framework of sending a command and getting one or more events back. And the constant refresh upon cache timeout is not needed because the device sends unsolicited updates. I implemented a similar scheme by saving events to a map and replaying them when refresh is called. |
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.
LGTM
…on (openhab#7568) Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
…on (openhab#7568) Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
[kaleidescape] Initial contribution
This is the initial implementation of a Binding to control and retrieve information from a Kaleidescape movie player. All movie player components including the original K-Player series, M Class Players, Cinema One, Alto, and Strato are supported. As there are many good control options already available for these components, this binding focuses primarily on retrieving information for display purposes and to use in rules for controlling other Things such lighting, projector lens control, masking, etc. Any feedback or suggestions for improvement are welcome.