-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[emotiva] Initial contribution #16499
base: main
Are you sure you want to change the base?
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/emotiva-av-processor-binding/154406/1 |
The build is failing because your commit it not signed. See here for instructions to fix it: https://github.com/openhab/openhab-addons/pull/16499/checks?check_run_id=22412921872 |
eca824b
to
e3162e3
Compare
3793c64
to
969b223
Compare
bundles/org.openhab.binding.anel/src/main/resources/OH-INF/config/config.xml
Outdated
Show resolved
Hide resolved
...inding.emotiva/src/main/java/org/openhab/binding/emotiva/internal/EmotivaCommandHandler.java
Outdated
Show resolved
Hide resolved
...inding.emotiva/src/main/java/org/openhab/binding/emotiva/internal/EmotivaCommandHandler.java
Outdated
Show resolved
Hide resolved
"@text/message.processor.connection.failed"); | ||
disconnect(); | ||
scheduleConnectRetry(retryConnectInMinutes); | ||
} |
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.
Thinking out loud: could (some of) this status updating be moved to handleStatusUpdate()?
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.
Not sure, the connection method is synchronized and try to make sure the connection is either working or we need to schedule a retry. Suggestions are welcome.
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.
Regarding the ThingStatus, it is a common practice to:
- In
initialize()
- Set
updateStatus(ThingStatus.UNKNOWN);
at the start - Check configuration and set
ThingStatus
with details if it is not valid - End with a scheduled task (e.g.
updateTask()
) that updates the thing state and channels
- Set
- In
updateTask()
- Check if connection is authenticated and continue or get authenticated and set
ThingStatus
- Get data to update channels, set
ThingStatus
on error.
- Check if connection is authenticated and continue or get authenticated and set
Not covering all cases and when applied to this binding it might not suit 100%.
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.
Updated initialize() with status setting and checking of port and ipaddress to the device. As there is no authentication here, I did not do anything around th updateTask().
...ding.emotiva/src/main/java/org/openhab/binding/emotiva/internal/EmotivaProcessorHandler.java
Show resolved
Hide resolved
...tiva/src/main/java/org/openhab/binding/emotiva/internal/protocol/EmotivaControlCommands.java
Show resolved
Hide resolved
...ing.emotiva/src/main/java/org/openhab/binding/emotiva/internal/protocol/EmotivaDataType.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.emotiva/src/main/resources/OH-INF/config/config.xml
Show resolved
Hide resolved
bf10246
to
612fde5
Compare
10d3e3c
to
ec88727
Compare
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 this contribution. Looked at all except the key controller/handlers, will do in a next round.
For each comment, try to check if it can also apply to other parts of the code.
Please check that al SAT errors are fxied and the build comes without any warnings.
bundles/org.openhab.binding.emotiva/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.emotiva/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.emotiva/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.emotiva/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.emotiva/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
bundles/org.openhab.binding.emotiva/src/main/resources/OH-INF/addon/addon.xml
Show resolved
Hide resolved
...otiva/src/main/java/org/openhab/binding/emotiva/internal/protocol/EmotivaControlRequest.java
Outdated
Show resolved
Hide resolved
...otiva/src/main/java/org/openhab/binding/emotiva/internal/protocol/EmotivaControlRequest.java
Outdated
Show resolved
Hide resolved
...otiva/src/main/java/org/openhab/binding/emotiva/internal/protocol/EmotivaControlRequest.java
Outdated
Show resolved
Hide resolved
...va/src/main/java/org/openhab/binding/emotiva/internal/discovery/EmotivaDiscoveryService.java
Outdated
Show resolved
Hide resolved
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.
^^^
Signed-off-by: Espen Fossen <espenaf@junta.no>
* Renamed all channels to use - instead of _ * Adding state for a number of channels * Start using i18n translations * Cleanups and fixes Signed-off-by: Espen Fossen <espenaf@junta.no>
* Wildcard for static imports. * Removed Norwegian translation. * Removed empty lines. * Small fixes. Signed-off-by: Espen Fossen <espenaf@junta.no>
* Discovery method * Model and revisions as properties * Rename keep-alive to last-seen Signed-off-by: Espen Fossen <espenaf@junta.no>
Signed-off-by: Espen Fossen <espenaf@junta.no>
While waiting for emotiva to respons to the question about an oiption list, there are some issues to fix. After these are fixed i need one last review round. |
* Fix SAT issues * Add config check and set to UNKNOWN on initialize Signed-off-by: Espen Fossen <espenaf@junta.no>
* Rewrite tests from assertj to junit/mockito. Signed-off-by: Espen Fossen <espenaf@junta.no>
Pushed new changes that fixes all the SAT issues. |
Signed-off-by: Espen Fossen <espenaf@junta.no>
* Added catch of InterruptedIOException * Move logging of message content to trace Signed-off-by: Espen Fossen <espenaf@junta.no>
Thanks, Another step forward. There are 35 compile warnings, can you also look into those. |
Signed-off-by: Espen Fossen <espenaf@junta.no>
Now those have also been fixed. Communication is established with Emotiva, just waiting on word from the people at Engineering. |
This PR adds support for Emotiva Audio Corporation AV processors based on the Emotiva Network Remote Control protocol. Discovery is supported.
Binding has only been tested with an XMC-2, so please test and give feedback for other devices.
Has support for all Emotiva notification types in version 2.0 and 3.0 of the protocol, and adds support for almost all commands, has support for Zone 2 controls, browsing and controlling the menu and using the radio tuner.