-
-
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
[solarforecast] Initial contribution #13308
Conversation
I'll do as you suggested. Was developed in parallel to Mercedes binding so I can imagine some similar findings. |
f92116c
to
6c2eb5c
Compare
bundles/org.openhab.binding.solarforecast/src/main/resources/OH-INF/binding/binding.xml
Outdated
Show resolved
Hide resolved
WIP removed
|
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.
Thank you for your contribution, and sorry for the long delay! I almost made it for the one year anniversary. I have provided my feedback for my first iteration review.
The binding is running pretty stable on my side but I need your opinion regarding the Actions interface
Is LocalDateTime'sufficient or is ZonedDateTime the way to go?
I would actually suggest Instant
, but I might be alone with this opinion. LocalDateTime
seems not ideal since there can be ambiguity, for example during DST. It can suddenly change when time-zone settings are changed. Therefore ZonedDateTime
would be better. The reason I'm proposing Instant
is because you actually don't need the time-zone to be provided, only the exact moment in time. You can always get the current time-zone through TimeZoneProvider
.
Historically ZonedDateTime
is better supported, for example it's currently the native type for DateTimeType
. However, Instant
has also recently gotten some attention in openhab-js. See also openhab/openhab-core#2898
@jlaur Switch now perspective to an openHAB user with no deep technical background. And we want to attract new users, right?
In my opinion I can very easily explain the Interface with plusX, withX, minusX functions on LocalDateTime. |
All of those classes have their reasons to exist, we just need to use the right classes for the right purposes. First, let's not mix dates and datetimes. I'm not sure exactly what you want to discuss here, since there are many subtopics. But if we focus on what I assume is thing action examples/rule code: What exactly do you expect from How will you, using
|
e385c2d
to
7d6a8ad
Compare
After investigating Energi Data Service binding usage of Instant is clear for me now.
|
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/solar-forecast-pv/137681/123 |
@jlaur Jacob do you mind finishing this review so we could still get this into 4.1? Thanks. |
bundles/org.openhab.binding.solarforecast/src/main/resources/OH-INF/thing/channel-types.xml
Show resolved
Hide resolved
Signed-off-by: Bernd Weymann <[email protected]>
@weymann - I checked for open comments the other day and found one that I had missed previously. Can you recheck this? #13308 (comment) |
Signed-off-by: Bernd Weymann <[email protected]>
Signed-off-by: Bernd Weymann <[email protected]>
Hey, thanks for the fast fixing. Doesn't work yet :/ The log states:
Is it right, that the expiration time is 30 seconds past the current time? Which timestamp is ment here? So should i continue testing at the moment or do you have some further known issues, you're working on? BR Sönke |
@weymann - we are getting close. Two comments still open from this: #13308 (review). There are also some compiler warnings to address. And I'm wondering if this needs to be investigated/resolved before merging: #13308 (comment)? |
Did you register for Hobbyist Plan and is it verified by Solcast ? |
Signed-off-by: Bernd Weymann <[email protected]>
Yes i've a valid registration and the plugin was running some time ago and i did not change the configuration. So to be sure, i've just generated a new api-key, now its running fine. Thanks for your work! |
Signed-off-by: Bernd Weymann <[email protected]>
Signed-off-by: Bernd Weymann <[email protected]>
This was config issue, not code. Reported as fixed in latest comment. Issue weymann/OH3-SolarForecast-Drops#5 (comment) was reported in my drop repository which needs to be fixed |
Signed-off-by: Bernd Weymann <[email protected]>
Signed-off-by: Bernd Weymann <[email protected]>
Signed-off-by: Bernd Weymann <[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.
Some minor nitpicking. Let me know when weymann/OH3-SolarForecast-Drops#5 is fixed and you are ready for merging the PR.
...ding.solarforecast/src/main/java/org/openhab/binding/solarforecast/internal/utils/Utils.java
Outdated
Show resolved
Hide resolved
...ding.solarforecast/src/main/java/org/openhab/binding/solarforecast/internal/utils/Utils.java
Outdated
Show resolved
Hide resolved
...ain/java/org/openhab/binding/solarforecast/internal/solcast/handler/SolcastPlaneHandler.java
Outdated
Show resolved
Hide resolved
...ain/java/org/openhab/binding/solarforecast/internal/solcast/handler/SolcastPlaneHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Bernd Weymann <[email protected]>
Tested commit on my site 3 days with result ok Ready to merge! |
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 again for the contribution! LGTM.
You can now add your binding's logo to the openHAB website and the UI. See https://next.openhab.org/docs/developer/addons/#add-your-add-on-s-logo-to-the-openhab-website-and-the-ui
Signed-off-by: Bernd Weymann <[email protected]> Signed-off-by: Paul Smedley <[email protected]>
Signed-off-by: Bernd Weymann <[email protected]> Signed-off-by: Patrik Gfeller <[email protected]>
Signed-off-by: Bernd Weymann <[email protected]>
Signed-off-by: Bernd Weymann <[email protected]>
Solar Forecast binding for two diferent free photovoltaic forecast services
Binding is provided on Marketplace.
The binding is running pretty stable on my side but I need your opinion regarding the
Actions
interfaceIs
LocalDateTime'
sufficient or isZonedDateTime
the way to go?