[emerald] Initial contribution for Emerald Heat Pump Hot Water Systems - #21477
Closed
psmedley wants to merge 92 commits into
Closed
[emerald] Initial contribution for Emerald Heat Pump Hot Water Systems#21477psmedley wants to merge 92 commits into
psmedley wants to merge 92 commits into
Conversation
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
…1471) * [yamlcomposer] Fix `if` indentations in the markdown table Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5 to 6. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
psmedley
requested review from
Andy2003,
BjoernLange,
GiviMAD,
J-N-K,
bruestel,
ccutrer,
cweitkamp,
digitaldan,
florian-h05,
jimtng,
kaikreuzer,
lsiepel,
marcelrv,
markus7017,
mgeramb,
mherwege,
mlobstein,
nils-bauer,
ssalonen,
wborn and
weymann
as code owners
August 28, 2026 07:14
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 228 out of 276 changed files in this pull request and generated 10 comments.
Suppressed comments (8)
bundles/org.openhab.binding.emerald/src/main/java/org/openhab/binding/emerald/internal/EmeraldHWSHandler.java:66
- For
RefreshTypethe handler currently returns without updating any channel states. This means UI-triggered refreshes (and rules that send REFRESH) won’t republish the latest values. CallupdateChannels()when a refresh is received.
bundles/org.openhab.binding.emerald/src/main/java/org/openhab/binding/emerald/internal/EmeraldAccountHandler.java:405 - Same unsafe cast pattern here:
(EmeraldHWSHandler) thing.getHandler()can throw if the Thing’s handler is not (or not yet) anEmeraldHWSHandler. Guard withinstanceofbefore callingupdateChannels().
bundles/org.openhab.binding.emerald/src/main/java/org/openhab/binding/emerald/internal/api/EmeraldList.java:50 Heatpumpis also a non-static inner DTO. Gson treats non-static member classes as non-deserializable because they require an outer instance. Make itstaticto avoid runtime JSON parse errors.
bundles/org.openhab.binding.emerald/src/main/java/org/openhab/binding/emerald/internal/api/EmeraldList.java:80LastStateis a non-static inner DTO. Gson cannot deserialize non-static member classes without an outer instance. Make itstaticto prevent JSON parsing failures.
bundles/org.openhab.binding.emerald/README.md:36- The channel documentation for
modelists (Normal/Economy/Boost), but the binding’s channel options are Boost/Normal/Quiet. This mismatch can confuse users when they compare UI values vs documentation.
bundles/org.openhab.binding.emerald/README.md:42 - Typo: “capacicty” should be “capacity”.
bundles/org.openhab.binding.emerald/src/main/resources/OH-INF/thing/thing-types.xml:75 faultis a plainNumberchannel (no unit), but the pattern includes%unit%. This typically renders oddly and provides no value. Use a unitless pattern.
bundles/org.openhab.binding.emerald/src/main/resources/OH-INF/thing/thing-types.xml:87work-stateis a plainNumberchannel (no unit), but the pattern includes%unit%, which typically renders as an empty unit. Use a unitless pattern.
Comment on lines
+158
to
+164
| Request request = httpClient.newRequest(uri).method(method).header("accept", "*/*") | ||
| .header("content-type", "application/json") | ||
| .header("user-agent", | ||
| "EmeraldPlanet/2.5.3 (com.emerald-ems.customer; build:5; iOS 17.2.1) Alamofire/5.4.1") | ||
| .header("accept-language", "en-GB;q=1.0, en-AU;q=0.9").header(headerKey, headerValue) | ||
| .timeout(TIMEOUT_MS, TimeUnit.MILLISECONDS) | ||
| .content(new StringContentProvider(params), "application/json"); |
Comment on lines
+171
to
+173
| if (!jsonResponse.isEmpty()) { | ||
| logger.trace("JSON response: '{}'", jsonResponse); | ||
| } |
Comment on lines
+181
to
+184
| } catch (TimeoutException | ExecutionException | InterruptedException ex) { | ||
| String msg = ex.getMessage(); | ||
| throw new EmeraldCommunicationException(msg != null ? msg : ex.toString(), ex); | ||
| } |
Comment on lines
+227
to
+231
| // Snap to the nearest 20% step just like the Emerald app | ||
| int rounded = (int) (Math.round(clamped / 20.0) * 20); | ||
|
|
||
| updateState(EmeraldBindingConstants.CHANNEL_TANK_CAPACITY, new DecimalType(rounded)); | ||
| } |
Comment on lines
+184
to
+192
| getThing().getThings().forEach(child -> { | ||
| EmeraldHWSHandler handler = (EmeraldHWSHandler) child.getHandler(); | ||
| if (handler != null) { | ||
| EmeraldHWSConfiguration childConfig = child.getConfiguration().as(EmeraldHWSConfiguration.class); | ||
| if (!childConfig.uuid.isEmpty() && topic.contains(childConfig.uuid)) { | ||
| handler.updateFromMqtt(payload); | ||
| } | ||
| } | ||
| }); |
Comment on lines
+33
to
+36
| public String token = ""; | ||
|
|
||
| public class Info { | ||
| public String id = ""; |
Comment on lines
+34
to
+38
| public class Info { | ||
| public @NonNullByDefault({}) Property[] property; | ||
| } | ||
|
|
||
| public class Property { |
Comment on lines
+15
to
+16
| <name>openHAB Add-ons :: Bundles :: Emerald Binding</name> | ||
| <dependencies> |
|
|
||
| ## `account` Bridge Configuration | ||
|
|
||
| As a minimum, a username and email are needed: |
Comment on lines
+60
to
+63
| <label>Mode</label> | ||
| <description>Mode the HWS is set to</description> | ||
| <state pattern="%.0f %unit%"> | ||
| <options> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support to openHAB for the range of Emerald Hot Water Systems which are available for sale in Australia and Ne Zealand.