Change _LOGGER.info(zones)
to _LOGGER.warning(zones)
As it seems like you not are logging info messages…
Is the climate component broken?
docker build https://github.com/fredrike/home-assistant.git#daikin_fan-mode
Change _LOGGER.info(zones)
to _LOGGER.warning(zones)
As it seems like you not are logging info messages…
Is the climate component broken?
docker build https://github.com/fredrike/home-assistant.git#daikin_fan-mode
019-05-10 06:22:10 WARNING (MainThread) [custom_components.daikin.switch] [(’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’), (’-’, ‘0’)]
I am not yet using your modified climate/appliance because I have not yet worked out how to get to the correct directory for the appliance file on HASSIO. I will hopefully be able to read up on docker and try it out on the weekend.
Thanks, I’ve totally forgotten that zones is a list of tuples. New PR have been submitted Fix for non existing Daikin zones by fredrike · Pull Request #23792 · home-assistant/core · GitHub
It is quite simple, just build the docker image with:
docker build -t homeassistant/home-assistant https://github.com/fredrike/home-assistant.git#daikin_fan-mode
And then you can run it as described in Installation - Home Assistant
Fredrike
Unfortunately the docker link would not build - I suspect some problem with jessie on my pi3 ARM. I have been able to load hassbian, and change the relevant climate/appliance files.
This leaves me with 2 instances of Home Assistant - both of them 0.92.2 - one on hassio straight out of the box, the other modified as mentioned. They both load climate, 2 temps and 8 switches (I haven’t caught up with your modifications yet). They both work well for everything but the fan modes:
I can reliably change f_rate from 1 to 5 using:
curl http://192.168.1.191/skyfi/aircon/set_control_info?lpw=&mode=0&dt0=--&f_airside=0&f_rate=3&shum=--&pow=0&stemp=--&f_dir=1&f_auto=0
And check f_rate with:
curl http://192.168.1.191/skyfi/aircon/get_control_info?lpw=’
This change is picked up by the Hassio “standard” build as “fan mode” 1 - 5 on the GUI. This change is not picked up at all by the Hassbian “modified” GUI - the relevant field just displaying “Fan mode” (it looks like it is awaiting a polling update)
When it comes to initiating changes in fan mode from the GUI:
The standard Hassio allows selection of several modes - including 1 to 5. If I change anything it just defaults to f_rate=1 and “fan mode” 1 on the GUI.
The modified Hassbian offers “mid” ”hi” ”lo” as options - but does nothing.
FYI:
fan_rate 1,2 show up as 1 of 3 bars on my daikin wall controller - and the fan sets to low speed mechanically.
fan_rate 3,4 show up as 2 of 3 bars - and the fan sets to low speed (my system only has 2 speeds - for 3 speed systems this would be medium speed I presume)
fan_rate 5 shows up as 3 of 3 bars - and the fan sets to high speed mechanically.
Thank you for trying to debug the build. The changes was merged yesterday and it is unfortunate that it doesn’t seem to work.
I think I’ve found the issue and created a new PR.
The Daikin climate entity appears to be broken in 93
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 365, in _async_add_entity
await entity.async_update_ha_state()
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 225, in async_update_ha_state
self._async_write_ha_state()
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 255, in _async_write_ha_state
attr.update(self.state_attributes or {})
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/climate/init.py”, line 268, in state_attributes
is_away = self.is_away_mode_on
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/daikin/climate.py”, line 295, in is_away_mode_on
HA_ATTR_TO_DAIKIN[ATTR_AWAY_MODE]
File “/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py”, line 248, in represent
v = self.values[key]
KeyError: ‘en_hol’
There is a fix for this in Daikin adaptions for AirBase units by fredrike · Pull Request #23734 · home-assistant/core · GitHub, please comment on that issue that the code should be part of 0.93.1 as it fixes issues there.
The whole thing would have been avoided if someone could have tested the code I asked for 16d ago, Support for Daikin AirBase units - #58 by fredrike
I don’t own an Airbase unit, making it quite hard to develop features for it…
Awesome, thanks heaps. I would love to help with the testing but I don’t think I can on hassio, or can I? Maybe I should setup a development environment for stuff like this. I’m a Java developer by trade but I’d like to learn python at some stage. Anyway thanks heaps for your efforts.
fredrike,
I have managed to put a docker image of 0.94.0.dev0 on my synology.
This version loads climate, 8 switches and 1 temp sensor (thanks). Fan modes displayed in the drop down box are “Low”, “Mid”, “High”
The sensor seems to report the temp OK, but no commands are available from the GUI.
Sun May 19 2019 16:07:02 GMT+0930 (Australian Central Standard Time)
‘Appliance’ object has no attribute ‘support_fan_mode’
Traceback (most recent call last):
File “/usr/src/app/homeassistant/components/websocket_api/commands.py”, line 121, in handle_call_service
connection.context(msg))
File “/usr/src/app/homeassistant/core.py”, line 1141, in async_call
self._execute_service(handler, service_call))
File “/usr/src/app/homeassistant/core.py”, line 1163, in _execute_service
await handler.func(service_call)
File “/usr/src/app/homeassistant/helpers/entity_component.py”, line 194, in handle_service
required_features
File “/usr/src/app/homeassistant/helpers/service.py”, line 316, in entity_service_call
future.result() # pop exception if have
File “/usr/src/app/homeassistant/helpers/service.py”, line 337, in _handle_service_platform_call
await getattr(entity, func)(**data)
File “/usr/src/app/homeassistant/components/daikin/climate.py”, line 232, in async_set_operation_mode
await self._set({ATTR_OPERATION_MODE: operation_mode})
File “/usr/src/app/homeassistant/components/daikin/climate.py”, line 179, in _set
await self._api.device.set(values)
File “/usr/local/lib/python3.7/site-packages/pydaikin/appliance.py”, line 314, in set
if self.support_fan_mode:
AttributeError: ‘Appliance’ object has no attribute ‘support_fan_mode’
I hope this is of use. I am sorry that my computer skills are not more sophisticated.
I much appreciate your help.
No you can’t but it is really easy to fire-up a Docker instance with ha:dev on your computer.
Great! (it wasn’t more than docker run docker run --init -d --name="home-assistant" -v /PATH_TO_YOUR_CONFIG:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant:dev
right )
Great find! I’ve added a PR that fixes it.
the climate component works fine now
fan modes work
minor glitches:
FAN MODES - my unit only has High and Low - I think you tried to put in a fix for this, but I am still coming up with 3 fan speeds on the gui.
SWITCHES - I think you tried to fix it so that switches were not loaded where no zone existed. I still have 8 switches loading but no zone controller.
TEMPERATURE HI LO - I know you mentioned not necessary, but for those interested it can easily be set in customize.yaml:
climate.daikinap61623:
max_temp: 32
min_temp: 16
This just looks a bit neater on the gui and makes it a little easier when setting the temperature
Great work!
Hi @fredrike, thanks for your work on the Airbase… Sorry for not testing earlier, running hass.io so was trying to work out how to use docker and have spent today installing it on a Mac Mini. I’ve managed to get the dev version which seems to get your PR in.
FAN MODEs work on my airbase (with a 3 speed Daikin ducted).
SWITCHES - I don’t have zones but still get the 8 switches as @racsa found too.
On a side note I was trying to build a docker image using the command
docker build -t homeassistant/home-assistant https://github.com/fredrike/home-assistant.git#daikin_fan-mode
but it just didn’t like it and went into a loop with an output "Building wheel for dlib (setup.py): still running..."
. Again thanks for your work in developing this, controlling it from HomeAssistant is so much more reliable then the Airbase app!
I might have found a fix for the loading of switches:
maybe change line 30 in switch.py from
if zone != (’-’, 0)
to
if zone != (’-’, ‘0’)
similarly, if appliance.py line 194 changes from:
if self.values[‘frate_steps’] == 2:
to
if self.values[‘frate_steps’] == ‘2’:
I get only 2 fan speed options (Low, High)
fredrike
Latest docker dev image loads the correct components for my a/c and works well.
Thanks!
I’ve just had Daikin confirm the Airbase will work with my ~15 year old Daikin system, so I’m considering buying one. Can anyone tell me if its possible to set weekly schedules with the Airbase component in HA (e.g. scheduling the system to come on and off multiple times per day or changing temp multiple times)? I was looking at the Daikin Airbase iOS app and it does NOT allow more than one timer per day, so I wanted to check if this limitation was inherent in the hardware or just the Daikin app?
EDIT: I did a bit more reading and can see the daikin
component uses the climate
component, so I’m guessing any scheduling has to be done via automations (or NodeRed). I also came across schedy
(nee heaty
) which looks like a nice alternative to raw automations.
"Before arrangement, please check the internet connection of the WIFI adapter first. If there is a problem with the internet connection, this function may not be performed.
This mobile app timer and wired remote control timer functions work independently of each other."
The above quote is from my airbase app (the timer page) on my android phone. I think this probably means the wired wall controller will do what it does - and the app just functions as a timer switch (with its own countdown) to turn the device on once…or off once.
So - if you are looking to put a weekly schedule on an a/c unit not already having this capability you are out of luck I suspect.
The airbase component is very quick and reliable from home assistant on my phone (the airbase is much slower - not sure if it relays via daikin’s servers somewhere when offsite - seems to update on the minute).
I initially thought the same thing but I then thought you could simply disable the wired controller’s “timers” (scheduling) and then any commands sent via HA would behave like a scheduled timer. E.g. it should be able to turn the unit on and off and change the temperature remotely via the Airbase (I’d have thought). But not having one yet, I may be missing something there…