home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.31k stars 30.62k forks source link

Daikin AC energy sensor entities are not created for new AC units #77877

Closed cremor closed 1 year ago

cremor commented 2 years ago

The problem

If you buy a new Daikin AC and add it to Home Assistant, the Daikin AC integration will not create any power sensor entities. You have to wait until the next calendar month to get them.

What version of Home Assistant Core has the issue?

core-2022.8.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Daikin AC

Link to integration documentation on our website

https://www.home-assistant.io/integrations/daikin/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

By reading the integration's source code I figured out that it uses the /aircon/get_year_power endpoint to figure out if the unit supports energy consumption. See https://bitbucket.org/mustang51/pydaikin/src/b3b7878c8f411b26c21c21dc08818cf8af5ec6c6/pydaikin/power.py#lines-63:67

The problem with that endpoint is that it only reports past full calendar months in the this_year part. So you have to wait until the next calendar month to get anything for a new AC unit. At least the following unit behaves that way: Wifi adapter: BRP069B41 Firmware version: 1_14_68 Region: EU AC model: FTXP25M5V1B9

I think support_energy_consumption should also check the values returned from all other power endpoints to figure out if the unit supports energy consumption.

probot-home-assistant[bot] commented 2 years ago

daikin documentation daikin source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

Hey there @fredrike, mind taking a look at this issue as it has been labeled with an integration (daikin) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

fredrike commented 2 years ago

@mlemainque could you take a look at this?

mlemainque commented 2 years ago

Good catch! I will make the update πŸ‘πŸ»

mlemainque commented 2 years ago

@cremor, would you be able to test this MR with your AC? Thanks πŸ™

cremor commented 2 years ago

Sorry, but I can't test this. My AC already reports something from /aircon/get_year_power now.

Also, I'm not an HA or even Python dev. So I wouldn't even know how to test it. I can read Python, but that's it.

Geo-Ron commented 2 years ago

If someone can guide me to a document on how to test, I am willing to. I have a set of 2x BRP069B45 with firmware version 1.14.68, both of them respond to the api /aircon/get_year_power with ret=OK,previous_year=0/0/0/0/0/0/0/0/0/0/0/0,this_year=0/0/0/0/0/0/0/0/0

mlemainque commented 2 years ago

Hello @Geo-Ron,

You have to clone https://bitbucket.org/mustang51/pydaikin, and then run bin/pydaikin -l; it should discover all the AC devices on your network and show wether each of them support energy consumption monitoring or not. With the old version of pydaikin, it should be "unsupported" if you have 0/0/.../0 in yearly consumptions

Ferke85 commented 1 year ago

Hi, A Daikin Comfora has been installed in my home today. The parameters are almost the same as the original poster (cremor), the only difference is the capacity: I have 3,5kW, instead of 2,5kW. The Daikin integration discovered my unit successfully, but only the following entities appeared in HA:

So there is nothing about the power consumption, but the Onecta app on my phone shows this kind of values as well. I tried the above mentioned method (on Oct 2), but it gives this result:

root@odroid:~/daikin/pydaikin# ./daikin -l 192.168.11.76 (B48C9Dxxxxxx): DaikinAP6xxxx - Unsupported energy consumption

But I have found this comment. The relevant part of it is the following:

/aircon/get_day_power_ex?days=2
this command retrieves the power consumption (in 0.1 kWH) of the last 2 days, separated hour by hour starting from midnight and also separated for cooling and heating. The days variable can be set up to 7 for last 7 days. The response I got was:
ret=OK,curr_day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/1/0/0/0/0/2/2/2/2/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/1/0/0/0/2/2/2/1/2/1/0
/aircon/get_week_power_ex
this command retrieves the power consumption (in 0.1 kWh) of the current and last week, separated day by day, the response I got was:
ret=OK,s_dayw=4,week_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0,week_cool=10/11/3/9/10/16/11/3/9/6/6/0/0/0
/aircon/get_year_power_ex
this command retrieves the power consumption (in 0.1 kWh) of the current and last year, separated month by month, the response I got was:
ret=OK,curr_year_heat=0/0/0/0/0/0/0/0/0/0/0/0,prev_year_heat=0/0/0/0/0/0/0/0/0/0/0/0,curr_year_cool=0/0/0/0/0/24/70/0/0/0/0/0,prev_year_cool=0/0/0/0/0/0/0/0/0/0/0/0

Here are some results from my device:

/aircon/get_year_power
ret=OK,previous_year=0/0/0/0/0/0/0/0/0/0/0/0,this_year=0/0/0/0/0/0/0/0/0/0/0/0

/aircon/get_year_power_ex
ret=OK,curr_year_heat=0/0/0/0/0/0/0/0/0/0/0/57,prev_year_heat=0/0/0/0/0/0/0/0/0/0/0/0,curr_year_cool=0/0/0/0/0/0/0/0/0/0/0/0,prev_year_cool=0/0/0/0/0/0/0/0/0/0/0/0

/aircon/get_day_power_ex
ret=OK,curr_day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/13/12/8/7/8/8/1/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0

/aircon/get_day_power_ex?days=3
ret=OK,curr_day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/13/12/8/7/8/8/1/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_2day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_2day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0

As you can see it is possible to get the power consumption for each hour, this is better than in the original app (Onecta), because it has one value for a 2-hour period.

I would be happy if you could update the Daikin integration with this extended measurements. If you need any other test, please let me know.

cremor commented 1 year ago

I assume the energy entities should show up for you after a day or so. pydaikin was changed to also read the "7days" value. That might just not report anything on the very first day of usage.

k-szabi commented 1 year ago

Hi, A Daikin Comfora has been installed in my home today. The parameters are almost the same as the original poster (cremor), the only difference is the capacity: I have 3,5kW, instead of 2,5kW. The Daikin integration discovered my unit successfully, but only the following entities appeared in HA:

  • inside temperature
  • outside temperature
  • streamer
  • compressor frequency
  • climate

So there is nothing about the power consumption, but the Onecta app on my phone shows this kind of values as well. I tried the above mentioned method (on Oct 2), but it gives this result:

root@odroid:~/daikin/pydaikin# ./daikin -l 192.168.11.76 (B48C9Dxxxxxx): DaikinAP6xxxx - Unsupported energy consumption

But I have found this comment. The relevant part of it is the following:

/aircon/get_day_power_ex?days=2
this command retrieves the power consumption (in 0.1 kWH) of the last 2 days, separated hour by hour starting from midnight and also separated for cooling and heating. The days variable can be set up to 7 for last 7 days. The response I got was:
ret=OK,curr_day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/1/0/0/0/0/2/2/2/2/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/1/0/0/0/2/2/2/1/2/1/0
/aircon/get_week_power_ex
this command retrieves the power consumption (in 0.1 kWh) of the current and last week, separated day by day, the response I got was:
ret=OK,s_dayw=4,week_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0,week_cool=10/11/3/9/10/16/11/3/9/6/6/0/0/0
/aircon/get_year_power_ex
this command retrieves the power consumption (in 0.1 kWh) of the current and last year, separated month by month, the response I got was:
ret=OK,curr_year_heat=0/0/0/0/0/0/0/0/0/0/0/0,prev_year_heat=0/0/0/0/0/0/0/0/0/0/0/0,curr_year_cool=0/0/0/0/0/24/70/0/0/0/0/0,prev_year_cool=0/0/0/0/0/0/0/0/0/0/0/0

Here are some results from my device:

/aircon/get_year_power
ret=OK,previous_year=0/0/0/0/0/0/0/0/0/0/0/0,this_year=0/0/0/0/0/0/0/0/0/0/0/0

/aircon/get_year_power_ex
ret=OK,curr_year_heat=0/0/0/0/0/0/0/0/0/0/0/57,prev_year_heat=0/0/0/0/0/0/0/0/0/0/0/0,curr_year_cool=0/0/0/0/0/0/0/0/0/0/0/0,prev_year_cool=0/0/0/0/0/0/0/0/0/0/0/0

/aircon/get_day_power_ex
ret=OK,curr_day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/13/12/8/7/8/8/1/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0

/aircon/get_day_power_ex?days=3
ret=OK,curr_day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/13/12/8/7/8/8/1/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_2day_heat=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_2day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0

As you can see it is possible to get the power consumption for each hour, this is better than in the original app (Onecta), because it has one value for a 2-hour period.

I would be happy if you could update the Daikin integration with this extended measurements. If you need any other test, please let me know.

Hi, I had the same situation with my Daikin Sensira AC, and the energy sensors appeared a few days later..

Ferke85 commented 1 year ago

Okay, maybe I wasn't patient enough... Let's see what happens after a few days. Thanks for the responses.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment πŸ‘ This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

cremor commented 1 year ago

This should be fixed.