rospogrigio / daikin_residential

Cloud control of Daikin devices that are supported by Daikin Residential Controller app.
GNU General Public License v3.0
281 stars 37 forks source link

πŸš€ Exciting News: Announcing Daikin Europe Developer Portal! πŸš€ #182

Closed Daikin-Europe closed 3 weeks ago

Daikin-Europe commented 6 months ago

Dear Developers and Tech Enthusiasts,

We are thrilled to announce the new Daikin Europe Developer Portal. This platform is dedicated to empowering developers like you to unlock the full potential of Daikin air2air and air2water heat pumps, fostering innovation in the world of climate control.

🌐 What is the Developer Portal?

Our Developer Portal is your gateway to a world of endless possibilities with Daikin products. Whether you're an experienced developer, a company exploring opportunities or just starting your coding journey, this platform is your ultimate resource for building and integrating with our technologies. It's a one-stop destination for all things development-related, offering documentation and resources to supercharge your projects.

πŸ› οΈ Key Features?

πŸ“š Comprehensive Documentation: Access documentation that provide a deep dive into our APIs, ensuring you have everything you need to get started and excel with your integration.

πŸš€ Interactive API Explorer: Experiment with our APIs in real time using our interactive API explorer, making the integration process smooth and intuitive.

πŸ”Œ Easy integration: Integrate directly onto the Onecta ecosystem with your own units to develop or test your integration. No special hardware required!

πŸ”‘ Rate Limitation: To continue offering the Onecta API for free to all our customers a default rate limitation will be implemented.

πŸ’Ό B2B Business Case Validation: Explore hassle free if your companies business case works together with the Daikin APIs. Get in contact with us when you want to become a partner.

🚧 What's Next?

This is just the beginning! We're committing to expand and enhance our Developer Portal, with new features and resources in the future. Your feedback and suggestions will be invaluable as we evolve the portal to meet the needs of our customers.

:wrench: What changes can already be prepared from your application? Make your current application compatible with the upcoming rate-limitation of 150 calls/day. This will allow everyone to query at least every 15 minutes for temperature changes in their home of all their devices. Temperature variation in the home is often not so fast that a faster update rate is required.

🌟 Ready to Get Started?

We're targeting beginning 2024 for the first access to the Daikin Europe Developer Portal. With later in Q1-2024 the release of self service within the developer portal. Get ready to innovate, build, and make a lasting impact with our Developer Portal. We can't wait to see the incredible solutions you'll create!

Stay tuned for more !

Daikin Europe

jwillemsen commented 3 months ago

Maybe you can assist @Apollon77 with this? For me this is all new stuff, not my daily job ;-)

hmaki commented 3 months ago

@Daikin-Europe Thanks for the info. I looked up on the API description, specifically the gateway-devices what sensory data it is going to offer. I don't know if this is a complete set as it seems to refer to Altherma in few places, but I would really like to consume the sensory data that I can now get through https://github.com/jwillemsen/daikin_residential_altherma

namely: fanMotorRotationSpeed, heatExchangerTemperature and suctionTemperature.

On Air-to-air these can be used to calculate the COP (when measuring the real-time power consumption separately from plug or switchbox).

Also if possible the outdoor unit's heatExchangerTemperature would be nice.

jmtatsch commented 3 months ago

@Daikin-Europe while we are at it, why not offering the real-time power consumption as a value as well instead of aggregated values.

jwillemsen commented 3 months ago

Got a little bit further, I am able to let HA do the authorization call to Daikin but the redirect_url seems to be fixed, I think I need to tweak that, but Daikin doesn't allow that at this moment, see https://github.com/jwillemsen/daikin_residential_altherma/tree/jwi-haoauth2 for the work in progress

jwillemsen commented 3 months ago

I have been able to get data using the new OAuth2 authorization and making some quick hacks. Will try to cleanup the code and check the refresh of the access token, see https://github.com/jwillemsen/daikin_residential_altherma/tree/jwi-haoauth2 for the work in progress.

barryvdh commented 3 months ago

Nice! Sorry I can't really help much, no experience with python. But happy to test something if required.

jwillemsen commented 3 months ago

It look the amount of data provided by Daikin with the new cloud API has decreased, with the old API for my home installation (Altherma and a Daikin AC 4 unit split) I have 5 devices and 300 entities within HA, with the new API I have 5 devices and only 190 entities

jwillemsen commented 3 months ago

See https://github.com/jwillemsen/daikin_residential_altherma/pull/33 for a draft pull request

hmaki commented 3 months ago

It look the amount of data provided by Daikin with the new cloud API has decreased, with the old API for my home installation (Altherma and a Daikin AC 4 unit split) I have 5 devices and 300 entities within HA, with the new API I have 5 devices and only 190 entities

I noticed the amount of entities being reduced as well. @Daikin-Europe said "This is just the beginning! We're committing to expand and enhance our Developer Portal. Expect new features and resources in the future!" so I'm hopeful "expanding and enhancing" means adding more entities and not reducing.

jwillemsen commented 3 months ago

@hmaki Do you have your own integration or are you testing my draft PR?

hmaki commented 3 months ago

I was trying this out using browser and some other tools to generate the token and then used Daikin's API portal to test out the /gateway-devices endpoint.

Apollon77 commented 3 months ago

@jwillemsen @hmaki and which kind of data is "missing" now?

jwillemsen commented 3 months ago

See my draft PR, listed a few there

Gisbert1 commented 3 months ago

"From 11 March onwards, we'll deprecate the currently used API key found in many open-source projects. This means existing integrations will stop functioning."

PLEASE CONTINUE THE CURRENT API KEY !!!

barryvdh commented 3 months ago

Ah I submitted this to Tweakers but they bring it a bit more positive then I meant ;) https://tweakers.net/nieuws/218654/daikin-begint-platform-voor-ontwikkelaars-en-zet-bestaande-api-integraties-stop.html But I see that @jwillemsen already has the top comment :)

henri98 commented 3 months ago

@Daikin-Europe, why only control via the internet?

A local API would be much better architecturally. Then there are no dependencies that can be unavailable/unreliable. Please bring back the local api!

jwillemsen commented 3 months ago

@Daikin-Europe Any plans to provide a test account to integration developers which has all kinds of Daikin devices so that developers can test their integration using that test account?

Apollon77 commented 3 months ago

@Daikin-Europe Please answer to my email ... This afternoon it is 7 days ago that I wrote you to the address listed in your developer portal to dicuss about rate limits. No answer so far ... means 30-7 =23 days left. If you set such short timelines you should also react to emails please!

tetele commented 3 months ago

I honestly don't think they'll ever respond, just as they haven't responded after the first bomb drop in November. They "did whatever they could", i.e. notified developers and went about their business (which apparently is saving big bucks with cloud services, now that nobody can control their HVACs).

Best we can do (apart from modding our existing AC units) is to recommend other AC brands to people asking us what to get.

simonebortolin commented 3 months ago

For local API: https://github.com/revk/ESP32-Faikin and https://github.com/raomin/ESPAltherma and frankly it is better mqtt than plain HTTP, which for me, however, do not fully replace cloud api.

jmtatsch commented 3 months ago

@Daikin-Europe I really liked the alterma 3 lineup and thus wanted to buy one in addition to my existing aircondition unit. I also wanted to buy some stocks in your company because I was convinced of the technological superiority of your products. Needless to say, I will bring my business and investment elsewhere if there is no 180 degree policy change here.

Raspdomo commented 3 months ago

A rate limit of 150 calls is enough for an AC unit, but not for an Altherma, those change much faster, would love to see a higher rate there

It's not enough for an AC unit either. I steer mine depending on excess power production from my solar panels. I have one call per minute (during daylight) ! Could reduce that a bit, but 150 call/day would still be far below my needs...

Raspdomo commented 3 months ago

The rate limits seem substantially low, and if this is a problem removing local API access seems like you're intentionally removing a great number of use cases. Let me explain my use case (via Home Assistant):

  • Every minute, my solar power inverter tells me how much power was generated vs consumed
  • If I have >1,000W of energy being exported, I set the thermostat 4ΒΊ lower than the target
  • If I have <1,000W of energy being exported, I set the thermostat to the target

This means I can pre-chill my house while the sun is shining to give us good comfort with no or low energy usage in the evening, while accounting for variable solar input and variable other loads. When the dishwasher is running its heater, the air con temperature is allowed to warm up a bit.

My implementation is quite similar to yours. I poll my units once per minute. Setpoint updates and on/off commands go on top of that... I do not understand at all why Daikin would close down the local API option. It doesn't cost them anything to leave it as is... Any IT professional will confirm that controlling local units over the internet instead of a local API just adds an unnecessary complexity and dependency. Once again the "cloud hype" tends to kill a perfectly fine and straightforward solution...

simonebortolin commented 3 months ago

I do not understand at all why Daikin would close down the local API option. It doesn't cost them anything to leave it as is... Any IT professional will confirm that controlling local units over the internet instead of a local API just adds an unnecessary complexity and dependency. Once again the "cloud hype" tends to kill a perfectly fine and straightforward solution...

The local API is closed on all third gen adapters (rev C), in rev A and B it is open, this is thanks to the parent company, there is a post on HA explaining this https://community.home-assistant.io/t/daikin-integration-updated-2022-09-26/431819

for example haier (see: https://github.com/Andre0512/hon) also has a similar problem, which is that cloud APIs have a huge cost for them as they pay per HTTP call, ideally they would do something in MQTT

tomlut commented 3 months ago

Cloud control is a nice to have for some, but local control is a necessity.

Removing the local API is not a smart move. It will certainly make me look elsewhere when it comes time to replace my heat pumps. And to be clear I am not in Europe and am not affected by this.

Apollon77 commented 3 months ago

Without being the "devils advocate" partly I can understand companies that close local interfaces. In fact the reality is that customers expect that they can also control their devices when not being at home - especially the "not that technical" guys. This means that a company like Daikin need to have a cloud access solution anyway available to address this need/requirements from a "majority" of their customers. This ends in having to maintain a local API and a cloud one in the firmwares but ideally also in their Apps and such. So this is an "effort" point that simply costs developer resources.

With this in mind it could sound "cheaper" to simplify the WLAN hub in the devices and just offer the cloud solution. I think the user group of smart home enthusiasts is simply not huge enough to matter in general ... So in fact Daikin as one of the only ones wants to offer a developer portal to allow also other usecases to be implemented. This is also a bit unique when you see many other big players out there. Yesthe communication from Daikin is not optimal here, but lets see what comes.

Sure I personally as a tech guy also would love to have local APIs that can be used without limits because then we all would not need to use cloud solutions ... but in fact there are always two sides of the story ...

As said: In an ideal world it would all get Matter somewhen which mean local control and the cloud access could simply be "outsourced" to Apple, Google or Amazon ;-)

simonebortolin commented 3 months ago

As said: In an ideal world it would all get Matter somewhen which mean local control and the cloud access could simply be "outsourced" to Apple, Google or Amazon ;-)

No. I want to be as independent as possible from the big giants.

Apollon77 commented 3 months ago

matter is hopefulyl becoming the new standard ... so Expect that there will be many controllers available also in your TV and such ... so you should have options to choose from ...

Webreaper commented 3 months ago

No. I want to be as independent as possible from the big giants.

Tbh, I'm ambivalent. What I want is a good, usable, functional API that does what I need, is well supported, and works. I understand the commercial reasoning for not supporting local APIs (people may subvert validation checks, and you get all sorts of warranty issues).

So if Daikin, Solis et al produce good APIs that allow us to drive automation, I don't care if it goes via their cloud or not - as long as they don't cut us loose in future and suddenly cease support etc. But I think with a company the size of Daikin, that's less of an issue.

Raspdomo commented 3 months ago

@Apollon77: I share your "devils advicate" opinion. There are indeed two sides, and no company wants to cope with the "not that technical guys" who often tend to consume lots of support/helpdesk energy, But there are tech guys like you who dispose of a thorough and proven knowledge on the matter, and it's a pity (not to say a shame) that even you don't get into dialog with them... As an IT professional myself I've always considered it a necessity - and a privilege - in any project to have a selection of experienced users to rely on for both analysis and testing. Daikin seems to know it all better by themselves - but the limit of 150/200 calls per day is enough to prove that they don't have much of a clue about home automation.

I also like your ideas about Matter (even though I don't really matter about Matter myself :-). A company should focus on it's core business (Daikin = heat pump devices) and outsource non-core stuff to other players in the market.

I wouldn't know how, but is there a way we could address Daikin as a group ? Kind of petition or so ? Kind of uniform letter that each of us can send to a specific Daikin email address ?

PS : I absolutely do not want any updates of unit firmware anymore ! I think those exclusively get installed via Onecta. So is it enough to delete Onecta from all my devices ? Or should I better also delete my Daikin account ? I control everything via Domoticz (either local Wifi or over VPN).

Apollon77 commented 3 months ago

Ok as update: I got a reply from the developer portal Daikin guys and are in contact with them ... lets see how this will be.

jwillemsen commented 3 months ago

I have exchanged a few emails with the daikin developer portal developers, their feedback really helped to migrate my HA daikin integration to the new setup

jwillemsen commented 3 months ago

Just made a small addition to my forked version to log the max and remaining day/minute limits when debugging is enabled, makes it easier to see how fast we are consuming our limits

jwillemsen commented 3 months ago

@Daikin-Europe would it be possible to depend the limits on the amount of devices the user has, with 4 units, just turning them on and change the setpoint I have 8 calls within a minute, which is higher as the minute limit of 6

Raspdomo commented 3 months ago

Some realistic frequency counts (based on my experience):

So 250-300 calls per day PER UNIT seems feasible (but too bad if your automated system has consumed them all => your system doesn't go into nightmode in the evening and keeps consuming...). And no minimum interval between calls. I have 7 units (+ 1 that already has the non-API WiFi module and that I sadly can't control over LAN). That's about 2000 calls. Even if the gathering of room temperatures for all units could be handled in one call, I'd still face 650 calls per day, not evenly spread of course.

@Daikin-Europe: the limit of 200 (150 previously) doesn't seem to be based on any real home automation experience. Or did you overlook that some consumers have bought more than 1 unit ??

I think nobody can disagree that more and more houses will get automated in the near future, Does Daikin choose to be the (leading) brand who does NOT offer a decent solution to support that ? Once again @Daikin-Europe: why on earth are you suppressing a mature and good working local (LAN) API interface that has no cost at all for you neither on processing nor storage "in the cloud" ?

simonebortolin commented 3 months ago

Once again @Daikin-Europe: why on earth are you suppressing a mature and good working local (LAN) API interface that has no cost at all for you neither on processing nor storage "in the cloud" ?

Read. there is no point in posting the same questions over and over again, just read

https://community.home-assistant.io/t/daikin-integration-updated-2022-09-26/431819

VolkerH commented 3 months ago

Read. there is no point in posting the same questions over and over again, just read

Yes, there is. The things that are mentioned in the link you posted can be changed by @Daikin-Europe. None of this is irreversible. The more people who let @Daikin-Europe know we are dissatisfied customers, the better. @Daikin-Europe can push out updates for the WIFI modules, I don't think a firmware update that enables local access on the newer devices is technically infeasible. If it is politics between @Daikin-Europe and Daikin Japan, they need to push back harder against the parent company. With more customer feedback, they can make a much stronger point.

I also have a use case where I wan't to control 5 devices based on PV excess production (mostly summer cooling and heating in spring/autumn) and tibber pricing (winter heating) + using external temperature sensors for better thermostat control. No way this is possible with a rate limit of a few 100 calls/day.

It is good news that some of the developers now managed to establish contact with Daikin, so maybe we can use the cloud API.

@Apollon77, I can also see the devil's advocates points, in particular about remote access for non-technical users or possible warranty issues due to driving hardware to its limits (e.g. cycling on and off 1000s of times per hour which would probably not be good for the compressor). Thus, I can see good technical reasons for a rate limit, even in a local access mode. However, the one unit with old-style WLAN module I have that allows local access works equally well with cloud access, so the non-technical users still have that option if they don't want to set up local access.

But completely regardless, what I take issue with is that I bought a device, not a service. @Daikin-Europe cannot cripple that device after they sold it. And I was quoted and sold air-conditioning units with WiFi controller, not with cloud controller.

EDITED to add: Haier, as a direct competitor, was already mentioned above. They also changed their approach after push-back from the community. Although the outrage should have been directed at Haier-Europe rather than the parent company in that case, the distinction wasn't made ... it hurt the whole brand. Maybe Daikin wouldn't like to learn from that and avoid being featured by Louis Rossman the way that Haier was https://www.youtube.com/watch?v=RcSnd3cyti0

jwillemsen commented 3 months ago

I have merged all changes for the new Developer Portal to the master branch of my fork, see https://github.com/jwillemsen/daikin_residential_altherma. Several users report back that they can see and control their Daikin devices using the new Developer Portal API but more user feedback is very welcome!

barryvdh commented 3 months ago

Is that also for the aircos, or is that still this Library?

jwillemsen commented 3 months ago

@barryvdh My fork also support the airco units. It does also show the sensors of the air purifiers, but there is no support to control the air purifier, don't have such a device to test

Raspdomo commented 3 months ago

@jwillemsen: what happens when you bump into the limit (max calls per hour/day reached) ?

jwillemsen commented 3 months ago

Haven't tried it explicitly, but when reading comments from others you can't control the devices and get data updates until the next timeframe

Raspdomo commented 3 months ago

OMG... In Belgium there is an electricity tax on "peak power consumption per 15 minutes". So you want to keep that low. Cutting the oven or cooker power isn't really an option so I cut down on airco units (I heat with my aircos). I set the airco setpoints just below room temperature (= stops the units) until the situation gets back to normal. Usualy that's 5 - 10 minutes later. I then bring them up again, one per minute. 8 units = 24 calls (1 temp reading, 2 setpoint adjusts) over 10-15 minutes ! Happens 1-2 times per day. Seems Faikin is going to do good business...

jwillemsen commented 3 months ago

I made the suggestion to @Daikin-Europe to make the limit dependent on the number of devices someone has, that allows a lot more use cases. Or provide a separate limit for polling the status and sending commands to a device (again per device).

The current code polls once each 10 minutes, one call gives the data of all devices, so that are 144 calls per day just for retrieving the status, leaving 56 calls per day for sending commands.

Raspdomo commented 3 months ago

Both suggestions really make sense. The more units you have the more you've paid... 56 calls for sending commands is ridiculously low for my 8 units... Many many thanks for all your efforts !

As stated before, when data gathering for all devices is done in one call, in my case I'd still need about 650 calls / day AND an no interval limitations (= allowing 1/minute).

Apollon77 commented 3 months ago

I had a very constructive exchange with the Daikin Developer Portal contacts about several integration topics. So for me as a plugin developer I took the following results out of or conversations that I want to share for you:

I will also update the JavaScript libraries in time.

rospogrigio commented 3 months ago

Thank you @Apollon77 for the update! Am I understanding that you didn't talk about local LAN control at all?

Raspdomo commented 3 months ago

@Apollon77: many thanks for all your efforts ! My 2 cents:

Finally the feedback about Altherma totally confuses me. Daikin is qoing to provide a modbus for local access. But they are discarding their local access to airco units (BRP069C4x WiFi module) ????????????????

rgerhards commented 3 months ago

@Apollon77

Thanks a ton for your efforts! Very, very much appreciated.

  • There will be rate limits on the cloud APIs because they also cost money for Daikin, so we should try our best to limit the calls best possible in the integrations.

If you are in contact with them, it would be great if you could suggest to also offer a paid subscription service with much higher rate limits for a reasonable price. I have subscribed to the Davis Weatherstation cloud API just because it was (at that time) much easier to use with the local interface). For a reasonable price, I would definitely subscribe to a Daikin subscription if that solves issues for me.

Apollon77 commented 3 months ago

@Raspdomo yes 6/min -> 20/min as one rate limit. Additionally to the per day one.