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

Cannot add integration, won't start #75

Open
mrworf opened this issue Jan 24, 2025 · 1 comment
Open

Cannot add integration, won't start #75

mrworf opened this issue Jan 24, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mrworf
Copy link

mrworf commented Jan 24, 2025

Version

0.9.6

Home Assistant Version

Core 2025.1.3, Supervisor 2024.12.3, Operating System 14.1, Frontend 20250109.0

What is the issue?

Created a Daikin One account and added three wall mounted minisplits. I'm able to control them from the app.

Proceeded to add the integration from HACS (by adding custom repo) and restarted HA.

Then I set up the integration and provided the same credentials as in the mobile application, however this fails to work. The integration will not start and I get an saying that a key is missing (ctSystemCapHeat).

Diagnostics

No such option is available since it cannot initialize

Relevant log output

Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 8:04:31 PM (3 occurrences)
Last logged: 8:06:48 PM

Error setting up entry Daikin One for daikinone
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikinone/__init__.py", line 49, in async_setup_entry
    await data.update()
  File "/config/custom_components/daikinone/__init__.py", line 28, in update
    await self._update(no_throttle=no_throttle)  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/daikinone/__init__.py", line 37, in _update
    await self.daikin.update()
  File "/config/custom_components/daikinone/daikinone.py", line 246, in update
    await self.__refresh_thermostats()
  File "/config/custom_components/daikinone/daikinone.py", line 307, in __refresh_thermostats
    self.__thermostats = {device.id: self.__map_thermostat(device) for device in devices}
                                     ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  File "/config/custom_components/daikinone/daikinone.py", line 313, in __map_thermostat
    if payload.data["ctSystemCapHeat"]:
       ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'ctSystemCapHeat'
@mrworf mrworf added the bug Something isn't working label Jan 24, 2025
@mrworf
Copy link
Author

mrworf commented Jan 24, 2025

Well, I think I figured out the issue, I have a multi-headunit system and the data structures provided by the API are much different.

I made some changes to the calls here to ensure it wouldn't crash when keys were missing and presto, I'm able to get some details on what I get from daikin's backend:

  "data": {
    "raw": [
      {
        "id": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "locationId": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "name": "Master Bathroom",
        "model": "DENEB",
        "brand": "DB",
        "firmware": "3_2_0",
        "online": true,
        "data": {
          "adptGen": 4,
          "adptSWversion": "3_2_0",
          "adptSWrevision": "e3dff9fe",
          "adptRegion": "us",
          "adptMACaddress": "XXXXXXXXXXXXXX",
          "adptSSID": "DaikinAP04185",
          "adptEchonetVersion": "2.20",
          "adpEdgeID": "0000000010877433",
          "adptIntPowerSupport": true,
          "adptIntPowerHeatAndCoolSupport": false,
          "adptScheduleTimerSupport": true,
          "adptPatrolSupport": false,
          "adptDemandSupport": false,
          "adptAPIversion": "2_1",
          "adptTimeZoneDiff": -480,
          "adptDST": true,
          "adptTimeZone": 201,
          "adptDeviceName": "Master Bathroom",
          "adptIcon": 0,
          "adptInstallLocation": 0,
          "adptLEDsetting": true,
          "adptHolidaySetting": false,
          "adptGroupPermission": false,
          "adptGroupName": "",
          "adpMethod": "polling",
          "adptDGCprotocolVer": "03.000",
          "adptSupportedEquipment": "RA",
          "adptNumIDUconnected": 1,
          "adptNumODUconnected": 1,
          "adptNumRemoteControls": 0,
          "adptCommError": 0,
          "adptMultiSetting": true,
          "adptDestinationSSID": "XXXXXXXXXXXX",
          "adptSignalStrength": -48,
          "adptSecurityFormat": "WPA2",
          "adptErrLastConnectTime": "----/--/-- --:--:--",
          "adptErrLastDisconnectTime": "----/--/-- --:--:--",
          "adptErrNumWLANboots": 5,
          "adptErrNumWLANrebootPing": 0,
          "adptErrNumWLANrebootSync": 0,
          "adptErrFWupdateLog0": "----/--/-- --:--:--,--_--_--,--_--_--,0",
          "adptErrFWupdateLog1": "----/--/-- --:--:--,--_--_--,--_--_--,0",
          "adptErrFWupdateLog2": "----/--/-- --:--:--,--_--_--,--_--_--,0",
          "adptErrFWupdateSuccessCount": 0,
          "adptErrFWupdateFailCount": 0,
          "adptErrFWupdateTimeoutFailCount": 0,
          "adptErrFWupdateURLfailCount": 0,
          "adptErrFWupdateDownloadFailCount": 0,
          "adptErrFWupdateAuthFailCount": 0,
          "adptErrFWupdateWriteFailCount": 0,
          "adptErrFWupdateOpCheckFailCount": 0,
          "adptFWtype": "wlan_adp_gen4",
          "adptAutoUpdateEnable": true,
          "schedPerDay": 6,
          "schedEnabled": false,
          "iduCapacity": 2,
          "iduCoolHeat": 0,
          "iduProductCode": 26,
          "iduProductionBaseCode": "00",
          "iduPairMultiSetting": true,
          "iduEEPROMID": "177C",
          "iduRegionModel": 1,
          "iduMACAddress": "XXXXXXXXXXXXX",
          "iduTypeCode": 58,
          "iduBaseInternalCode": "0",
          "iduPublicationDeviceCode": "0",
          "iduManufactureDate": "20000000",
          "iduPCBSerialNumber": "000000000000",
          "iduPowerFrequency": 1,
          "iduEquipStateDuringEquipError": 0,
          "iduEquipErrorResetType": 0,
          "iduErrorCode": "00-00",
          "iduErrorLevel": 0,
          "iduEquipStateDuringError": 0,
          "iduErrorResetType": 0,
          "iduOnOff": false,
          "iduRoomTemp": 20.5,
          "iduSuctionTempRawValue": 20.5,
          "iduSuctionTemp": 20.5,
          "iduSoftwareID": "#\u00009\u0001",
          "iduFanMotorCurrentRotationSpeed": 0,
          "iduFanMotorTargetRotationSpeed": 0,
          "iduHeatExchangerIntermediateTemp": 30,
          "iduHeatPumpCycleMode": 2,
          "iduThermoState": false,
          "iduTargetTemp": 18,
          "iduTargetHumidity": 50,
          "iduWindNiceOperation": false,
          "iduEconoModeSetting": false,
          "iduMainUnitSWOperationCount": 0,
          "iduAutoModeRelAbsTempSetting": true,
          "iduAmenityPair": false,
          "iduDeltaDCommand": 0,
          "iduEachModePowerUseSupport": false,
          "iduIndoorVoiceOperation": 0,
          "iduDeltaH": 4,
          "iduErrorNotification": false,
          "iduResetDetection": false,
          "iduOnOffOperationSource": 0,
          "iduOduComErrorRetryCount": 0,
          "iduOnTimerRemainingTime": 0,
          "iduOffTimerRemainingTime": 0,
          "iduEdgeSerialNumber": "XXXXXXXXXXXXXXXXXXXX",
          "iduDryKeepSetting": false,
          "iduOperatingMode": 2,
          "iduCoolSetpoint": 18,
          "iduHeatSetpoint": 25,
          "iduCoolAirDirectionUpDown": 0,
          "iduHeatAirDirectionUpDown": 0,
          "iduCoolFanSpeed": 10,
          "iduHeatFanSpeed": 10,
          "iduAutoSetpoint": 25,
          "iduAutoAirDirectionUpDown": 0,
          "iduDryAirDirectionUpDown": 0,
          "iduFanAirDirectionUpDown": 0,
          "iduAutoFanSpeed": 10,
          "iduDryFanSpeed": 10,
          "iduFanModeFanSpeed": 10,
          "iduAppPowerConsumptionDisplay": true,
          "iduAppInfoNotificationSupport": false,
          "iduAppSmartphoneTimerLEDSupport": false,
          "iduAppErrorDetail0": 0,
          "iduAppErrorDetail1": 0,
          "iduAppErrorDetail2": 0,
          "iduAppErrorDetail3": 0,
          "iduAppErrorDetail4": 0,
          "iduAppErrorDetail5": 0,
          "iduAppErrorDetail6": 0,
          "iduControlModeRefusalState": true,
          "iduControlPriorityCode": 0,
          "iduControlAdapterSettingOpCount": 2,
          "iduControlNtypeWirelessRCOpHistory": "0000000000",
          "iduControlNtypeWirelessRCOpCount": 7,
          "iduControlWirelessRCOpCount": 9,
          "iduControlDryTypeDisplaySetting": 0,
          "oduConnectedIduUnitNumber": 3,
          "oduCoolRatedPower50Hz": 0,
          "oduCoolRatedPower60Hz": 0,
          "oduHeatRatedPower50Hz": 0,
          "oduHeatRatedPower60Hz": 0,
          "oduConsumedPower": 1040,
          "oduConsumedCurrent": 4.7,
          "oduIntPowerConsumption": 0.4,
          "oduEquipStateDuringEquipError": 0,
          "oduEquipErrorResetType": 0,
          "oduCompOnOff": false,
          "oduCompCurrentFrequency": 32,
          "oduCompDischargeTemp": 36,
          "oduCompTargetDischargeTemp": 62,
          "oduEEVCurrentPulse": 100,
          "oduFanMotorCurrentSpeed": 780,
          "oduHeatExchangerIntPipeTemp": 3,
          "oduOutdoorTemp": 9,
          "oduOperatingMode": 1,
          "oduDefrost": false,
          "oduPowerfulOperationRequest": false,
          "oduDehumMode": 0,
          "oduEnergizationRequest": false
        }
      },

Needless to say, it's a whole lot more than the Open API spec :) but it also means it's going to be a pain to get this running properly.

For example, issuing any commands to this system does not work.

I also signed up and set up a quick hack to use Daikin's official API (https://www.daikinone.com/openapi/documentation/index.html) via curl and when I get the list of devices, it's an empty array. If I use the knowledge from this integration and provide the ID, I get "NotAuthorizedError" back which is a bit odd.

Nothing in their documentation indicates that my system should be excluded from their API, but who knows.

For the record, it's a CTXV07AVJU9 (I also have the FTXV09AVJU9 and FTXV12AVJU9, but they're all the same, just different BTUs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant