lennoxs30 icon indicating copy to clipboard operation
lennoxs30 copied to clipboard

S40 firmware 4.27.0054 - Exception in _processEquipments

Open gdoerr opened this issue 10 months ago • 7 comments

Describe the bug With the newest version of the S40 software, it appears that the format of some of the JSON has changed from a single "value" to an array of values (example of the new JSON below). This causes an exception.

This causes the enumeration of equipment to fail and many entities to be Unavailable.

To Reproduce Upgrade thermostat to the latest Lennox version (4.27.0054)

Expected behavior The code should accept both legacy and new "values" JSON data formats.

Screenshots/Logs

File "/usr/local/lib/python3.12/site-packages/lennoxs30api/s30api_async.py", line 1654, in _processEquipments
eq.equipment_name = parameter["parameter"]["value"]
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'

JSON snippet:

            {
              "id": 1,
              "feature": {
                "name": "Equipment Type Name",
                "format": "nts",
                "szValues": 1,
                "values": [
                  {
                    "id": 0,
                    "value": "Air Conditioner"
                  }
                ],
                "fid": 15,
                "unit": ""
              }
            },
            {
              "id": 2,
              "feature": {
                "name": "Unit Model Number",
                "format": "nts",
                "szValues": 1,
                "values": [
                  {
                    "id": 0,
                    "value": "SL28XCV048-230A01"
                  }
                ],
                "fid": 6,
                "unit": ""
              }
            },

Version

  • Home Assistant: 2024.4.3
  • This Integration: 2024.3.0

**Integration Configuration **

  • Cloud or Local Connection: Local
  • Inverter or Sensor Diagnostics Enabled: Both are enabled

Additional context None

gdoerr avatar Apr 15 '24 23:04 gdoerr

The section it is having problems with is the equipment parameters. The excerpt supplied is from the equipment features. So we will need the entire message.

Please configure message logging, see this documentation:

https://github.com/PeteRager/lennoxs30?tab=readme-ov-file#reporting-bugs

Restart HA, let it run for 5 minutes, then post or email me the log file.

PeteRager avatar Apr 16 '24 00:04 PeteRager

As requested S30_msg.log

gdoerr avatar Apr 16 '24 02:04 gdoerr

Thanks for the file.

None of the equipment parameters for eqtype=18 (air conditioner) have any values and have a descriptor of "error". The other equipment seems fine, so it's just that one unit.

While I can and will update the software to not crash when this occurs. The equipment name and the parameters for the air conditioner are not available. The diagnostics look ok.

I would try power cycling everything. The S40 panels, indoor units, outdoor unit. And have the integration not running. To see if that corrects the problem. If it doesn't go into the panel and go into advanced mode / equipment and look at the air conditioner parameters. This display and the json data should be the same.

Here is the excerpt from your message.

                            "parameters": [
                                {
                                    "parameter": {
                                        "name": "Equipment Name",
                                        "format": "nts",
                                        "pid": 18,
                                        "enabled": true,
                                        "descriptor": "error",
                                        "unit": ""
                                    },
                                    "id": 0
                                },
                                {
                                    "parameter": {
                                        "name": "Compressor Short Cycle Delay",
                                        "format": "uint16",
                                        "pid": 40,
                                        "enabled": true,
                                        "descriptor": "error",
                                        "unit": "sec"
                                    },
                                    "id": 1
                                },
                                {
                                    "parameter": {
                                        "name": "High Normal Cooling Airflow",
                                        "format": "uint16",
                                        "pid": 44,
                                        "enabled": true,
                                        "descriptor": "error",
                                        "unit": "CFM"
                                    },
                                    "id": 2
                                },
                                {
                                    "parameter": {
                                        "name": "Low Normal Cooling Airflow",
                                        "format": "uint16",
                                        "pid": 45,
                                        "enabled": true,
                                        "descriptor": "error",
                                        "unit": "CFM"
                                    },
                                    "id": 3
                                },
                                {
                                    "parameter": {
                                        "name": "Dehum Airflow Adjustment Adder",
                                        "format": "0p5",
                                        "pid": 24,
                                        "enabled": true,
                                        "descriptor": "error",
                                        "unit": "%"
                                    },
                                    "id": 4
                                }
                            ],

PeteRager avatar Apr 16 '24 11:04 PeteRager

The exception has been fixed in the API. When it encounters this issue, it will default the name to the equipment_type name which is this case is "Air Conditioner". The equipment parameters will get created, there values will be None.

To test with the updated API, edit the custom_components/lennoxs30/manifest.json and change this line from

  "requirements": ["lennoxs30api==0.2.14"],

to

  "requirements": ["lennoxs30api==0.2.15"],

Restart HA and it will pull the new API down automatically.

https://github.com/PeteRager/lennoxs30api/pull/80

PeteRager avatar Apr 17 '24 01:04 PeteRager

Updates on this item?

PeteRager avatar May 03 '24 10:05 PeteRager

The exception is resolved with the API change, thank you. I have rebooted the indoor, outdoor and thermostat units but I'm still not getting good data.

I have time this weekend and will try a full power down again (have to climb into the attic so it's a bit of a pain)

gdoerr avatar May 03 '24 19:05 gdoerr

Thanks for the update. You may be able to toss the breakers. Mine has a 30amp for outdoor unit and a 20 for the air handler.

PeteRager avatar May 03 '24 20:05 PeteRager

Released in 2024.6.0

PeteRager avatar Jun 06 '24 15:06 PeteRager