haomnilogic-local icon indicating copy to clipboard operation
haomnilogic-local copied to clipboard

Unable to add Omnilogic local

Open srivers12 opened this issue 1 year ago • 13 comments

Installed the custom repository. Then when trying to install the interface I am getting an unexpected error. Have been trying to figure out the issue but not obvious (I am low level). Here is a link to the data obtained so far.

Data

srivers12 avatar Feb 04 '24 16:02 srivers12

It looks like your controller isn't responding to the request. If you are sure the IP address is correct, try completely powering down your controller and the powering it back on. We have seen controllers get into a state where they refuse to talk to anything over the local API and it requires a power cycle to snap them out of it.

cryptk avatar Feb 05 '24 17:02 cryptk

I will jump in since I looked at @srivers12's traces when I was trying to help out in the HA forum thread. The wireshark traces they posted were split into two, one trace for each direction, so you need to scroll down a bit in their document to find the second (response) trace. When taken together it looked to me like the MSP was responding; the MSPConfig block and the (compressed) telemetry both are there in the 2nd trace, in frames 2-40 and frame 42, respectively. Seemed to me that something in processing the telemetry response was causing an exception.

lurgh avatar Feb 06 '24 19:02 lurgh

I tried the power cycle of the controller. Unfortunately same error as previous. Not sure how best to look for an exception. Likely debugging but I am not good at turning that one on / reviewing.

srivers12 avatar Feb 07 '24 00:02 srivers12

I'm getting the same error. I'm willing to spend time to troubleshoot a little bit. These are the errors that I'm getting:

2024-05-31 23:02:49.338 ERROR (MainThread) [custom_components.omnilogic_local.config_flow] Unexpected exception: Failed to parse Telemetry: 10 validation errors for Telemetry ColorLogic-Light -> 0 -> @specialEffect field required (type=value_error.missing) ColorLogic-Light -> 1 -> @specialEffect field required (type=value_error.missing) VirtualHeater -> 0 -> @SolarSetPoint field required (type=value_error.missing) VirtualHeater -> 0 -> @Mode field required (type=value_error.missing) VirtualHeater -> 0 -> @SilentMode field required (type=value_error.missing) VirtualHeater -> 0 -> @whyHeaterIsOn field required (type=value_error.missing) VirtualHeater -> 1 -> @SolarSetPoint field required (type=value_error.missing) VirtualHeater -> 1 -> @Mode field required (type=value_error.missing) VirtualHeater -> 1 -> @SilentMode field required (type=value_error.missing) VirtualHeater -> 1 -> @whyHeaterIsOn field required (type=value_error.missing) Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pyomnilogic_local/models/telemetry.py", line 237, in load_xml return Telemetry.parse_obj(data["STATUS"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 526, in parse_obj return cls(**obj) ^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 341, in __init__ raise validation_error pydantic.error_wrappers.ValidationError: 10 validation errors for Telemetry ColorLogic-Light -> 0 -> @specialEffect field required (type=value_error.missing) ColorLogic-Light -> 1 -> @specialEffect field required (type=value_error.missing) VirtualHeater -> 0 -> @SolarSetPoint field required (type=value_error.missing) VirtualHeater -> 0 -> @Mode field required (type=value_error.missing) VirtualHeater -> 0 -> @SilentMode field required (type=value_error.missing) VirtualHeater -> 0 -> @whyHeaterIsOn field required (type=value_error.missing) VirtualHeater -> 1 -> @SolarSetPoint field required (type=value_error.missing) VirtualHeater -> 1 -> @Mode field required (type=value_error.missing) VirtualHeater -> 1 -> @SilentMode field required (type=value_error.missing) VirtualHeater -> 1 -> @whyHeaterIsOn field required (type=value_error.missing) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/omnilogic_local/config_flow.py", line 105, in async_step_user await validate_input(self.hass, user_input) File "/config/custom_components/omnilogic_local/config_flow.py", line 51, in validate_input telemetry = await omni.async_get_telemetry() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyomnilogic_local/models/util.py", line 43, in wrapper return pydantic_type.load_xml(resp_body) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyomnilogic_local/models/telemetry.py", line 239, in load_xml raise OmniParsingException(f"Failed to parse Telemetry: {exc}") from exc pyomnilogic_local.exceptions.OmniParsingException: Failed to parse Telemetry: 10 validation errors for Telemetry ColorLogic-Light -> 0 -> @specialEffect field required (type=value_error.missing) ColorLogic-Light -> 1 -> @specialEffect field required (type=value_error.missing) VirtualHeater -> 0 -> @SolarSetPoint field required (type=value_error.missing) VirtualHeater -> 0 -> @Mode field required (type=value_error.missing) VirtualHeater -> 0 -> @SilentMode field required (type=value_error.missing) VirtualHeater -> 0 -> @whyHeaterIsOn field required (type=value_error.missing) VirtualHeater -> 1 -> @SolarSetPoint field required (type=value_error.missing) VirtualHeater -> 1 -> @Mode field required (type=value_error.missing) VirtualHeater -> 1 -> @SilentMode field required (type=value_error.missing) VirtualHeater -> 1 -> @whyHeaterIsOn field required (type=value_error.missing)

meow4agreencard avatar Jun 01 '24 04:06 meow4agreencard

@meow4agreencard can you please download the diagnostic data from the integration and provide it here?

cryptk avatar Jun 07 '24 16:06 cryptk

@meow4agreencard can you please download the diagnostic data from the integration and provide it here?

Not sure how to, given that I can't get through the initial setup window. image

meow4agreencard avatar Jun 07 '24 18:06 meow4agreencard

Can you give me any information at all about your light and heater setup? What model of light, what kind of heater, etc?

cryptk avatar Jun 07 '24 22:06 cryptk

Can you give me any information at all about your light and heater setup? What model of light, what kind of heater, etc?

Missed your response. Sure, here's what I know. I assume you're looking for both the physical setup as well as the app capabilities: Lights - I can't figure out the HW model. The previous owner doesn't know either. I have 2 lights: one for spa, one for pool. The pool light settings in the app are more advanced: I can set the speed, brightness and light color or preset. The spa lights don't have the speed or brightness options. They have an option to "Sync Lights", but I'm not sure what it does. The pool lights don't have a sync option. Heater - Hayward H400FD connected to an automatic valve that allows to heat either the spa or the pool. Meaning in the app I have a "Heater" option for the Spa and the Pool, but technically it's one unit.

meow4agreencard avatar Jun 10 '24 02:06 meow4agreencard

@meow4agreencard if you know how python virtualenvs work, you should be able to follow these instructions to get me the data I need:

python -m venv venv
source venv/bin/activate
pip install python-omnilogic-local
OMNILOGIC_HOST=<SOME_IP_ADDRESS> OMNILOGIC_RAW=True omnilogic

Make sure to replace <SOME_IP_ADDRESS> with the IP address of your omnilogic controller, so the last line would be something like

OMNILOGIC_HOST=192.168.1.28 OMNILOGIC_RAW=True omnilogic

This should print out some debug logging as well as some XML data. Can you please attach a file with the XML data to this issue?

cryptk avatar Jun 11 '24 18:06 cryptk

omnilogic_local_log_with_XML.txt @cryptk here you go. I wasn't sure if the initial few lines of debug logs were important, so I included them even though you only asked for the XML. I hope that's not an issue.

meow4agreencard avatar Jun 11 '24 21:06 meow4agreencard

Awesome, it will take me a few days to have some time to work on it, but that is everything I should need to get the integration working with your pool.

I should probably wrap that up into a docker image or something that people can run to pull diagnostics... and maybe make a proper CLI for it...

cryptk avatar Jun 11 '24 22:06 cryptk

Updated mine to the latest firmware and it started working.

ssambhi900 avatar Aug 21 '24 03:08 ssambhi900

My OmniLogic Local configuration has been working flawlessly for a couple of months. Yesterday I started getting the following issue. Is this symptomatic of the local API lockout that is called out above? I can still get to the device via both the mobile app and using the Hayward web site. I'm traveling so can't try the reboot until I get back to the box, unless there is a way to reboot from the app or Hayward website (which I haven't been able to find).

2024-09-23 01:54:55.494 DEBUG (MainThread) [pyomnilogic_local.protocol] Sending Message ID: 714008422, Type: REQUEST_CONFIGURATION, Compressed: False, Client: XML, Body: <Request xmlns="http://nextgen.hayward.com/api"><Name>RequestConfiguration</Name></Request> 2024-09-23 01:54:55.995 DEBUG (MainThread) [pyomnilogic_local.protocol] ACK not received, re-attempting delivery 2024-09-23 01:54:56.496 DEBUG (MainThread) [pyomnilogic_local.protocol] ACK not received, re-attempting delivery 2024-09-23 01:54:56.998 DEBUG (MainThread) [pyomnilogic_local.protocol] ACK not received, re-attempting delivery 2024-09-23 01:54:57.499 DEBUG (MainThread) [pyomnilogic_local.protocol] ACK not received, re-attempting delivery 2024-09-23 01:56:18.420 DEBUG (MainThread) [pyomnilogic_local.protocol] Sending Message ID: 2568379242, Type: REQUEST_CONFIGURATION, Compressed: False, Client: XML, Body:

sabolcik avatar Sep 23 '24 12:09 sabolcik