-
-
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
[opensprinkler] Fix Program names and add new features for firmware 2.2.0 #15410
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
bundles/org.openhab.binding.opensprinkler/src/main/feature/feature.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
...sprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/api/OpenSprinklerApi.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/opensprinkler/internal/handler/OpenSprinklerDeviceHandler.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/opensprinkler/internal/handler/OpenSprinklerDeviceHandler.java
Outdated
Show resolved
Hide resolved
...ensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/OpenSprinklerState.java
Outdated
Show resolved
Hide resolved
...ensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/OpenSprinklerState.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml
Show resolved
Hide resolved
@@ -61,22 +61,25 @@ NOTE: Some channels will only show up if the hardware has the required sensor an | |||
|
|||
| Channel Type ID | Item Type | | Description | | |||
|-----------------|------------------------|----|------------------------------------------------------------------------------------| | |||
| rainsensor | Switch | RO | This channel indicates whether rain is detected by the device or not. | | |||
| sensor2 | Switch | RO | This channel is for the second sensor (if your hardware supports it). | | |||
| cloudConnected | Switch | RO | If the device is fully connected to the OpenSprinkler cloud this will show as 'ON'.| |
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 am asking myself if a channel is really the good option.
The connection status should probably be something defining the thing status ?
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.
@jlaur : WDYT ?
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 I need some more context. The binding is declared as local
, so if I understand this correctly, this is just some information from the device whether it is also integrated with a cloud service in addition to being integrated through the local API?
In that case, what would be the use of this channel? Perhaps it would be sufficient to provide this as a property? And also, in that case it probably shouldn't impact the thing status, since it wouldn't interfere with the openHAB integration in any way?
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 believe a property is wrong as it has a state that changes. Read only channel seemed to fit. Your thoughts are correct and I also do not see the use case, but was easy to add it when doing other channels instead of someone requesting it later. It could possibly be used to fault find why you can not use their cloud to connect and control the sprinkler. The binding is full local and it is perhaps strange that the device can do both without trying to force you to do one over the other.
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 would prefer to delete the channel then to spend any more time on changing or adding extra lines to add it to things that are missing the channel. I don't have a lot of spare time these days.
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
...r/src/main/java/org/openhab/binding/opensprinkler/internal/api/OpenSprinklerHttpApiV220.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/opensprinkler/internal/handler/OpenSprinklerDeviceHandler.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/opensprinkler/internal/handler/OpenSprinklerDeviceHandler.java
Outdated
Show resolved
Hide resolved
@Skinah : any chance you take a look to my last comments ? I would like to merge your PR for OH 4.1. |
Signed-off-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Matthew Skinner <matt@pcmus.com>
@lolodomo I believe all changes are now addressed. Can you take a look over the update instructions to ensure I did them correctly please? |
bundles/org.openhab.binding.opensprinkler/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
Signed-off-by: Matthew Skinner <matt@pcmus.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.
LGTM, thank you
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/too-many-stations-listed/152241/2 |
….2.0 (openhab#15410) * Fix Program names are not parsed correctly in firmware 2.2.0 --------- Signed-off-by: Matthew Skinner <matt@pcmus.com> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
….2.0 (openhab#15410) * Fix Program names are not parsed correctly in firmware 2.2.0 --------- Signed-off-by: Matthew Skinner <matt@pcmus.com>
This change fixes the bindings ability to scrape the program names of the sprinkler controllers internal automated programs that a user can select to run. More information is found that the issue this fixes here closes #15260
The newer firmware uses JSON with this structure and the "pd" now has an extra element over previous firmware which causes the update to break the old code. The JSON is an Array that contains mixed types including further arrays. Details are included in case a better method exists.
This pull request will automatically be built and available under the following links if anyone wants to test:
https://openhab.jfrog.io/ui/native/libs-pullrequest-local/org/openhab/addons/bundles/
https://openhab.jfrog.io/ui/native/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.opensprinkler/4.1.0-SNAPSHOT/org.openhab.binding.opensprinkler-4.1.0-SNAPSHOT.jar
Signed-off-by: Matthew Skinner matt@pcmus.com