djtimca / haomnilogic

Hayward Omnilogic integration for Home Assistant available through HACS
Apache License 2.0
18 stars 6 forks source link

ColorLogic Lights Not Showing as Devices #21

Closed TMarzullo closed 2 years ago

TMarzullo commented 2 years ago

I don't know if I should put this here first, or try to post in the community, so let me know if I should start there because I don't know if this is an issue for anyone else, but my Pool Lights do not show up at all. I guess I need to know if the lights will show up automatically after installation or if there is some additional step I am missing. I have also done the required reboot multiple times as I troubleshoot (getting my instance of HA up to the current release and such). I was previously utilizing the Hayward OmniLogic integration, but from what I have read in in the community discussions that shouldn't be a problem as this just overides the built in integration.

I am running: Home Assistant Core 2022.6.5 Home Assistant Supervisor 2022.05.3 Home Assistant OS 8.2

And I just installed the updated custom integration from HACS to 1.0.13 but it doesn't seem to fix my issue. I have tried deleting the reinstalling the built in integration but everything I have tried only gets me the entities for the Air Temp, Water Temp, and Filter Pump, the Filter Pump Alarm and the Filter Pump Speed. I have attached my telemetry data and response data from the Replit testing harness. I am hoping I am just missing some step and I can beg your forgiveness for wasting your time. Any help is appreciated.

Telemetry: [{ 'systemId': 'REDACTED', 'statusVersion': '5', 'airTemp': '81', 'status': '1', 'state': '1', 'configUpdatedTime': '0001-01-01T00:00:00', 'datetime': '2022-06-14T16:34:07.2894091', 'Relays': [], 'BOWS': [{ 'systemId': '1', 'flow': '255', 'waterTemp': '87', 'Name': 'Pool', 'Supports-Spillover': 'no', 'Filter': { 'systemId': '2', 'valvePosition': '1', 'filterSpeed': '60', 'filterState': '1', 'lastSpeed': '18', 'Name': 'Filter Pump', 'Shared-Type': 'BOW_NO_EQUIPMENT_SHARED', 'Filter-Type': 'FMT_VARIABLE_SPEED_PUMP', 'Max-Pump-Speed': '100', 'Min-Pump-Speed': '18', 'Max-Pump-RPM': '3450', 'Min-Pump-RPM': '600', 'Priming-Enabled': 'yes', 'Alarms': [] }, 'VirtualHeater': { 'systemId': '0', 'Current-Set-Point': '0', 'enable': 'no' }, 'CSAD': { 'systemId': '0', 'ph': '', 'orp': '', 'status': '0', 'mode': '0', 'Alarms': [] }, 'Group': { 'systemId': '17', 'groupState': '0' }, 'Lights': [{ 'systemId': '5', 'lightState': '0', 'currentShow': '12', 'speed': '3', 'brightness': '4' } ], 'Relays': [], 'Pumps': [], 'Heaters': [] } ], 'BackyardName': 'REDACTED', 'Msp-Vsp-Speed-Format': 'RPM', 'Msp-Time-Format': '12 Hour Format', 'Units': 'Standard', 'Msp-Chlor-Display': 'Salt', 'Msp-Language': 'English', 'Unit-of-Measurement': 'Standard', 'Alarms': [], 'Unit-of-Temperature': 'UNITS_FAHRENHEIT' } ]

Response Data: `

RPM 12 Hour Format Standard Salt English standard Yes Yes Yes Yes MSP Configuration 0 Backyard 0 3 AirSensor SENSOR_AIR_TEMP UNITS_FAHRENHEIT 5 Pool Lights COLOR_LOGIC_UCL yes 01 1 Pool BOW_POOL BOW_NO_EQUIPMENT_SHARED SHARED_EQUIPMENT_LOW_PRIORITY 0 no 7500 2 Filter Pump BOW_NO_EQUIPMENT_SHARED FMT_VARIABLE_SPEED_PUMP 100 18 3450 600 yes 18 50 100 100 7200 4 WaterSensor SENSOR_WATER_TEMP UNITS_FAHRENHEIT 1 2 7 164 60 1 0 7 0 19 127 1 1 2 8 164 47 1 0 19 0 7 127 1 0 5 9 164 262924 1 14 18 0 0 127 1 0 17 19 317 1 1 8 18 0 0 127 1 0 17 20 317 1 1 52 16 0 0 127 1 10 1 5 0 0 4 4 1 15 3 14 2 268435455 1 16 4 5 3 12 3 4 1 18 5 17 4 268435455 1 14 VoodooLounge 14 TurnOnOffForGroup 0 5 263168 1 TurnOnOffForGroup 1 2 76 0 17 Evening 17 TurnOnOffForGroup 0 5 262924 1 TurnOnOffForGroup 1 2 57 0
<MSPAPI version="0.4" latestversion="0.4">
    <Device-APIs>
        <API System-Id="5" OpType="ON_OFF" ref="SetUIEquipmentCmd" EquipmentID="5" IsOn="API::STATUS::ColorLogic-Light::lightState"/>
        <API System-Id="5" OpType="ON_SETPOINT" ref="SetStandAloneLightShowV2" LightID="5" Show="API::STATUS::ColorLogic-Light::currentShow" Speed="API::STATUS::ColorLogic-Light::speed" Brightness="API::STATUS::ColorLogic-Light::brightness"/>
        <API System-Id="14" OpType="ON_OFF" ref="RunGroupCmd" ThemeID="14" IsOn="API::STATUS::Group::groupState"/>
        <API System-Id="17" OpType="ON_OFF" ref="RunGroupCmd" ThemeID="17" IsOn="API::STATUS::Group::groupState"/>
        <API System-Id="2" OpType="ON_OFF" ref="SetUIEquipmentCmd" EquipmentID="2" IsOn="API::STATUS::Filter::filterSpeed"/>
        <API System-Id="0" OpType="ON_OFF" ref="SetHeaterEnable" HeaterID="0"/>
        <API System-Id="0" OpType="SETPOINT" ref="SetUIHeaterCmd" HeaterID="0" Temp="API::STATUS::VirtualHeater::Current-Set-Point"/>
        <API System-Id="0" OpType="CSAD_MODE" ref="UISetCSADMode" CSADID="0" Mode="API::STATUS::CSAD::mode"/>
        <API System-Id="0" OpType="CSAD_CALIBRATION" ref="UISetCSADTargetValue" CSADID="0" Mode="API::STATUS::CSAD::ph"/>
    </Device-APIs>
    <Favorite-APIs>
        <API Favorite-Id="5" ref="SetStandAloneLightShowV2" OpType="ON_SETPOINT" LightID="5" Show="API::CONFIG::Favorite::Data" Speed="API::CONFIG::Favorite::Data2" Brightness="API::CONFIG::Favorite::Data3"/>
        <API Favorite-Id="14" ref="RunGroupCmd" OpType="ON_OFF" ThemeID="14" IsOn="API::STATUS::Group::groupState"/>
        <API Favorite-Id="17" ref="RunGroupCmd" OpType="ON_OFF" ThemeID="17" IsOn="API::STATUS::Group::groupState"/>
        <API Favorite-Id="2" ref="SetUIEquipmentCmd" OpType="ON_OFF" EquipmentID="2" IsOn="API::STATUS::Filter::filterState"/>
        <API Favorite-Id="0" ref="API::GOTOFEATURE"/>
        <API Favorite-Id="1" ref="SetHeaterEnable" HeaterID="0"/>
        <API Favorite-Id="0" ref="API::GOTOFEATURE"/>
    </Favorite-APIs>
    <Schedule-APIs>
        <API System-Id="5" OpType="CREATE_SCHEDULE" ref="CreateUIScheduleAltCmd" EquipmentID="5" Show="API::STATUS::ColorLogic-Light::currentShow" Speed="API::STATUS::ColorLogic-Light::speed" Brightness="API::STATUS::ColorLogic-Light::brightness" Data4="0" ActionID="308"/>
        <API System-Id="5" OpType="EDIT_SCHEDULE" ref="EditUIScheduleAltCmd" EquipmentID="API::CONFIG::sche::schedule-system-id" Show="API::STATUS::ColorLogic-Light::currentShow" Speed="API::STATUS::ColorLogic-Light::speed" Brightness="API::STATUS::ColorLogic-Light::brightness" Data4="0" ActionID="308"/>
        <API System-Id="5" OpType="REMOVE_SCHEDULE" ref="DeleteUIScheduleCmd" ScheduleSystemID="API::CONFIG::sche::schedule-system-id"/>
        <API System-Id="14" OpType="CREATE_SCHEDULE" ref="CreateUIScheduleCmd" EquipmentID="14" Data="1" ActionID="317"/>
        <API System-Id="14" OpType="EDIT_SCHEDULE" ref="EditUIScheduleCmd" EquipmentID="API::CONFIG::sche::schedule-system-id" Data="1" ActionID="317"/>
        <API System-Id="14" OpType="REMOVE_SCHEDULE" ref="DeleteUIScheduleCmd" ScheduleSystemID="API::CONFIG::sche::schedule-system-id"/>
        <API System-Id="17" OpType="CREATE_SCHEDULE" ref="CreateUIScheduleCmd" EquipmentID="17" Data="1" ActionID="317"/>
        <API System-Id="17" OpType="EDIT_SCHEDULE" ref="EditUIScheduleCmd" EquipmentID="API::CONFIG::sche::schedule-system-id" Data="1" ActionID="317"/>
        <API System-Id="17" OpType="REMOVE_SCHEDULE" ref="DeleteUIScheduleCmd" ScheduleSystemID="API::CONFIG::sche::schedule-system-id"/>
        <API System-Id="2" OpType="CREATE_SCHEDULE" ref="CreateUIScheduleCmd" EquipmentID="2" Data="API::STATUS::Filter::filterSpeed" ActionID="164"/>
        <API System-Id="2" OpType="EDIT_SCHEDULE" ref="EditUIScheduleCmd" EquipmentID="API::CONFIG::sche::schedule-system-id" Data="API::STATUS::Filter::filterSpeed" ActionID="164"/>
        <API System-Id="2" OpType="REMOVE_SCHEDULE" ref="DeleteUIScheduleCmd" ScheduleSystemID="API::CONFIG::sche::schedule-system-id"/>
        <API System-Id="0" OpType="CREATE_SCHEDULE" ref="CreateUIScheduleCmd" EquipmentID="0" Data="API::STATUS::VirtualHeater::Current-Set-Point" ActionID="315"/>
        <API System-Id="0" OpType="EDIT_SCHEDULE" ref="EditUIScheduleCmd" EquipmentID="API::CONFIG::sche::schedule-system-id" Data="API::STATUS::VirtualHeater::Current-Set-Point" ActionID="315"/>
        <API System-Id="0" OpType="REMOVE_SCHEDULE" ref="DeleteUIScheduleCmd" ScheduleSystemID="API::CONFIG::sche::schedule-system-id"/>
    </Schedule-APIs>
</MSPAPI>

`

djtimca commented 2 years ago

@TMarzullo thanks for posting and including all the telemetry etc! Looking at things for some reason the flag that your lights are version 2 didn't come through. I've made a change to the Replit to test before I push an update to the integration. Can you re-run and post your telemetry file again? MSP config is optional this time. Thanks!

TMarzullo commented 2 years ago

Tim,

Thank you so much for taking a look. I really appreciate it. I reran the telemetry as requested. See below:

[{'systemId': 'REDACTED', 'statusVersion': '5', 'airTemp': '80', 'status': '1', 'state': '1', 'configUpdatedTime': '0001-01-01T00:00:00-06:00', 'datetime': '2022-06-15T08:17:36.0584', 'Relays': [], 'BOWS': [{'systemId': '1', 'flow': '255', 'waterTemp': '84', 'Name': 'Pool', 'Supports-Spillover': 'no', 'Filter': {'systemId': '2', 'valvePosition': '1', 'filterSpeed': '60', 'filterState': '1', 'lastSpeed': '18', 'Name': 'Filter Pump', 'Shared-Type': 'BOW_NO_EQUIPMENT_SHARED', 'Filter-Type': 'FMT_VARIABLE_SPEED_PUMP', 'Max-Pump-Speed': '100', 'Min-Pump-Speed': '18', 'Max-Pump-RPM': '3450', 'Min-Pump-RPM': '600', 'Priming-Enabled': 'yes', 'Alarms': []}, 'VirtualHeater': {'systemId': '0', 'Current-Set-Point': '0', 'enable': 'no'}, 'CSAD': {'systemId': '0', 'ph': '', 'orp': '', 'status': '0', 'mode': '0', 'Alarms': []}, 'Group': {'systemId': '17', 'groupState': '0'}, 'Lights': [{'systemId': '5', 'lightState': '0', 'currentShow': '12', 'speed': '3', 'brightness': '4'}], 'Relays': [], 'Pumps': [], 'Heaters': []}], 'BackyardName': 'REDACTED', 'Msp-Vsp-Speed-Format': 'RPM', 'Msp-Time-Format': '12 Hour Format', 'Units': 'Standard', 'Msp-Chlor-Display': 'Salt', 'Msp-Language': 'English', 'Unit-of-Measurement': 'Standard', 'Alarms': [], 'Unit-of-Temperature': 'UNITS_FAHRENHEIT'}]

djtimca commented 2 years ago

Thanks @TMarzullo - are there any errors in your log on at startup related to Omnilogic?

djtimca commented 2 years ago

Actually I think I may have found the issue and have included it in this morning's release. Please do an update @TMarzullo from HACS and if the lights show up properly now please close this issue. If not, I'll need to do more digging.

TMarzullo commented 2 years ago

Hi Tim, Sorry for the delayed response. I pulled the new version and installed it and a new light entity did indeed show up (yay!). Note: My pool has two lights that are configured as a single light so that they are synchronized which is why there is only one entity (I am assuming)

There still seems to be an issue with actually controlling them. If I turn them on, I see the entry in the Logbook that says:

"Pool Light turned on triggered by service light.turn_on"

But within a minute the state changes to off with an entry in the logbook of:

"Pool Light turned off"

I configured a custom light card for the new entity, but it too is unable to change anything. I does seem to be able to read some state values. -for example if I manually turn them on, it will be reflected accurately in the entity as will the Effect that is currently enabled. However it doesn't appear to be reading the brightness state.

What additional data can I collect from my setup that could assist you? I have no problem letting my setup be a testing ground for anything you need.

Additional Notes: I would imagine that your custom integration is limited to functionality that Hayward exposes to me through my control panel/app. If this is correct, then we shouldn't expect color wheel functionality because solid, fixed colors are only available as predefined values and can not be configured beyond brightness (Hayward seems to have a really underwhelming driver). So I would imagine that the effects via the drop down, the brightness, the on/off state and speed are probably the only options for control. This is really more of an FYI but I thought it might be useful information. At the very least I wanted to tell you how grateful I am for everything you have already done.

djtimca commented 2 years ago

Because Hayward uses a bizarre brightness scale (0-4) and speed (0-8) those values get exposed as attributes on the light. So you should be able to see the brightness and speed values in the detail / advanced view of the entity. You'll need to figure out the best way for those to be shown / controlled in the UI.

To set brightness/speed you have to use the custom service omnilogic.set_v2_lights which is defined on the main page of the repo. I don't have V2 lights so I'm not able to do much testing on them.

When you turn them on and they flip off, do you see any errors in your logs? I'm sure we're just missing something that's unique to the V2 light system, just not sure what it is!

And yes - we are totally limited by what the API/light system can do, so no color wheels are coming :)

TMarzullo commented 2 years ago

Pool Hardware companies are all bizarre I am coming to realize :)

I will double check on the brightness and speed values with the custom service but in the meantime I took a look at the Home Assistant Core logs after trying to turn on the lights. While I didn't see any entries that specifically said Hayward, Omni, or Pool...there is a Python error that is within a minute of the attempt.

`Logger: pynetgear.router Source: /usr/local/lib/python3.9/site-packages/pynetgear/router.py:405 First occurred: 1:54:59 PM (31 occurrences) Last logged: 2:35:07 PM

login using all known port-ssl combinations failed.`

Could that be the issue?

djtimca commented 2 years ago

That should not be related. Ok let me have a look tomorrow, may have something for you to try.

djtimca commented 2 years ago

Should be fixed in latest release.