-
-
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
[linktap] Initial contribution #17235
base: main
Are you sure you want to change the base?
Conversation
84f25c8
to
7777df1
Compare
24e1a13
to
e8799ee
Compare
Thank you for creating this PR to contribute this binding. As this is still a draft it won’t be reviewed yet, but I had a quick peek and would like to comment upfront. |
Thank you I'll work through it before changing to a non-draft PR to save any time wastage. |
a3e33b3
to
8c3cc6c
Compare
[linkTap] Initial code commit. Signed-off-by: dag81 <[email protected]>
8c3cc6c
to
4e810ea
Compare
[linkTap] Initial code commit. Signed-off-by: dag81 <[email protected]>
[linkTap] Initial code commit. Signed-off-by: dag81 <[email protected]>
9298bbf
to
1729cf3
Compare
[linkTap] Initial code commit. Signed-off-by: dag81 <[email protected]>
18bc9e5
to
727756f
Compare
b97f678
to
3079be4
Compare
3709a3f
to
b7c26bc
Compare
Oh, another request ;-) could you try not to use force-push as by then it is harder to track progress. If you just commit and push it should be fine. |
Now I know its being looked at I'll push the changes in different commits - you were very quick at getting on it - thank you. I presume when merged the whole lot can be squashed at that point. |
[linkTap] PR Feedback 1 Signed-off-by: dag81 <[email protected]>
Hi @lsiepel, I believe there's approx 3 bits left which I'll look at tomorrow evening if I have time. I've just pushed everything from tonight, thank you for all the work reviewing. Anything with a thumb's up I've hopefully / potentially covered in the feedback 1 push. I don't know if you want to wait for all to be addressed or am happy to start resolving any your happy with now, but figured I'll let you know either way. P.S On the servlet question, the gateway basically pushes event's via http. The servlet is to receive these pushes from the gateway itself. Obviously if it can't for whatever reason the system will fallback to a polling less responsive design after it hasn't receive certain data for so long, but hopefully for the majority of users, this will cover the majority of openHAB's user base. |
[linkTap] PR Feedback 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Feedback 3 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Feedback 3 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Feedback 4 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Feedback 5 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Feedback 6 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Feedback 7 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Feedback 8 Signed-off-by: dag81 <[email protected]>
Hi @lsiepel, thanks for all the time again tonight reviewing. I think I've caught up now and all the comments are addressed. Since the push ending with the text Feedback 8. |
[linkTap] FW Ver req updated Signed-off-by: dag81 <[email protected]>
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.
Finished the review and covered the full binding. Nice to see there are no compile and SAT warnings. After these comments are addressed i expect this PR to be in a mergable state, so we are getting close now.
private static final String DEFAULT_INST_WATERING_VOL_LIMIT = "0"; | ||
private static final String DEFAULT_INST_WATERING_TIME_LIMIT = "15"; | ||
|
||
private static final double GW_LITRES_M3_CONVERSION_RATIO = 3.785; |
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.
private static final double GW_LITRES_M3_CONVERSION_RATIO = 3.785; |
No need for this as the framework can do it for you. See next few comments as they belong together
if (speed != null) { | ||
updateState(DEVICE_CHANNEL_FLOW_RATE, new QuantityType<>( | ||
"L".equals(volumeUnit) ? speed : (speed * GW_LITRES_M3_CONVERSION_RATIO), Units.LITRE_PER_MINUTE)); | ||
} |
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.
} | |
updateState(DEVICE_CHANNEL_FLOW_RATE, new QuantityType<>(speed, | |
"L".equals(volumeUnit) ? Units.LITRE_PER_MINUTE : ImperialUnits.GALLON_PER_MINUTE)); |
if (volume != null) { | ||
updateState(DEVICE_CHANNEL_CURRENT_VOLUME, new QuantityType<>( | ||
"L".equals(volumeUnit) ? volume : (volume * GW_LITRES_M3_CONVERSION_RATIO), Units.LITRE)); | ||
} |
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.
} | |
updateState(DEVICE_CHANNEL_CURRENT_VOLUME, | |
new QuantityType<>(volume, "L".equals(volumeUnit) ? Units.LITRE : ImperialUnits.GALLON_LIQUID_US)); |
if (volumeLimit != null) { | ||
updateState(DEVICE_CHANNEL_FAILSAFE_VOLUME, new QuantityType<>( | ||
"L".equals(volumeUnit) ? volumeLimit : (volumeLimit * GW_LITRES_M3_CONVERSION_RATIO), Units.LITRE)); | ||
} |
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.
} | |
updateState(DEVICE_CHANNEL_FAILSAFE_VOLUME, new QuantityType<>(volumeLimit, | |
"L".equals(volumeUnit) ? Units.LITRE_PER_MINUTE : ImperialUnits.GALLON_PER_MINUTE)); |
|
||
private static final double GW_LITRES_M3_CONVERSION_RATIO = 3.785; |
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.
No need to do manual conversion, leave it to the framework.
private static final double GW_LITRES_M3_CONVERSION_RATIO = 3.785; |
[linkTap] Corrections for equals invokes Signed-off-by: dag81 <[email protected]>
[linkTap] Names and casting Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 1 pass 2 Signed-off-by: dag81 <[email protected]>
...org.openhab.binding.linktap/src/main/java/org/openhab/binding/linktap/internal/Firmware.java
Show resolved
Hide resolved
...binding.linktap/src/main/java/org/openhab/binding/linktap/internal/LinkTapBridgeHandler.java
Outdated
Show resolved
Hide resolved
[linkTap] PR Adjustments 2 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 3 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 4 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 4 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 4 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 5 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 6 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 7 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] PR Adjustments 8 pass 2 Signed-off-by: dag81 <[email protected]>
[linkTap] i18 http warning addition Signed-off-by: dag81 <[email protected]>
[linkTap] Initial code commit.