Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make diagnostics dump more resilient #73

Closed
3 tasks done
torbennehmer opened this issue Oct 24, 2023 · 3 comments
Closed
3 tasks done

Make diagnostics dump more resilient #73

torbennehmer opened this issue Oct 24, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@torbennehmer
Copy link
Owner

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

The dump should be more resilient when config keys are missing etc. It should not crash instead do its best when anonymizing and adding data. Also, catch exceptions where possible.

Describe the solution you'd like

.

Describe alternatives you've considered

.

Additional context

.

Diagnostics dump

.

@torbennehmer torbennehmer added the enhancement New feature or request label Oct 24, 2023
@torbennehmer torbennehmer self-assigned this Oct 24, 2023
@torbennehmer torbennehmer changed the title Make diagnostics dump mo resilient Make diagnostics dump more resilient Oct 24, 2023
@torbennehmer
Copy link
Owner Author

@eikowagenknecht I've pulled out the troubles with the diagnostic dumping to this task, so that we can stop cluttering #45 with it. If you see any more problems in this regard, please let me know on this bug.
Can you please test your system against 3.4.2 (just released) if it works now?

@eikowagenknecht
Copy link

This finally worked! Seems like all relevant places are also redacted :-)

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.10.5",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.5",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.10.1",
    "host_os": "Home Assistant OS 11.0",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "opensprinkler": {
      "version": "1.2.3",
      "requirements": [
        "pyopensprinkler==0.7.8"
      ]
    },
    "spook_inverse": {
      "version": "1.3.1",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "circadian_lighting": {
      "version": "2.1.4",
      "requirements": []
    },
    "spook": {
      "version": "1.3.1",
      "requirements": []
    },
    "goecharger": {
      "version": "0.25.3",
      "requirements": [
        "goecharger==0.0.16"
      ]
    },
    "gardena_smart_system": {
      "version": "1.0.0",
      "requirements": [
        "py-smart-gardena==1.3.7"
      ]
    },
    "tesla_custom": {
      "version": "3.18.0",
      "requirements": [
        "teslajsonpy==3.9.5"
      ]
    },
    "eufy_security": {
      "version": "7.7.1",
      "requirements": [
        "websocket-client==1.4.2",
        "aiortsp==1.3.7"
      ]
    },
    "e3dc_rscp": {
      "version": "v3.4.2",
      "requirements": [
        "pye3dc==0.8.2"
      ]
    },
    "homematicip_local": {
      "version": "1.47.0",
      "requirements": [
        "hahomematic==2023.10.12"
      ]
    },
    "miele": {
      "version": "v2021.10.12",
      "requirements": [
        "requests_oauthlib>=1.3.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "e3dc_rscp",
    "name": "E3DC Remote Storage Control Protocol (Git)",
    "codeowners": [
      "@torbennehmer"
    ],
    "config_flow": true,
    "dependencies": [],
    "documentation": "https://github.com/torbennehmer/hacs-e3dc",
    "homekit": {},
    "integration_type": "device",
    "iot_class": "cloud_polling",
    "issue_tracker": "https://github.com/torbennehmer/hacs-e3dc/issues",
    "requirements": [
      "pye3dc==0.8.2"
    ],
    "ssdp": [],
    "version": "v3.4.2",
    "zeroconf": [],
    "is_built_in": false
  },
  "data": {
    "current_data": {
      "system-derate-percent": 100.0,
      "system-derate-power": 4730.0,
      "system-additional-source-available": false,
      "system-battery-installed-capacity": 33,
      "system-battery-installed-peak": 4730,
      "system-ac-maxpower": 12000,
      "system-battery-charge-max": 12000,
      "system-battery-discharge-max": 12000,
      "system-mac": "6C:<redacted>",
      "model": "S10X",
      "system-battery-discharge-minimum-default": 65,
      "e3dc_timezone": "Europe/Berlin",
      "additional-production": 0,
      "autarky": 38.742027282714844,
      "battery-charge": 0,
      "battery-discharge": 276,
      "battery-netchange": -276,
      "grid-consumption": 769,
      "grid-netchange": 769,
      "grid-production": 0,
      "house-consumption": 1479,
      "selfconsumption": 99.99994659423828,
      "soc": 23,
      "solar-production": 434,
      "wallbox-consumption": 0,
      "pset-limit-charge": 12000,
      "pset-limit-discharge": 12000,
      "pset-limit-discharge-minimum": 65,
      "pset-limit-enabled": false,
      "pset-powersaving-enabled": true,
      "pset-weatherregulationenabled": true,
      "manual-charge-active": false,
      "manual-charge-energy": 1.0138977646411893,
      "db-day-autarky": 0.0,
      "db-day-battery-charge": 581.4375,
      "db-day-battery-discharge": 317.53125,
      "db-day-grid-consumption": 7078.25,
      "db-day-grid-production": 2.0234375,
      "db-day-house-consumption": 6583.25,
      "db-day-selfconsumption": 100.0,
      "db-day-solar-production": 8.0,
      "db-day-startts": 1698192000
    },
    "get_system_info": {
      "deratePercent": 100.0,
      "deratePower": 4730.0,
      "externalSourceAvailable": 0,
      "installedBatteryCapacity": 33,
      "installedPeakPower": 4730,
      "maxAcPower": 12000,
      "macAddress": "6C:<redacted>",
      "maxBatChargePower": 12000,
      "maxBatDischargePower": 12000,
      "model": "S10X",
      "release": "H20_2023_024",
      "serial": "812<redacted>"
    },
    "get_system_status": {
      "dcdcAlive": true,
      "powerMeterAlive": true,
      "batteryModuleAlive": true,
      "pvModuleAlive": true,
      "pvInverterInited": true,
      "serverConnectionAlive": true,
      "pvDerated": false,
      "emsAlive": true,
      "acModeBlocked": false,
      "sysConfChecked": false,
      "emergencyPowerStarted": false,
      "emergencyPowerOverride": false,
      "wallBoxAlive": false,
      "powerSaveEnabled": false,
      "chargeIdlePeriodActive": false,
      "dischargeIdlePeriodActive": false,
      "waitForWeatherBreakthrough": false,
      "rescueBatteryEnabled": false,
      "emergencyReserveReached": false,
      "socSyncRequested": false
    },
    "poll": {
      "autarky": 35.90237808227539,
      "consumption": {
        "battery": -255,
        "house": 1466,
        "wallbox": 0
      },
      "production": {
        "solar": 398,
        "add": 0,
        "grid": 813
      },
      "selfConsumption": 99.99994659423828,
      "stateOfCharge": 23,
      "time": "2023-10-25T06:48:26.000365+00:00"
    },
    "switches": [],
    "get_pvis_data": [
      {
        "acMaxApparentPower": 4000.0,
        "cosPhi": {
          "active": null,
          "value": null,
          "excited": null
        },
        "deviceState": {
          "connected": true,
          "working": true,
          "inService": false
        },
        "frequency": {
          "under": null,
          "over": null
        },
        "index": 0,
        "lastError": "11 0x0",
        "maxPhaseCount": 3,
        "maxStringCount": 2,
        "onGrid": true,
        "phases": {
          "0": {
            "power": 432.0,
            "voltage": 228.8000030517578,
            "current": 1.9700000286102295,
            "apparentPower": 442.0,
            "reactivePower": 0.0,
            "energyAll": 554429.0,
            "energyGridConsumption": 17570.0
          },
          "1": {
            "power": 1.0,
            "voltage": 227.8000030517578,
            "current": 0.23999999463558197,
            "apparentPower": 57.0,
            "reactivePower": 0.0,
            "energyAll": 159458.0,
            "energyGridConsumption": 17506.0
          },
          "2": {
            "power": -1.0,
            "voltage": 228.8000030517578,
            "current": 0.0,
            "apparentPower": 0.0,
            "reactivePower": 0.0,
            "energyAll": 161147.0,
            "energyGridConsumption": 17436.0
          }
        },
        "powerMode": 1,
        "serialNumber": "E3E<redacted>",
        "state": "0xb32315",
        "strings": {
          "0": {
            "power": 197.0,
            "voltage": 309.0,
            "current": 0.6399999856948853,
            "energyAll": 491662.0
          },
          "1": {
            "power": 201.0,
            "voltage": 302.0,
            "current": 0.6700000166893005,
            "energyAll": 484896.0
          }
        },
        "systemMode": 2,
        "temperature": {
          "max": 130.0,
          "min": -30.0,
          "values": [
            23.0,
            20.299999237060547,
            20.5,
            23.100000381469727
          ]
        },
        "type": 3,
        "version": " MAIN HW07 2.058",
        "voltageMonitoring": {
          "thresholdTop": null,
          "thresholdBottom": null,
          "slopeUp": null,
          "slopeDown": null
        }
      }
    ],
    "get_powermeters_data": [
      {
        "activePhases": "111",
        "energy": {
          "L1": -0.07,
          "L2": 0.26,
          "L3": 0.21
        },
        "index": 0,
        "maxPhasePower": 24000.0,
        "mode": 1,
        "power": {
          "L1": 156.0,
          "L2": 581.0,
          "L3": 87.0
        },
        "type": 1,
        "voltage": {
          "L1": 228.82000732421875,
          "L2": 228.07000732421875,
          "L3": 230.44000244140625
        }
      }
    ],
    "get_batteries_data": [
      {
        "asoc": 100.0,
        "chargeCycles": 36,
        "current": -0.5330957174301147,
        "dcbCount": 4,
        "dcbs": {
          "0": {
            "current": null,
            "currentAvg30s": -0.6102351546287537,
            "cycleCount": null,
            "designCapacity": null,
            "designVoltage": null,
            "deviceName": null,
            "endOfDischarge": null,
            "error": null,
            "fullChargeCapacity": null,
            "fwVersion": null,
            "manufactureDate": null,
            "manufactureName": null,
            "maxChargeCurrent": null,
            "maxChargeTemperature": null,
            "maxChargeVoltage": null,
            "maxDischargeCurrent": null,
            "minChargeTemperature": null,
            "parallelCellCount": null,
            "sensorCount": 0,
            "seriesCellCount": 0,
            "pcbVersion": null,
            "protocolVersion": null,
            "remainingCapacity": null,
            "serialCode": null,
            "serialNo": null,
            "soc": null,
            "soh": null,
            "status": null,
            "temperatures": [],
            "voltage": null,
            "voltageAvg30s": 392.800048828125,
            "voltages": [],
            "warning": null
          }
        },
        "designCapacity": 33.25,
        "deviceConnected": true,
        "deviceInService": false,
        "deviceName": "AtlSerialBattery1006_0_0",
        "deviceWorking": true,
        "eodVoltage": 336.0,
        "errorCode": 0,
        "fcc": 31.200000762939453,
        "index": 0,
        "maxBatVoltage": 432.0,
        "maxChargeCurrent": 32.0,
        "maxDischargeCurrent": 32.0,
        "maxDcbCellTemp": 23.200000762939453,
        "minDcbCellTemp": 19.200000762939453,
        "moduleVoltage": 392.8000183105469,
        "rc": 9.199999809265137,
        "readyForShutdown": true,
        "rsoc": 23.75098991394043,
        "rsocReal": 23.750988006591797,
        "statusCode": 33554435,
        "terminalVoltage": 392.8000183105469,
        "totalUseTime": 0,
        "totalDischargeTime": 0,
        "trainingMode": 0,
        "usuableCapacity": 28.856252670288086,
        "usuableRemainingCapacity": 6.853645324707031
      }
    ],
    "get_idle_periods": null,
    "get_power_settings": {
      "dischargeStartPower": 65,
      "maxChargePower": 12000,
      "maxDischargePower": 12000,
      "powerLimitsUsed": false,
      "powerSaveEnabled": true,
      "weatherForecastMode": 1,
      "weatherRegulatedChargeEnabled": true
    },
    "EMS_REQ_GET_MANUAL_CHARGE": [
      [
        "EMS_MANUAL_CHARGE_ACTIVE",
        "Bool",
        false
      ],
      [
        "EMS_MANUAL_CHARGE_START_COUNTER",
        "Int64",
        1697144299564
      ],
      [
        "EMS_MANUAL_CHARGE_ENERGY_COUNTER",
        "Double64",
        0.2777802094907368
      ],
      [
        "EMS_MANUAL_CHARGE_LASTSTART",
        "Timestamp",
        1697144299.0
      ]
    ],
    "DB_REQ_HISTORY_DATA_DAY": [
      "DB_HISTORY_DATA_DAY",
      "Container",
      [
        [
          "DB_SUM_CONTAINER",
          "Container",
          [
            [
              "DB_GRAPH_INDEX",
              "Float32",
              -1.0
            ],
            [
              "DB_BAT_POWER_IN",
              "Float32",
              581.4375
            ],
            [
              "DB_BAT_POWER_OUT",
              "Float32",
              317.53125
            ],
            [
              "DB_DC_POWER",
              "Float32",
              8.0
            ],
            [
              "DB_GRID_POWER_IN",
              "Float32",
              2.0234375
            ],
            [
              "DB_GRID_POWER_OUT",
              "Float32",
              7078.25
            ],
            [
              "DB_CONSUMPTION",
              "Float32",
              6583.25
            ],
            [
              "DB_PM_0_POWER",
              "Float32",
              0.0
            ],
            [
              "DB_PM_1_POWER",
              "Float32",
              0.0
            ],
            [
              "DB_BAT_CHARGE_LEVEL",
              "Float32",
              24.097999572753906
            ],
            [
              "DB_BAT_CYCLE_COUNT",
              "Int32",
              0
            ],
            [
              "DB_CONSUMED_PRODUCTION",
              "Float32",
              100.0
            ],
            [
              "DB_AUTARKY",
              "Float32",
              0.0
            ]
          ]
        ],
        [
          "DB_VALUE_CONTAINER",
          "Container",
          [
            [
              "DB_GRAPH_INDEX",
              "Float32",
              0.3541666269302368
            ],
            [
              "DB_BAT_POWER_IN",
              "Float32",
              68.40441131591797
            ],
            [
              "DB_BAT_POWER_OUT",
              "Float32",
              37.35661697387695
            ],
            [
              "DB_DC_POWER",
              "Float32",
              0.9411764740943909
            ],
            [
              "DB_GRID_POWER_IN",
              "Float32",
              0.23805147409439087
            ],
            [
              "DB_GRID_POWER_OUT",
              "Float32",
              832.7352905273438
            ],
            [
              "DB_CONSUMPTION",
              "Float32",
              774.5
            ],
            [
              "DB_PM_0_POWER",
              "Float32",
              0.0
            ],
            [
              "DB_PM_1_POWER",
              "Float32",
              0.0
            ],
            [
              "DB_BAT_CHARGE_LEVEL",
              "Float32",
              24.097999572753906
            ],
            [
              "DB_BAT_CYCLE_COUNT",
              "Int32",
              0
            ],
            [
              "DB_CONSUMED_PRODUCTION",
              "Float32",
              100.0
            ],
            [
              "DB_AUTARKY",
              "Float32",
              0.0
            ]
          ]
        ]
      ]
    ]
  }
}

@torbennehmer
Copy link
Owner Author

Thanks for testing, I'll close this now. Reopen this or a new one if you encounter any additional problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants