-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Comfoair] Expanded binding with new commands #5773
Conversation
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.
In addition to addressing the inline comments, please make sure to run all code through the Eclipse formatter.
You've edited the wrong README.md file. Please move your changes from the root file to the file for this binding. I'll review the changes to the README after that...
@@ -1,5 +1,5 @@ | |||
/** | |||
* Copyright (c) 2010-2019 by the respective copyright holders. | |||
* Copyright (c) 2010-2018 by the respective copyright holders. |
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.
Replace all the 2018
values with 2019
throughout.
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.
@@ -21,6 +21,8 @@ | |||
* | |||
* @author Holger Hees | |||
* @since 1.3.0 | |||
* @author Grzegorz Miasko | |||
* @since 1.14.0 |
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.
Delete this line. Please apply this change to all files that are not newly added with this PR.
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.
@@ -21,6 +21,8 @@ | |||
* | |||
* @author Holger Hees | |||
* @since 1.3.0 | |||
* @author Grzegorz Miasko |
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.
Move this line below the previous @author
line. Please apply this change to all files.
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 removed this line according to the previous note.
@@ -1,41 +1,43 @@ | |||
/** | |||
* Copyright (c) 2010-2019 by the respective copyright holders. |
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.
Revert all the changes to this file.
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.
@@ -1,47 +1,50 @@ | |||
/** | |||
* Copyright (c) 2010-2019 by the respective copyright holders. |
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.
Revert all the changes to this file.
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 introduced a new code after comments from other comfoair users
@@ -1,55 +1,57 @@ | |||
/** | |||
* Copyright (c) 2010-2019 by the respective copyright holders. |
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.
Revert all the changes to this file.
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.
|
||
} | ||
/** | ||
* Copyright (c) 2010-2018 by the respective copyright holders. |
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.
Revert to 2019.
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 changed a code after comments from other comfoair users.
* first command | ||
* | ||
* @param command | ||
* @return int values |
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.
int[]
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.
@@ -1,132 +1,134 @@ | |||
/** | |||
* Copyright (c) 2010-2019 by the respective copyright holders. |
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.
Revert all the changes to this file.
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.
@@ -1,49 +1,51 @@ | |||
/** | |||
* Copyright (c) 2010-2019 by the respective copyright holders. |
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.
Revert all the changes to this file.
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.
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 think this should be the last set of changes.
|
||
|
||
### Example | ||
|
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.
Headers should be followed by a blank line.
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.
## Item Configuration | ||
|
||
The syntax of the binding configuration strings accepted is the following: | ||
``` |
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.
Beginning code fences should have a blank line preceding them.
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.
The syntax of the binding configuration strings accepted is the following: | ||
``` | ||
comfoair="<device-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.
Ending code fences should have a blank line following them.
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.
``` | ||
where `<device-command>` should be replaced with the ComfoAir command from the list below. | ||
|
||
### List of commands. |
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.
Header again.
Also, headers should not end with punctuation.
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.
| Property | Default | Required | Description | | ||
|----------|---------|:--------:|-------------| | ||
| port | | Yes | Serial port which is connected to the Zehnder ComfoAir system, for example `/dev/ttyS0` on Linux or `COM1` on Windows | | ||
| refresh | 60000 | No | refresh inverval in milliseconds |
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.
"interval"
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.
*/ | ||
public class DataTypeTemperature implements ComfoAirDataType { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(DataTypeTemperature.class); |
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.
Loggers should not be static unless there's a reason.
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.
*/ | ||
public class DataTypeVolt implements ComfoAirDataType { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(DataTypeVolt.class); |
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.
Loggers should not be static unless there's a reason.
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.
*/ | ||
public class DataTypeBoolean implements ComfoAirDataType { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(DataTypeBoolean.class); |
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.
Loggers should not be static unless there's a reason.
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.
@@ -20,45 +22,53 @@ | |||
*/ | |||
public class DataTypeMessage implements ComfoAirDataType { | |||
|
|||
private static final Logger logger = LoggerFactory.getLogger(DataTypeMessage.class); |
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.
Loggers should not be static unless there's a reason.
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.
*/ | ||
public class DataTypeNumber implements ComfoAirDataType { | ||
|
||
private static final Logger logger = LoggerFactory.getLogger(DataTypeNumber.class); |
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.
Loggers should not be static unless there's a reason.
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.
I formatted org.openhab.binding.comfoair as you show above. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/solved-comfoair-add-filter-reset-in-binding/25337/21 |
All the calls to logger.warn in the file ComfoAirConnector.java need to be converted to logger.debug. All calls to logger.error need to be examined and converted to another type. Use the lowest appropriate one. |
Done. |
One last item. Need to fix the null pointer exception defect reported in this community thread. I'd recommend also reviewing Eclipse warnings to see if it's flagging any other possible occurrences...
|
Done.
I checked the Eclipse warnings and the only ones reported were for the MANIFEST.MF file. |
Thanks, @gieemek ! |
Expended comfoair binding (originaly written by Holger Hees). Contains many new read and write commands, and gives full control as the original control panels (CC Ease or CC Luxe).