Skip to content
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

Support for Chlorinator reporting state of active chlorination happening #54

Open
daytonturner opened this issue Jul 25, 2024 · 7 comments

Comments

@daytonturner
Copy link

daytonturner commented Jul 25, 2024

Hi there!

I started digging around with the intent to add chlorinator operating status to your library, but notice that some work has already been done in an attempt to add this, and wonder what your preferred approach would be.

I noticed this comment: https://github.com/cryptk/python-omnilogic-local/blob/main/pyomnilogic_local/models/telemetry.py#L77-L80

Where it checks for the presence of bit 4 being set within status_raw. I've got a diagnostic dump from my chlorinator when it was chlorinating vs not, and was initially going to use the operating_state field, but perhaps your commented out way would work better.

Here are two examples:

NOT CHLORINATING:

        "repr": "EntityIndexData(msp_config=MSPChlorinator(system_id=22, name='Chlorinator', bow_id=1, omni_type=<OmniType.CHLORINATOR: 'Chlorinator'>, enabled='yes', timed_percent=50, superchlor_timeout=24, dispenser_type=<ChlorinatorDispenserType.SALT: 'SALT_DISPENSING'>), telemetry=TelemetryChlorinator(omni_type=<OmniType.CHLORINATOR: 'Chlorinator'>, system_id=22, status_raw=136, instant_salt_level=3031, avg_salt_level=3196, chlr_alert=0, chlr_error=0, sc_mode=0, operating_state=1, timed_percent=100, operating_mode=<ChlorinatorOperatingMode.ORP: 2>, enable=True))"

CHLORINATING:

        "repr": "EntityIndexData(msp_config=MSPChlorinator(system_id=22, name='Chlorinator', bow_id=1, omni_type=<OmniType.CHLORINATOR: 'Chlorinator'>, enabled='yes', timed_percent=50, superchlor_timeout=24, dispenser_type=<ChlorinatorDispenserType.SALT: 'SALT_DISPENSING'>), telemetry=TelemetryChlorinator(omni_type=<OmniType.CHLORINATOR: 'Chlorinator'>, system_id=22, status_raw=132, instant_salt_level=3031, avg_salt_level=3196, chlr_alert=0, chlr_error=0, sc_mode=0, operating_state=2, timed_percent=100, operating_mode=<ChlorinatorOperatingMode.ORP: 2>, enable=True))"

You can see operating_state is 2 when chlorinating and 1 when not. But of course, the value of status_raw is clearly different as well.

Is there a reason your code is commented out? Either of these methods seem like they would suffice.

@krucka
Copy link

krucka commented Aug 2, 2024

I'm attempting to do the same thing as in the app there are diagnostic values for the chlorinator such as:
-Cell Temp
-Cell Current
-Cell Voltage
-Board Temp
-Relay Polarity

Port mirrored the local setup and captured the call for this data:

1.txt
3.txt

Looks like all the data is there in high and low bytes for each of the values in the first file (1.txt). The response for the relay polarity is in the second file (3.txt). I can capture more, but this is my first time doing this so hoping I'll get some reassurance that this is useful

@krucka
Copy link

krucka commented Aug 2, 2024

Captured a few more, this time with pics of what the app/controller values showed at the time:

6.txt
7.txt
Screenshot_20240801-224643
PXL_20240802_054622212

@daytonturner
Copy link
Author

Awesome - thats what I was looking at as well. I'm using a Sense & Dispense, with a chlorinator and salt cell. Let me know if theres anything I can do to assist, either with pull requests or submitting diagnostics - happy to help however needed

@dan-riley
Copy link

Any progress on this? Just discovered the integration and interested in tracking my salt cell diagnostics as I'm trying to monitor it to see if it needs to be replaced.

@cryptk
Copy link
Owner

cryptk commented Jan 8, 2025

The biggest issue I have is a lack of a chlorinator to experiment with and a lack of documentation saying what those numbers actually mean. I do have some documentation, but there is a lot missing from it. For example, none of the documentation that I have covers the GetCHLORMeasurementRsp or GetCHLORRelayPolarityRsp responses in the above captures.

@krucka any chance you could get me a set of responses, with what the app and Omni shows AND the request packets? The request packets are the things that I am missing to get the chlorinator diagnostics.

@cryptk
Copy link
Owner

cryptk commented Jan 9, 2025

Actually, turns out I do have some documentation to fully parse the chlorinator status, alert and error telemetry fields. I'll add it to the list of things to add to the library and integration.

@krucka
Copy link

krucka commented Jan 9, 2025

The biggest issue I have is a lack of a chlorinator to experiment with and a lack of documentation saying what those numbers actually mean. I do have some documentation, but there is a lot missing from it. For example, none of the documentation that I have covers the GetCHLORMeasurementRsp or GetCHLORRelayPolarityRsp responses in the above captures.

@krucka any chance you could get me a set of responses, with what the app and Omni shows AND the request packets? The request packets are the things that I am missing to get the chlorinator diagnostics.

Just getting to your message, but sounds like the documentation you found has what you need. If there's anything I can do to help, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants