djtimca / haomnilogic

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

Issue on initial load #29

Closed rukiddin closed 2 years ago

rukiddin commented 2 years ago

Running Home Assistant 2022.6.7 Running HAOMNILOGIC via HACS 1.0.1.4

When attempting to start up for the first time on a new install of Home Assistant (running the Home Assistant OS) I get the following error message:

2022-07-05 20:28:08 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Omnilogic for omnilogic File "/config/custom_components/omnilogic/__init__.py", line 39, in async_setup_entry File "/usr/local/lib/python3.9/site-packages/omnilogic/__init__.py", line 1035, in get_telemetry_data

Also, when I run the debug tool, I get the following message:

Saved file: output_116_7b292edaa1_mspconfig.xml Saved file: output_116_78785fb8a9_telemetry.xml An error occurred:list indices must be integers or slices, not str

Here is the output file:output_116_7b292edaa1_mspconfig.xml

`Percent12 Hour FormatStandardSaltEnglishstandardYesNoNoYes MSP Configuration

0Backyard037YARD LIGHTSRLY_HIGH_VOLTAGE_RELAYRLY_LIGHT 01 2PoolBOW_POOLBOW_SHARED_EQUIPMENTSHARED_EQUIPMENT_LOW_PRIORITY12no03Filter PumpBOW_SHARED_EQUIPMENTFMT_VARIABLE_SPEED_PUMP1005134501750yes51801008072004BOW_SHARED_EQUIPMENTno8010455104 PEO_HEATER_EQUIPMENT 5GasPET_HEATERHTR_GASyesHTR_PRIORITY_2HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID167WaterSensorSENSOR_WATER_TEMPUNITS_FAHRENHEIT9ChlorinatorBOW_SHARED_EQUIPMENTyesCHLOR_OP_MODE_TIMED7524CELL_TYPE_T15SALT_DISPENSING PEO_CHLORINATOR_EQUIPMENT 10Chlorinator1PET_CHLORINATORCHLOR_TYPE_MAIN_PANELyes21FlowSensorSENSOR_FLOWUNITS_ACTIVE_INACTIVE33UCLCOLOR_LOGIC_UCL 02 12SpaBOW_SPABOW_SHARED_EQUIPMENTSHARED_EQUIPMENT_HIGH_PRIORITY2no150014Filter PumpBOW_SHARED_EQUIPMENTFMT_VARIABLE_SPEED_PUMP1008034501750yes80801000720015BOW_SHARED_EQUIPMENTno10010455104 PEO_HEATER_EQUIPMENT 16GasPET_HEATERHTR_GASyesHTR_PRIORITY_2HTR_MAINTAINS_PRIORITY_FOR_AS_LONG_AS_VALID517ChlorinatorBOW_SHARED_EQUIPMENTnoCHLOR_OP_MODE_TIMED9024CELL_TYPE_T15SALT_DISPENSING PEO_CHLORINATOR_EQUIPMENT 18Chlorinator1PET_CHLORINATORCHLOR_TYPE_MAIN_PANELyes20WaterSensorSENSOR_WATER_TEMPUNITS_FAHRENHEIT22FlowSensorSENSOR_FLOWUNITS_ACTIVE_INACTIVE232516495109591612712931164501095916127112143416410000175923127138135026843545514023912684354551423412268435455146545`
djtimca commented 2 years ago

Thanks @rukiddin. I've made some adjustments to the test script which I'll publish out once tested.

Can you please re-run the test on replit and let me know the result? If you get a file called output116?????_telemetry.json can you please copy and paste it's contents here so I can validate? (You should see that instead of the error you are getting now).

Thanks!

rukiddin commented 2 years ago

Here's the output from the file you requested (output_116_3c01c33b7a_telemetry.json).

[{'systemId': 'REDACTED', 'statusVersion': '9', 'status': '1', 'state': '1', 'configUpdatedTime': '2022-07-05T21:33:41.072Z', 'datetime': '2022-07-07T09:12:49.2749645', 'Relays': [{'systemId': '37', 'relayState': '0', 'Name': 'YARD LIGHTS', 'Type': 'RLY_HIGH_VOLTAGE_RELAY', 'Function': 'RLY_LIGHT', 'Alarms': []}], 'BOWS': [{'systemId': '2', 'flow': '1', 'waterTemp': '79', 'Name': 'Pool', 'Supports-Spillover': 'no', 'Filter': {'systemId': '3', 'valvePosition': '1', 'filterSpeed': '95', 'filterState': '1', 'lastSpeed': '51', 'Name': 'Filter Pump', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Filter-Type': 'FMT_VARIABLE_SPEED_PUMP', 'Max-Pump-Speed': '100', 'Min-Pump-Speed': '51', 'Max-Pump-RPM': '3450', 'Min-Pump-RPM': '1750', 'Priming-Enabled': 'yes', 'Alarms': []}, 'VirtualHeater': {'systemId': '4', 'Current-Set-Point': '80', 'enable': 'no'}, 'Heater': {'systemId': '5', 'heaterState': '0', 'enable': 'yes', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Operation': {'VirtualHeater': {'System-Id': '5', 'Name': 'Gas', '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': '16', 'Current-Set-Point': '80', 'Max-Water-Temp': '104', 'Min-Settable-Water-Temp': '55', 'Max-Settable-Water-Temp': '104', 'enable': 'yes', 'systemId': '4'}}, 'Name': 'Gas', 'Alarms': []}, 'Chlorinator': {'systemId': '9', 'operatingMode': '1', 'Timed-Percent': '50', 'scMode': '0', 'chlrError': '0', 'chlrAlert': '0', 'avgSaltLevel': '3913', 'instantSaltLevel': '3659', 'status': '132', 'Name': 'Chlorinator', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Operation': [{'System-Id': '10', 'Name': 'Chlorinator1', 'Type': 'PET_CHLORINATOR', 'Chlorinator-Type': 'CHLOR_TYPE_MAIN_PANEL', 'Enabled': 'yes'}], 'Alarms': []}, 'CSAD': {'systemId': '0', 'ph': '', 'orp': '', 'status': '0', 'mode': '0', 'Alarms': []}, 'Lights': [{'systemId': '33', 'lightState': '0', 'currentShow': '0', 'Name': 'UCL', 'Type': 'COLOR_LOGIC_UCL', 'V2': 'no', 'Alarms': []}], 'Relays': [], 'Pumps': [], 'Heaters': [{'systemId': '5', 'heaterState': '0', 'enable': 'yes', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Operation': {'VirtualHeater': {'System-Id': '5', 'Name': 'Gas', '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': '16', 'Current-Set-Point': '80', 'Max-Water-Temp': '104', 'Min-Settable-Water-Temp': '55', 'Max-Settable-Water-Temp': '104', 'enable': 'yes', 'systemId': '4'}}, 'Name': 'Gas', 'Alarms': []}]}, {'systemId': '12', 'flow': '1', 'waterTemp': '-1', 'Name': 'Spa', 'Supports-Spillover': 'no', 'Filter': {'systemId': '14', 'valvePosition': '1', 'filterSpeed': '0', 'filterState': '0', 'lastSpeed': '80', 'Name': 'Filter Pump', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Filter-Type': 'FMT_VARIABLE_SPEED_PUMP', 'Max-Pump-Speed': '100', 'Min-Pump-Speed': '80', 'Max-Pump-RPM': '3450', 'Min-Pump-RPM': '1750', 'Priming-Enabled': 'yes', 'Alarms': []}, 'VirtualHeater': {'systemId': '15', 'Current-Set-Point': '100', 'enable': 'no'}, 'Heater': {'systemId': '16', 'heaterState': '0', 'enable': 'yes', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Operation': {'VirtualHeater': {'System-Id': '16', 'Name': 'Gas', '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': '100', 'Max-Water-Temp': '104', 'Min-Settable-Water-Temp': '55', 'Max-Settable-Water-Temp': '104', 'enable': 'yes', 'systemId': '15'}}, 'Name': 'Gas', 'Alarms': []}, 'Chlorinator': {'systemId': '17', 'operatingMode': '1', 'Timed-Percent': '0', 'scMode': '0', 'chlrError': '0', 'chlrAlert': '0', 'avgSaltLevel': '0', 'instantSaltLevel': '0', 'status': '0', 'Name': 'Chlorinator', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Operation': [{'System-Id': '18', 'Name': 'Chlorinator1', 'Type': 'PET_CHLORINATOR', 'Chlorinator-Type': 'CHLOR_TYPE_MAIN_PANEL', 'Enabled': 'yes'}], 'Alarms': []}, 'CSAD': {'systemId': '0', 'ph': '', 'orp': '', 'status': '0', 'mode': '0', 'Alarms': []}, 'Group': {'systemId': '47', 'groupState': '0'}, 'Lights': [], 'Relays': [], 'Pumps': [], 'Heaters': [{'systemId': '16', 'heaterState': '0', 'enable': 'yes', 'Shared-Type': 'BOW_SHARED_EQUIPMENT', 'Operation': {'VirtualHeater': {'System-Id': '16', 'Name': 'Gas', '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': '100', 'Max-Water-Temp': '104', 'Min-Settable-Water-Temp': '55', 'Max-Settable-Water-Temp': '104', 'enable': 'yes', 'systemId': '15'}}, 'Name': 'Gas', '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': []}]

djtimca commented 2 years ago

Fix is implemented. New release will be available shortly with this fix applied.