djtimca / haomnilogic

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

Need sample of how to handle changing light mode. #17

Closed MHillyer closed 2 years ago

MHillyer commented 2 years ago

My pool lights, which are not Hayward, have the following state attributes:

`effect_list:

Is there a way to change the light mode on these lights?

djtimca commented 2 years ago

The only lights supported at the moment are Colorlogic lights. I'll add this as a potential future backlog item.

djtimca commented 2 years ago

Data for testing:

mspconfig: `

Percent 12 Hour Format Standard Salt English standard No Yes Yes Yes MSP Configuration 0 Backyard 0 16 AirSensor SENSOR_AIR_TEMP UNITS_FAHRENHEIT 01 1 Pool BOW_POOL BOW_SHARED_EQUIPMENT SHARED_EQUIPMENT_LOW_PRIORITY 2 no 20000 3 Filter Pump BOW_SHARED_EQUIPMENT FMT_VARIABLE_SPEED_PUMP 100 18 3450 600 no 18 50 100 100 7200 4 BOW_SHARED_EQUIPMENT no 84 70 104 65 104 PEO_HEATER_EQUIPMENT 5 Heater PET_HEATER HTR_GAS yes HTR_PRIORITY_2 HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID 14 6 Cleaner PMP_SINGLE_SPEED PMP_CLEANER no 1 yes ILK_SOURCE_FILTER 3 ILK_COMPARE_EQUAL_TO 0 0 3450 600 18 100 100 100 100 100 7 Waterfall PMP_VARIABLE_SPEED_PUMP PMP_WATERFALL no 3450 600 25 100 50 0 100 25 8 WaterSlide RLY_VALVE_ACTUATOR RLY_WATER_SLIDE 9 Fountain RLY_VALVE_ACTUATOR RLY_FOUNTAIN 10 Color Lights COLOR_LOGIC_UCL 17 WaterSensor SENSOR_WATER_TEMP UNITS_FAHRENHEIT 02 2 Spa BOW_SPA BOW_SHARED_EQUIPMENT SHARED_EQUIPMENT_HIGH_PRIORITY 1 no 3000 12 Filter Pump BOW_SHARED_EQUIPMENT FMT_VARIABLE_SPEED_PUMP 100 18 3450 600 no 18 50 100 100 7200 13 BOW_SHARED_EQUIPMENT no 90 70 104 65 104 PEO_HEATER_EQUIPMENT 14 Heater PET_HEATER HTR_GAS yes HTR_PRIORITY_2 HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID 5 15 Blower RLY_HIGH_VOLTAGE_RELAY RLY_BLOWER 18 WaterSensor SENSOR_WATER_TEMP UNITS_FAHRENHEIT 1 3 19 164 100 1 25 6 48 20 127 1 1 10 24 164 12 1 39 20 0 23 127 1 21 1 20 0 268435455 1 23 2 22 1 268435455 1 20 Hot Tub Time 20 TurnOnOffForGroup 1 3 0 0 SetHeaterScheduleCmd 1 4 88 0 0 0 0 0 0 0 SetUITemporaryHeaterPriorityCmd 1 5 -1 -1 -1 -1 SetUITemporaryHeaterMaintainPriorityCmd 1 4 24 255 255 255 255 SetUITemporaryHeaterEnable 1 4 0 SetUITemporaryHeaterEnable 1 5 1 TurnOnOffForGroup 1 6 0 0 TurnOnOffForGroup 1 7 30 0 TurnOnOffForGroup 1 8 0 0 TurnOnOffForGroup 1 9 0 0 TurnOnOffForGroup 1 10 263168 1 TurnOnOffForGroup 2 12 100 0 SetHeaterScheduleCmd 2 13 100 0 0 0 0 0 0 0 SetUITemporaryHeaterPriorityCmd 2 14 -1 -1 -1 -1 SetUITemporaryHeaterMaintainPriorityCmd 2 13 24 255 255 255 255 SetUITemporaryHeaterEnable 2 13 1 SetUITemporaryHeaterEnable 2 14 1 TurnOnOffForGroup 2 15 1 0 22 Warm Pool 16 TurnOnOffForGroup 1 3 100 0 SetHeaterScheduleCmd 1 4 88 0 0 0 0 0 0 0 SetUITemporaryHeaterPriorityCmd 1 5 -1 -1 -1 -1 SetUITemporaryHeaterMaintainPriorityCmd 1 4 24 255 255 255 255 SetUITemporaryHeaterEnable 1 4 1 SetUITemporaryHeaterEnable 1 5 1 TurnOnOffForGroup 1 6 0 0 TurnOnOffForGroup 1 7 25 0 TurnOnOffForGroup 1 8 0 0 TurnOnOffForGroup 1 9 0 0 TurnOnOffForGroup 1 10 263168 1 TurnOnOffForGroup 2 12 0 0 SetHeaterScheduleCmd 2 13 100 0 0 0 0 0 0 0 SetUITemporaryHeaterPriorityCmd 2 14 -1 -1 -1 -1 SetUITemporaryHeaterMaintainPriorityCmd 2 13 24 255 255 255 255 SetUITemporaryHeaterEnable 2 13 0 SetUITemporaryHeaterEnable 2 14 1 TurnOnOffForGroup 2 15 0 0

`

Telemetry: ` [ { "systemId":"REDACTED", "statusVersion":"7", "airTemp":"79", "status":"1", "state":"1", "configUpdatedTime":"2022-06-10T02:24:38.682Z", "datetime":"2022-06-10T12:16:11.459", "Relays":[

  ],
  "BOWS":[
     {
        "systemId":"1",
        "flow":"255",
        "waterTemp":"81",
        "Name":"Pool",
        "Supports-Spillover":"no",
        "Filter":{
           "systemId":"3",
           "valvePosition":"1",
           "filterSpeed":"100",
           "filterState":"1",
           "lastSpeed":"100",
           "Name":"Filter Pump",
           "Shared-Type":"BOW_SHARED_EQUIPMENT",
           "Filter-Type":"FMT_VARIABLE_SPEED_PUMP",
           "Max-Pump-Speed":"100",
           "Min-Pump-Speed":"18",
           "Max-Pump-RPM":"3450",
           "Min-Pump-RPM":"600",
           "Priming-Enabled":"no",
           "Alarms":[

           ]
        },
        "VirtualHeater":{
           "systemId":"4",
           "Current-Set-Point":"84",
           "enable":"no"
        },
        "Heater":{
           "systemId":"5",
           "heaterState":"0",
           "enable":"yes",
           "Shared-Type":"BOW_SHARED_EQUIPMENT",
           "Operation":{
              "VirtualHeater":{
                 "System-Id":"5",
                 "Name":"Heater",
                 "Type":"PET_HEATER",
                 "Heater-Type":"HTR_GAS",
                 "Enabled":"yes",
                 "Priority":"HTR_PRIORITY_2",
                 "Run-For-Priority":"HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID",
                 "Shared-Equipment-System-ID":"14",
                 "Current-Set-Point":"84",
                 "Max-Water-Temp":"104",
                 "Min-Settable-Water-Temp":"65",
                 "Max-Settable-Water-Temp":"104",
                 "enable":"yes",
                 "systemId":"4"
              }
           },
           "Name":"Heater",
           "Alarms":[

           ]
        },
        "CSAD":{
           "systemId":"0",
           "ph":"",
           "orp":"",
           "status":"0",
           "mode":"0",
           "Alarms":[

           ]
        },
        "Lights":[
           {
              "systemId":"10",
              "lightState":"0",
              "currentShow":"12",
              "Name":"Color Lights",
              "Type":"COLOR_LOGIC_UCL",
              "V2":"no",
              "Alarms":[

              ]
           }
        ],
        "Relays":[
           {
              "systemId":"8",
              "relayState":"0",
              "Name":"WaterSlide",
              "Type":"RLY_VALVE_ACTUATOR",
              "Function":"RLY_WATER_SLIDE",
              "Alarms":[

              ]
           },
           {
              "systemId":"9",
              "relayState":"0",
              "Name":"Fountain",
              "Type":"RLY_VALVE_ACTUATOR",
              "Function":"RLY_FOUNTAIN",
              "Alarms":[

              ]
           }
        ],
        "Pumps":[
           {
              "systemId":"6",
              "pumpState":"0",
              "pumpSpeed":"0",
              "lastSpeed":"100",
              "Name":"Cleaner",
              "Type":"PMP_SINGLE_SPEED",
              "Function":"PMP_CLEANER",
              "Min-Pump-Speed":"18",
              "Max-Pump_Speed":"100",
              "Alarms":[

              ]
           },
           {
              "systemId":"7",
              "pumpState":"0",
              "pumpSpeed":"0",
              "lastSpeed":"100",
              "Name":"Waterfall",
              "Type":"PMP_VARIABLE_SPEED_PUMP",
              "Function":"PMP_WATERFALL",
              "Min-Pump-Speed":"25",
              "Max-Pump_Speed":"100",
              "Alarms":[

              ]
           }
        ],
        "Heaters":[
           {
              "systemId":"5",
              "heaterState":"0",
              "enable":"yes",
              "Shared-Type":"BOW_SHARED_EQUIPMENT",
              "Operation":{
                 "VirtualHeater":{
                    "System-Id":"5",
                    "Name":"Heater",
                    "Type":"PET_HEATER",
                    "Heater-Type":"HTR_GAS",
                    "Enabled":"yes",
                    "Priority":"HTR_PRIORITY_2",
                    "Run-For-Priority":"HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID",
                    "Shared-Equipment-System-ID":"14",
                    "Current-Set-Point":"84",
                    "Max-Water-Temp":"104",
                    "Min-Settable-Water-Temp":"65",
                    "Max-Settable-Water-Temp":"104",
                    "enable":"yes",
                    "systemId":"4"
                 }
              },
              "Name":"Heater",
              "Alarms":[

              ]
           }
        ]
     },
     {
        "systemId":"2",
        "flow":"255",
        "waterTemp":"-1",
        "Name":"Spa",
        "Supports-Spillover":"no",
        "Filter":{
           "systemId":"12",
           "valvePosition":"1",
           "filterSpeed":"0",
           "filterState":"0",
           "lastSpeed":"18",
           "Name":"Filter Pump",
           "Shared-Type":"BOW_SHARED_EQUIPMENT",
           "Filter-Type":"FMT_VARIABLE_SPEED_PUMP",
           "Max-Pump-Speed":"100",
           "Min-Pump-Speed":"18",
           "Max-Pump-RPM":"3450",
           "Min-Pump-RPM":"600",
           "Priming-Enabled":"no",
           "Alarms":[

           ]
        },
        "VirtualHeater":{
           "systemId":"13",
           "Current-Set-Point":"90",
           "enable":"no"
        },
        "Heater":{
           "systemId":"14",
           "heaterState":"0",
           "enable":"yes",
           "Shared-Type":"BOW_SHARED_EQUIPMENT",
           "Operation":{
              "VirtualHeater":{
                 "System-Id":"14",
                 "Name":"Heater",
                 "Type":"PET_HEATER",
                 "Heater-Type":"HTR_GAS",
                 "Enabled":"yes",
                 "Priority":"HTR_PRIORITY_2",
                 "Run-For-Priority":"HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID",
                 "Shared-Equipment-System-ID":"5",
                 "Current-Set-Point":"90",
                 "Max-Water-Temp":"104",
                 "Min-Settable-Water-Temp":"65",
                 "Max-Settable-Water-Temp":"104",
                 "enable":"yes",
                 "systemId":"13"
              }
           },
           "Name":"Heater",
           "Alarms":[

           ]
        },
        "CSAD":{
           "systemId":"0",
           "ph":"",
           "orp":"",
           "status":"0",
           "mode":"0",
           "Alarms":[

           ]
        },
        "Group":{
           "systemId":"22",
           "groupState":"0"
        },
        "Lights":[

        ],
        "Relays":[
           {
              "systemId":"15",
              "relayState":"0",
              "Name":"Blower",
              "Type":"RLY_HIGH_VOLTAGE_RELAY",
              "Function":"RLY_BLOWER",
              "Alarms":[

              ]
           }
        ],
        "Pumps":[
           {
              "systemId":"6",
              "pumpState":"0",
              "pumpSpeed":"0",
              "lastSpeed":"100",
              "Name":"Cleaner",
              "Type":"PMP_SINGLE_SPEED",
              "Function":"PMP_CLEANER",
              "Min-Pump-Speed":"18",
              "Max-Pump_Speed":"100",
              "Alarms":[

              ]
           },
           {
              "systemId":"7",
              "pumpState":"0",
              "pumpSpeed":"0",
              "lastSpeed":"100",
              "Name":"Waterfall",
              "Type":"PMP_VARIABLE_SPEED_PUMP",
              "Function":"PMP_WATERFALL",
              "Min-Pump-Speed":"25",
              "Max-Pump_Speed":"100",
              "Alarms":[

              ]
           }
        ],
        "Heaters":[
           {
              "systemId":"14",
              "heaterState":"0",
              "enable":"yes",
              "Shared-Type":"BOW_SHARED_EQUIPMENT",
              "Operation":{
                 "VirtualHeater":{
                    "System-Id":"14",
                    "Name":"Heater",
                    "Type":"PET_HEATER",
                    "Heater-Type":"HTR_GAS",
                    "Enabled":"yes",
                    "Priority":"HTR_PRIORITY_2",
                    "Run-For-Priority":"HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID",
                    "Shared-Equipment-System-ID":"5",
                    "Current-Set-Point":"90",
                    "Max-Water-Temp":"104",
                    "Min-Settable-Water-Temp":"65",
                    "Max-Settable-Water-Temp":"104",
                    "enable":"yes",
                    "systemId":"13"
                 }
              },
              "Name":"Heater",
              "Alarms":[

              ]
           }
        ]
     }
  ],
  "BackyardName":"REDACTED",
  "Msp-Vsp-Speed-Format":"Percent",
  "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

@MHillyer your lights are appearing in the data as Colorlogic lights so they should be controllable using the integration. When you turn them on, you can go into them to see the light show effects you can set.

Have a look at the wiki page for Lights: https://github.com/djtimca/haomnilogic/wiki/Lights

Let me know if you can set things using the integration as it is - if it works, please close this issue.

MHillyer commented 2 years ago

Got it, thanks! Closing.