Daikin Component - no climate entities created - task exception

Hi all,

On the update (0.84.3) have you noticed this kind of errors for the daikon module:

2018-12-20 23:45:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 344, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.Living_Room_Temperature. Platform daikin does not generate unique IDs
2018-12-20 23:45:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/entity_platform.py”, line 344, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.Outside_Temperature. Platform daikin does not generate unique IDs

I think it has to do with the recent change that each device has to generate unique IDs.

Also if you don’t want to use auto-discovery how do you retrieve the sensor name for the climate.SOMETHING ?
Because with auto discovery on it appears in the dashboard with a sensor name climate.UNITNAME but if trying to use the same climate.UNITNAME with auto discovery off it doesn’t show anything.
Thanks

Hi!

I’ve rewritten most of the daikin communication and unique id is a combination of mac-address and sensor type (outside/inside). I’ll investigate more but it seems like your daikin doesn’t report the mac-address correctly.

Or perhaps you have one unit showing up multiple times (that was an old issue that is fixed in upcoming releases).

Is it just a log issue or are you missing devices (check the dev-state page)?

Name is read from the device no matter if it is discovered or added via configuration.yaml. What you are referring to is the fact that entities without unique_id can change entity_id and therefore break automations and gui. Since unique_id is present no you can change name and id from the dev-state page.

Hi!

thanks for the response. It is a fresh install of HA. I do not see it multiple times.
Regarding the problem it presents the error in the logs and works ok if auto discovery is on (I have the devices inside temp, outside temp , climate.
If i disable HA auto discovery I only get the devices inside temp and outside temp. The climate one doesn’t show up.
If you need any more logs or details please tell me.

Meanwhile I updated HA to 0.84.5 but the problem persists.

Thanks

Send me a pm with a link to pastebin with all debugging enabled. I really would like to wait with making a big fuzz with this until the integration and dev_info part have been tested (perhaps you can run the dev release with those changes and see if the issue persist with all the new code).

Merry x-mas.

Hello,
I hope someone can help me.
A couple of days ago I got two new Daikin ACs - FTXM
Also I have an old unit in the living room - FTXS
To all of them installed BRP069B42 modules, then I added them to home assistant configuration.

Bedroom 1 with FTXM doesn’t show in home assistant, if I add it only as temperature sensor they show.
Bedroom 2 with FTXM shows in home assistant
Living room with FTXS shows in home assistant

When I go to ‘/aircon/get_control_info’ these are the results:
Bedroom 1 ret=OK,pow=1,mode=4,adv=,stemp=24.0,shum=0,dt1=25.0,dt2=M,dt3=25.0,dt4=24.0,dt5=24.0,dt7=25.0,dh1=AUTO,dh2=50,dh3=0,dh4=0,dh5=0,dh7=AUTO,dhh=50,b_mode=4,b_stemp=24.0,b_shum=0,alert=255,f_rate=B,f_dir=0,b_f_rate=B,b_f_dir=0,dfr1=5,dfr2=5,dfr3=5,dfr4=B,dfr5=B,dfr6=5,dfr7=5,dfrh=5,dfd1=0,dfd2=0,dfd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_demand=0

Bedroom 2
ret=OK,pow=1,mode=4,adv=,stemp=24.0,shum=0,dt1=25.0,dt2=M,dt3=25.0,dt4=24.0,dt5=24.0,dt7=25.0,dh1=AUTO,dh2=50,dh3=0,dh4=0,dh5=0,dh7=AUTO,dhh=50,b_mode=4,b_stemp=24.0,b_shum=0,alert=255,f_rate=B,f_dir=0,b_f_rate=B,b_f_dir=0,dfr1=5,dfr2=5,dfr3=5,dfr4=B,dfr5=B,dfr6=5,dfr7=5,dfrh=5,dfd1=0,dfd2=0,dfd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_demand=0

Living room
ret=OK,pow=1,mode=4,adv=,stemp=24.0,shum=0,dt1=25.0,dt2=M,dt3=25.0,dt4=24.0,dt5=24.0,dt7=25.0,dh1=AUTO,dh2=50,dh3=0,dh4=0,dh5=0,dh7=AUTO,dhh=50,b_mode=4,b_stemp=24.0,b_shum=0,alert=255,f_rate=A,f_dir=0,b_f_rate=A,b_f_dir=0,dfr1=5,dfr2=5,dfr3=5,dfr4=A,dfr5=A,dfr6=5,dfr7=5,dfrh=5,dfd1=0,dfd2=0,dfd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0

If you need anything else to help me debug the problem, please tell me.

Updated Hassio from 0.82 to 0.86, daikin component disappeared, and I have yellow warning messages for inside and outside temperature sensors;

my fault. i didn’t noticed that in 0.85 daikin component went in 'config flow’. everything is fine

@fredrike @jonaspaulo
fwiw I don’t see great value in implementing the ‘special’ modes, but having new sensors which tracks power consumption would be absolutely great.
current daikin app does a mediocre job on storing those numbers (from time to time they get lost) and having them stored by ha in its databases would make years/seasons stats much more feasible

1 Like

I agree, comparing both 100% go for the consumption stats :slight_smile:

1 Like

I understand the usage of this and will try to add support for it, is it the data from /aircon/get_week_power you are after?
Mine reports ret=OK,today_runtime=521,datas=0/0/0/0/0/0/0 which I guess means running for 521 minutes and the consumption for days where my device does not support reporting power. What is the reasonable parsing of 0/0/0/0/0/0/0, does it start on monday or sunday and can current day be enough (parsing the field based on current day of week)?

I need some more information than that, the strings you sent for Bedroom 1/2 are identical so based on aircon/get_control_info they are the same. Please enable debug logging and see if the log gives any clues why B1 not is “showing up”.

i get this

ret=OK,today_runtime=72,datas=10100/15500/15600/18400/17900/17700/6500

i’ll try to infer which day is which by looking at the app
btw: awesome work in having daikin in config flow!

1 Like

I would guess that 6500 is “today” as you have only been running for 72 hours… What timezone are you in as having monday (UTC) as the last is a wired format. Is the unit in kWh?

I also would consider all the endpoints

aircon/get_day_power_ex
aircon/get_month_power_ex
aircon/get_week_power
aircon/get_week_power_ex
aircon/get_year_power
aircon/get_year_power_ex

this is the most promising one

http://192.168.1.105/aircon/get_day_power_ex

which gives

ret=OK,curr_day_heat=0/0/0/1/0/0/0/10/10/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/3/17/8/0/2/10/9/9/12/13/0/12/2/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

i think in curr_day_heat what we are seeing are kWh for each hour. at 3am it consumed 1kwh, 10kwh at 7am and 10kwh at 8am

which is kind of confirmed by the app

‘Giorno’ is day
‘Settimana’ is week
‘Anno’ is year
‘Reffreddamento’ means cooling and ‘Riscaldamento’ is heating
‘Attuale’ is current and ‘Precedente’ is previous
i’m sorry I could not find a way to switch the app to english

Well that cleared some things up, but it does not help in how to read the data to home-assistant.

I think that the best would be to read a “current day” value and represent that as a sensor (perhaps different sensors for hot and cold). Then home-assistant can “do what it likes with that data” i.e. make it available to influxdb and grafana so you can plot it as you like.

If you just could extract what single data point (perhaps the “Attuale” field) you want to show up in hass I would be happy to integrate that.

ok lets’ take this

curr_day_heat=0/0/0/1/0/0/0/10/10/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
first; it is not kwh (as I said) but ‘tenth of kw’. so it is 0.1 + 1.0 + 1.0 = 2.1 kWh, as the app says in the ‘Attuale’ field

so what you could do is

  • poll this endpoint, and react when tha answer changes
  • parse the content of ‘curr_day_heat’ splitting for slashes and you get the tenth of consumed kwh for each hour. i expect them to be int, not float (*1)
  • sum those 24 numbers and put it in a ‘power_consumption_heating’ sensor

does it make sense?

(*1) I think they are rounded to int because if you look at tonight consumption:

curr_day_heat=0/0/0/1/…
it seems heating was off from 0am to 4am, while i’m sure heating was on all night. probably it did absorbed less then a tenth of kwh, and finally at 4am it became >= of 0.1kwh. I’m not sure if it is clear

I will do it like this :slight_smile:

sum(map(int, '0/0/0/1/0/0/0/10/10/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0'.split('/')))/10.0

What about just running fan/dry mode?

Also, I would skip prev_1day_* values. it make sense for the daikin app, which is stateless, but in HA they are just the yesterday ‘current’

so I would just take

curr_day_heat=0/0/0/1/0/0/0/10/10/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

and put them in two sensors. I like them being separate. People can always sum them afterwards if they want a single ‘consumption’ value

1 Like

sorry what do you mean?

What if you just run dry-mode (not heat or cool)?

ah ok, just the fan. good point.
i assume it’s either assimilated to one of those two counters or ignored, but I need to try it. not now though, can we wait when it’s a little warmer? :slight_smile: