JeroenVdb / homebridge-daikin-cloud

This Homebrige plugin connects to the Daikin Cloud and loads all your devices to be controled via Homebridge and Homekit.
https://www.npmjs.com/package/homebridge-daikin-cloud
Apache License 2.0
38 stars 11 forks source link

Failed to create HeaterCooler accessory from device #81

Open v1fckoeln opened 3 weeks ago

v1fckoeln commented 3 weeks ago

Describe The Bug: Failed to create HeaterCooler accessory from device ( Daikin ALTHERMA Heatpump with hot water tank) WHILE 3 additional Daikin air conditioning units are added well. To Reproduce:

Restarting the daikon cloud plugin

Expected behavior:

Showing the indoor, outdoor and hot-water tank-temperature Logs:


Show the Homebridge logs here, sensitive information is removed. I'm mainly interested in the part between 
[homebridge-daikin-cloud] [Platform] Failed to create HeaterCooler accessory from device, only HeaterCooler is supported at the moment: Cannot read properties of null (reading 'stepValue'), device JSON: {"_events":{},"_eventsCount":1,"desc":{"_id":"ef81d359-4501-431f-9479-d71594658b51","deviceModel":"Altherma","type":"heating-wlan","isCloudConnectionUp":{"settable":false,"value":true},"managementPoints":[{"embeddedId":"gateway","managementPointType":"gateway","managementPointCategory":"secondary","firmwareVersion":{"settable":false,"value":"3.3.0","maxLength":8},"ipAddress":{"settable":false,"value":"192.168.0.90“,“maxLength":15},"isFirmwareUpdateSupported":{"settable":false,"requiresReboot":false,"value":true},"macAddress":{"settable":false,"value":"90:e8:68:bc:bf:d9","maxLength":17},"modelInfo":{"settable":false,"value":"BRP069A78","maxLength":9},"name":{"settable":false,"requiresReboot":false,"value":"Gateway","maxLength":63}},{"embeddedId":"climateControlMainZone","managementPointType":"climateControl","managementPointCategory":"primary","managementPointSubType":"mainZone","consumptionData":{"settable":false,"requiresReboot":false,"ref":"#consumptionData","value":{"electrical":{"heating":{"d":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null,null],"w":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],"m":[null,null,null,null,null,0,0,0,0,95,278,400,653,270,242,175,28,0,0,0,null,null,null,null]},"cooling":{"d":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null,null],"w":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],"m":[null,null,null,null,null,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null]},"unit":"kWh"}}},"controlMode":{"settable":false,"requiresReboot":false,"value":"leavingWaterTemperature","values":["leavingWaterTemperature","externalRoomTemperature","roomTemperature"]},"errorCode":{"settable":false,"requiresReboot":false,"value":"","maxLength":16},"holidayMode":{"settable":true,"requiresReboot":false,"ref":"#holidayMode","value":{"enabled":false,"startDate":"2017-01-01","endDate":"2017-01-01"}},"isHolidayModeActive":{"settable":false,"requiresReboot":false,"value":false},"isInEmergencyState":{"settable":false,"requiresReboot":false,"value":false},"isInErrorState":{"settable":false,"requiresReboot":false,"value":false},"isInInstallerState":{"settable":false,"requiresReboot":false,"value":false},"isInWarningState":{"settable":false,"requiresReboot":false,"value":false},"name":{"settable":false,"requiresReboot":false,"value":"Heizung","maxLength":63},"onOffMode":{"settable":true,"requiresReboot":false,"value":"off","values":["off","on"]},"operationMode":{"settable":true,"requiresReboot":false,"value":"heating","values":["heating","cooling","auto"]},"sensoryData":{"settable":false,"ref":"#sensoryData","value":{"leavingWaterTemperature":{"settable":false,"requiresReboot":false,"value":34,"maxValue":127,"minValue":-127,"stepValue":1},"outdoorTemperature":{"settable":false,"requiresReboot":false,"value":23,"maxValue":127,"minValue":-127,"stepValue":1},"roomTemperature":{"settable":false,"requiresReboot":false,"value":27.5,"maxValue":127,"minValue":-127,"stepValue":0.1}}},"setpointMode":{"settable":false,"requiresReboot":true,"value":"weatherDependentHeatingFixedCooling","values":["fixed","weatherDependentHeatingFixedCooling","weatherDependent"]},"temperatureControl":{"settable":true,"ref":"#temperatureControl","value":{"operationModes":{"auto":{"setpoints":{"leavingWaterOffset":{"settable":true,"requiresReboot":false,"value":0,"maxValue":10,"minValue":-10,"stepValue":1}}},"cooling":{"setpoints":{"leavingWaterTemperature":{"settable":false,"requiresReboot":false,"value":20,"maxValue":22,"minValue":18,"stepValue":1}}},"heating":{"setpoints":{"leavingWaterOffset":{"settable":true,"requiresReboot":false,"value":0,"maxValue":10,"minValue":-10,"stepValue":1}}}}}}},{"embeddedId":"domesticHotWaterTank","managementPointType":"domesticHotWaterTank","managementPointCategory":"primary","consumptionData":{"settable":false,"requiresReboot":false,"ref":"#consumptionData","value":{"electrical":{"heating":{"d":[0,0,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,null,null,null,null,null],"w":[4,3,2,4,2,2,4,6,2,2,3,4,3,2],"m":[null,null,null,null,null,94,74,82,82,114,157,189,228,173,169,148,126,134,103,54,null,null,null,null]},"unit":"kWh"}}},"errorCode":{"settable":false,"requiresReboot":false,"value":"","maxLength":16},"heatupMode":{"settable":false,"requiresReboot":true,"value":"reheatOnly","values":["reheatOnly","reheatSchedule","scheduleOnly"]},"isHolidayModeActive":{"settable":false,"requiresReboot":false,"value":false},"isInEmergencyState":{"settable":false,"requiresReboot":false,"value":false},"isInErrorState":{"settable":false,"requiresReboot":false,"value":false},"isInInstallerState":{"settable":false,"requiresReboot":false,"value":false},"isInWarningState":{"settable":false,"requiresReboot":false,"value":false},"isPowerfulModeActive":{"settable":false,"requiresReboot":false,"value":false},"name":{"settable":false,"requiresReboot":false,"value":"","maxLength":63},"onOffMode":{"settable":true,"requiresReboot":false,"value":"on","values":["off","on"]},"operationMode":{"settable":false,"value":"heating","values":["heating"]},"powerfulMode":{"settable":true,"requiresReboot":false,"value":"off","values":["off","on"]},"sensoryData":{"settable":false,"ref":"#sensoryData","value":{"tankTemperature":{"settable":false,"requiresReboot":false,"value":42,"maxValue":127,"minValue":-127,"stepValue":1}}},"setpointMode":{"settable":false,"requiresReboot":false,"value":"fixed","values":["fixed","weatherDependent"]},"temperatureControl":{"settable":true,"ref":"#temperatureControl","value":{"operationModes":{"heating":{"setpoints":{"domesticHotWaterTemperature":{"settable":true,"requiresReboot":false,"value":46,"maxValue":60,"minValue":30,"stepValue":1}}}}}}},{"embeddedId":"indoorUnitHydro","managementPointType":"indoorUnitHydro","managementPointCategory":"secondary","modelInfo":{"settable":false,"requiresReboot":false,"value":"EHVX08S18EJ6V","maxLength":16},"name":{"settable":false,"requiresReboot":false,"value":"Indoor Hydro Unit","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"0222","maxLength":16}},{"embeddedId":"outdoorUnit","managementPointType":"outdoorUnit","managementPointCategory":"secondary","name":{"settable":false,"requiresReboot":false,"value":"Outdoor Unit","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"FFFF","maxLength":16}},{"embeddedId":"userInterface","managementPointType":"userInterface","managementPointCategory":"secondary","firmwareUpdate":{"settable":false,"ref":"#firmwareUpdate","value":{"id":"cac72760-a172-4216-a5d5-cbb91822ca8d","description":"MMI2 Firmware 7.5.0 for BML CD2 (E series)","version":"7.5.0","type":"optional"}},"modelInfo":{"settable":false,"requiresReboot":false,"value":"EHVX08S18EJ6V","maxLength":16},"name":{"settable":false,"requiresReboot":false,"value":"User Interface","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"7.1.0","maxLength":16}}],"embeddedId":"bbfb5284-036a-44ff-96f8-9cde288e1beb","timestamp":"2024-08-18T13:31:41.225Z","id":"ef81d359-4501-431f-9479-d71594658b51"},"managementPoints":{"gateway":{"firmwareVersion":{"settable":false,"value":"3.3.0","maxLength":8},"ipAddress":{"settable":false,"value":"192.168.0.90","maxLength":15},"isFirmwareUpdateSupported":{"settable":false,"requiresReboot":false,"value":true},"macAddress":{"settable":false,"value":"90:e8:68:bc:bf:d9","maxLength":17},"modelInfo":{"settable":false,"value":"BRP069A78","maxLength":9},"name":{"settable":false,"requiresReboot":false,"value":"Gateway","maxLength":63}},"climateControlMainZone":{"consumptionData":{"/electrical":{"heating":{"d":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null,null],"w":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],"m":[null,null,null,null,null,0,0,0,0,95,278,400,653,270,242,175,28,0,0,0,null,null,null,null]},"cooling":{"d":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null,null],"w":[0,0,0,0,0,0,0,0,0,0,0,0,0,0],"m":[null,null,null,null,null,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,null,null,null,null]},"unit":"kWh"}},"controlMode":{"settable":false,"requiresReboot":false,"value":"leavingWaterTemperature","values":["leavingWaterTemperature","externalRoomTemperature","roomTemperature"]},"errorCode":{"settable":false,"requiresReboot":false,"value":"","maxLength":16},"holidayMode":{},"isHolidayModeActive":{"settable":false,"requiresReboot":false,"value":false},"isInEmergencyState":{"settable":false,"requiresReboot":false,"value":false},"isInErrorState":{"settable":false,"requiresReboot":false,"value":false},"isInInstallerState":{"settable":false,"requiresReboot":false,"value":false},"isInWarningState":{"settable":false,"requiresReboot":false,"value":false},"name":{"settable":false,"requiresReboot":false,"value":"Heizung","maxLength":63},"onOffMode":{"settable":true,"requiresReboot":false,"value":"off","values":["off","on"]},"operationMode":{"settable":true,"requiresReboot":false,"value":"heating","values":["heating","cooling","auto"]},"sensoryData":{"/leavingWaterTemperature":{"settable":false,"requiresReboot":false,"value":34,"maxValue":127,"minValue":-127,"stepValue":1},"/outdoorTemperature":{"settable":false,"requiresReboot":false,"value":23,"maxValue":127,"minValue":-127,"stepValue":1},"/roomTemperature":{"settable":false,"requiresReboot":false,"value":27.5,"maxValue":127,"minValue":-127,"stepValue":0.1}},"setpointMode":{"settable":false,"requiresReboot":true,"value":"weatherDependentHeatingFixedCooling","values":["fixed","weatherDependentHeatingFixedCooling","weatherDependent"]},"temperatureControl":{"/operationModes/auto/setpoints/leavingWaterOffset":{"settable":true,"requiresReboot":false,"value":0,"maxValue":10,"minValue":-10,"stepValue":1},"/operationModes/cooling/setpoints/leavingWaterTemperature":{"settable":false,"requiresReboot":false,"value":20,"maxValue":22,"minValue":18,"stepValue":1},"/operationModes/heating/setpoints/leavingWaterOffset":{"settable":true,"requiresReboot":false,"value":0,"maxValue":10,"minValue":-10,"stepValue":1}}},"domesticHotWaterTank":{"consumptionData":{"/electrical":{"heating":{"d":[0,0,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,null,null,null,null,null],"w":[4,3,2,4,2,2,4,6,2,2,3,4,3,2],"m":[null,null,null,null,null,94,74,82,82,114,157,189,228,173,169,148,126,134,103,54,null,null,null,null]},"unit":"kWh"}},"errorCode":{"settable":false,"requiresReboot":false,"value":"","maxLength":16},"heatupMode":{"settable":false,"requiresReboot":true,"value":"reheatOnly","values":["reheatOnly","reheatSchedule","scheduleOnly"]},"isHolidayModeActive":{"settable":false,"requiresReboot":false,"value":false},"isInEmergencyState":{"settable":false,"requiresReboot":false,"value":false},"isInErrorState":{"settable":false,"requiresReboot":false,"value":false},"isInInstallerState":{"settable":false,"requiresReboot":false,"value":false},"isInWarningState":{"settable":false,"requiresReboot":false,"value":false},"isPowerfulModeActive":{"settable":false,"requiresReboot":false,"value":false},"name":{"settable":false,"requiresReboot":false,"value":"","maxLength":63},"onOffMode":{"settable":true,"requiresReboot":false,"value":"on","values":["off","on"]},"operationMode":{"settable":false,"value":"heating","values":["heating"]},"powerfulMode":{"settable":true,"requiresReboot":false,"value":"off","values":["off","on"]},"sensoryData":{"/tankTemperature":{"settable":false,"requiresReboot":false,"value":42,"maxValue":127,"minValue":-127,"stepValue":1}},"setpointMode":{"settable":false,"requiresReboot":false,"value":"fixed","values":["fixed","weatherDependent"]},"temperatureControl":{"/operationModes/heating/setpoints/domesticHotWaterTemperature":{"settable":true,"requiresReboot":false,"value":46,"maxValue":60,"minValue":30,"stepValue":1}}},"indoorUnitHydro":{"modelInfo":{"settable":false,"requiresReboot":false,"value":"EHVX08S18EJ6V","maxLength":16},"name":{"settable":false,"requiresReboot":false,"value":"Indoor Hydro Unit","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"0222","maxLength":16}},"outdoorUnit":{"name":{"settable":false,"requiresReboot":false,"value":"Outdoor Unit","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"FFFF","maxLength":16}},"userInterface":{"firmwareUpdate":{},"modelInfo":{"settable":false,"requiresReboot":false,"value":"EHVX08S18EJ6V","maxLength":16},"name":{"settable":false,"requiresReboot":false,"value":"User Interface","maxLength":63},"softwareVersion":{"settable":false,"requiresReboot":false,"value":"7.1.0","maxLength":16}}}}
[18.8.2024, 15:34:08] [homebridge-daikin-cloud] --------------- End Daikin info for debugging reasons ---------------

**Plugin Config:**

```json
Show your Homebridge config.json here, remove any sensitive information.
       {
            "clientId": „1234567891p1gTFirTJ53DBo",
            "clientSecret": „9999999999N00qvKmLSUhSjDQ30BJ8eSgi0SBJDYzTrMaqVXG4zw1zUG4xqeKvzGwpI-5crypmK5j4zcIheCuQ",
            "callbackServerExternalAddress": "192.168.0.250",
            "callbackServerPort": "8582",
            "oidcCallbackServerBindAddr": "0.0.0.0",
            "showExtraFeatures": true,
            "updateIntervalInMinutes": 15,
            "forceUpdateDelay": 60000,
            "_bridge": {
                "username": „EE:EE:EE:EE:EE:EE“,
                "port": 42920
            },
            "platform": "DaikinCloud"
        },

**Screenshots:**
<!-- If applicable, add screenshots to help explain your problem. -->

**Daikin Environment:**
Wlan-Adapter: BRP069A78
Indoor Device: EHVX08S18EJ6V
Outdoor-UNIT: ERGA08EAV3H
Console Software 7.1.0

* **Daikin model**:,<!-- BRP069C4x -->
* **Daikin firmware version**: <!-- 1_12_51 -->

**Homebridge Environment:**

* **Plugin Version**: v2.6.0-beta.3 (and earlier)
* **Homebridge Version**: <!-- homebridge -V --> 1.8.4
* **Node.js Version**: <!-- node -v --> v20.16.0
* **NPM Version**: <!-- npm -v --> 10.8.1
* **Operating System**: <!-- Raspbian / Ubuntu / Debian / Windows / macOS / Docker / hb-service -->
Debian GNU/Linux Bookworm (12)

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
JeroenVdb commented 3 weeks ago

Thanks, this if useful. I only have 2 specific Daikin AC’s so hard to make other devices work without actual device information.

I am now on holiday. If all goes well I will be able to fix this when I am back the last week of August.

jwillemsen commented 3 weeks ago

@JeroenVdb Maybe helpful, as part of the daikin_onecta HA integration I have several fixtures with daikin device data in various states, see https://github.com/jwillemsen/daikin_onecta/tree/master/tests/fixtures

JeroenVdb commented 3 weeks ago

@v1fckoeln is I understand correctly you can not set up a room temperature but only a "leavingWaterOffset". Is that correct?

JeroenVdb commented 3 weeks ago

I released homebridge-daikin-cloud@2.6.0-beta.4 that should fix the error @v1fckoeln.

Could you help me understand how your device works? Can you set the roomTemperature, from the device data I see you can't but maybe you can if you change some setting? Nonetheless the plugin now adds and removes the characteristic if it seems it can set room temperature.

v1fckoeln commented 3 weeks ago

@v1fckoeln is I understand correctly you can not set up a room temperature but only a "leavingWaterOffset". Is that correct?

Yes that's right. The Onecta app outputs the Altherma heater as the climate control. An offset of -10 to +10 degrees flow temperature can be set. Onecta outputs the specified indoor temperature, the outdoor temperature and flow temperature as sensors.

v1fckoeln commented 3 weeks ago

I released homebridge-daikin-cloud@2.6.0-beta.4 that should fix the error @v1fckoeln.

Could you help me understand how your device works? Can you set the roomTemperature, from the device data I see you can't but maybe you can if you change some setting? Nonetheless the plugin now adds and removes the characteristic if it seems it can set room temperature.

You can set from 0 to -10 or +10 as offset. FYI: I installed the new beta :-) And it makes me happy. Thank's a lot. Hot Water Tank is available now in home bridge and shown as Altherma (nicer 'Hot Water Tank)' in the Home-App - but it's OK for me. :You have to click on 'Show as separate tiles' in the Home app. Then the heater and hot-water container are shown separately. What you can maybe add additionally is (proposal) the outdoor-temperature as 'Alth.-outdoor temp', indoor-temperature as 'Alth.-Indoor-SetPoint' and the flow temperature as 'Alth.-flow temp' But anyway: Thank you very much for the quick implementation.

JeroenVdb commented 3 weeks ago

I don't totally understand what you said. Am I correct that

Hot Water Tank is available now in home bridge and shown as Altherma (nicer 'Hot Water Tank)' in the Home-App - but it's OK for me. :You have to click on 'Show as separate tiles' in the Home app. Then the heater and hot-water container are shown separately.

So the device shows up correctly in the app: 1 device with 2 "tiles" (services in HomeKit terms) but both tiles are named "Altherma" and it would be more logical if secondary service, the hot water tank, is called "Hot water tank".

You are totally right of course, I fixed it in a new beta version: homebridge-daikin-cloud@2.6.0-beta.5.

What you can maybe add additionally is (proposal) the outdoor-temperature as 'Alth.-outdoor temp', indoor-temperature as 'Alth.-Indoor-SetPoint' and the flow temperature as 'Alth.-flow temp'

What do you mean with this exactly? Do you mean sensors or the possibility to set a specific setting? If you feel comfortable with some JSON data, maybe you could point out what setting you want to expose (sensor) or change.

v1fckoeln commented 3 weeks ago

I don't totally understand what you said. Am I correct that

Hot Water Tank is available now in home bridge and shown as Altherma (nicer 'Hot Water Tank)' in the Home-App - but it's OK for me. :You have to click on 'Show as separate tiles' in the Home app. Then the heater and hot-water container are shown separately.

YES So the device shows up correctly in the app: 1 device with 2 "tiles" (services in HomeKit terms) but both tiles are named "Altherma" and it would be more logical if secondary service, the hot water tank, is called "Hot water tank".

You are totally right of course, I fixed it in a new beta version: homebridge-daikin-cloud@2.6.0-beta.5.

What you can maybe add additionally is (proposal) the outdoor-temperature as 'Alth.-outdoor temp', indoor-temperature as 'Alth.-Indoor-SetPoint' and the flow temperature as 'Alth.-flow temp'

What do you mean with this exactly? Do you mean sensors or the possibility to set a specific setting? If you feel comfortable with some JSON data, maybe you could point out what setting you want to expose (sensor) or change.

In the Onecta-App are shown the values from the sensors told above -sensor only. Where can I find the json data with possible datapoints?