-
-
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
[atlona] Add support for the AT-PRO3HD66M #9385
Conversation
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
...b.binding.atlona/src/main/java/org/openhab/binding/atlona/internal/AtlonaHandlerFactory.java
Outdated
Show resolved
Hide resolved
...b.binding.atlona/src/main/java/org/openhab/binding/atlona/internal/AtlonaHandlerFactory.java
Outdated
Show resolved
Hide resolved
...atlona/src/main/java/org/openhab/binding/atlona/internal/pro3/AtlonaPro3PortocolHandler.java
Show resolved
Hide resolved
...atlona/src/main/java/org/openhab/binding/atlona/internal/pro3/AtlonaPro3PortocolHandler.java
Show resolved
Hide resolved
@@ -192,7 +201,7 @@ String login() throws Exception { | |||
try { | |||
response = callback.getResponse(); | |||
if (!response.equals("")) { | |||
logger.info("Altona protocol violation - didn't start with an inital empty response: '{}'", response); | |||
logger.debug("Altona protocol violation - didn't start with an inital empty response: '{}'", response); | |||
} | |||
} catch (Exception e) { |
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 do not catch Exception
. I assume IOException
is enough. Catching Exception
also catches NPE and hides programming errors.
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 completely agree. However in this instance, the exception being caught is explicitly thrown as Exception in getResponse() on lines 1260 & 1262. I could change those to be IOException or a custom exception. What do you think?
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 just looked at the rest of the code. This should never have been merged. Removing the Exception
here will require some bigger refactoring, which is clearly out of scope here. Leave it as is.
if (!response.equals("")) { | ||
logger.debug("Altona protocol violation - didn't start with an inital empty response: '{}'", response); | ||
} | ||
} catch (Exception e) { |
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.
see above
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
@@ -192,7 +201,7 @@ String login() throws Exception { | |||
try { | |||
response = callback.getResponse(); | |||
if (!response.equals("")) { | |||
logger.info("Altona protocol violation - didn't start with an inital empty response: '{}'", response); | |||
logger.debug("Altona protocol violation - didn't start with an inital empty response: '{}'", response); | |||
} | |||
} catch (Exception e) { |
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 just looked at the rest of the code. This should never have been merged. Removing the Exception
here will require some bigger refactoring, which is clearly out of scope here. Leave it as is.
...atlona/src/main/java/org/openhab/binding/atlona/internal/pro3/AtlonaPro3PortocolHandler.java
Show resolved
Hide resolved
* Add support for the AT-PRO3HD66M Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
* Add support for the AT-PRO3HD66M Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com> Signed-off-by: Joseph Hagberg <joseph@zoidberg.se>
* Add support for the AT-PRO3HD66M
* Add support for the AT-PRO3HD66M Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
* Add support for the AT-PRO3HD66M Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Added support for the older (non-UHD) model AT-PRO3HD66M matrix. This device required a slightly different login protocol and selective bypassing of some of the status inquires. This was necessary because sending large amounts of commands to the device that it did not understand would cause it to lock up.
@tmrobert8