Skip to content

Add valve actuator telemetry and handler#74

Merged
matchews merged 1 commit into
haywardomnilogiclocalfrom
codex/create-valveactuator-and-update-status-class
Sep 15, 2025
Merged

Add valve actuator telemetry and handler#74
matchews merged 1 commit into
haywardomnilogiclocalfrom
codex/create-valveactuator-and-update-status-class

Conversation

@matchews

Copy link
Copy Markdown
Owner

Summary

  • add a ValveActuator telemetry DTO mirroring relays
  • extend the STATUS telemetry model to expose valve actuators and register it with the parser
  • add a handler that updates valve actuator channel data from config or telemetry

Testing

  • mvn -pl bundles/org.openhab.binding.haywardomnilogiclocal -am test (fails: cannot resolve parent POM without network access)

https://chatgpt.com/codex/tasks/task_e_68c862db454083239e0d46c74a119323

@matchews matchews merged commit be34dcb into haywardomnilogiclocal Sep 15, 2025
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

public class HaywardValveActuatorHandler extends HaywardThingHandler {
public HaywardValveActuatorHandler(Thing thing) {
super(thing);
}
public void updateFromConfig(Map<String, ParameterValue> values) {
String sysId = getThing().getProperties().get("systemID");
if (sysId == null) {
return;
}
updateIfPresent(values, "valveActuatorState_" + sysId, "valveActuatorState");
}
@Override
public void getTelemetry(String xmlResponse) throws HaywardException {
Status status = TelemetryParser.parse(xmlResponse);
String sysId = getThing().getProperties().get("systemID");
if (sysId == null) {
return;
}
for (ValveActuator valveActuator : status.getValveActuators()) {
if (sysId.equals(valveActuator.getSystemId())) {
@Nullable String valveActuatorState = valveActuator.getValveActuatorState();
if (valveActuatorState != null) {
updateData("valveActuatorState", valveActuatorState);
}
}
}
}

[P1] Wire valve actuator handler into the factory

The newly added HaywardValveActuatorHandler is never instantiated because HaywardHandlerFactory and the binding constants do not register any valve actuator thing type. As a result, no thing will ever receive this handler and the telemetry/config updates in this file can never execute, leaving valve actuator channels unchanged. Consider adding a ThingTypeUID and factory branch so the handler can actually be used.


Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

@matchews matchews deleted the codex/create-valveactuator-and-update-status-class branch October 21, 2025 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant