Daikin Skyfi and 0.111.0 - first time use - no zones detected

I’m a new HA user and have been waiting for the 0.111.0 update to land so I could set up the SkyFi integration. If it matters, running on a bright shiny new RPi4, with HassOS 4.10, python_version 3.7.7, supervisor 227, and just installed version 0.111.0 this morning AU time.

I can’t be sure of the model of skyfi I have as it was never sold with a code - but from https://www.home-assistant.io/integrations/daikin/ it should be the AU SkyFi unit (the very early one, now discontinued, that the SkyFi app works against). This one presents the zones in the app, and they can be toggled.

When I set up the integration once the update was applied, I can now see the unit, can see it’s on or off, can see the internal and external temperature sensors, so that’s all good… but what I can’t see is zones. The above link says that the integration should expose switches, but mine aren’t detected.

Not really knowing much about HA nor the integration, not really sure how to start diagnosing from here - happy to take suggestions!

cheers
Brett

Found some more info.
State attributes:

hvac_modes:
  - fan_only
  - dry
  - cool
  - heat
  - heat_cool
  - 'off'
min_temp: 7
max_temp: 35
target_temp_step: 1
fan_modes:
  - Low
  - Medium
  - High
  - Low/Auto
  - Medium/Auto
  - High/Auto
current_temperature: 23
temperature: 23
fan_mode: High
friendly_name: Daikin AC
supported_features: 9

From the dev tools logs, I see:

Update of sensor.daikin_ac_inside_temperature is taking over 10 seconds
10:28:55 AM – __main__.py (WARNING) - message first occurred at 7:53:28 AM and shows up 48 times

Connection failed for <ip>:2000
10:26:45 AM – Daikin AC (WARNING) - message first occurred at 8:38:13 AM and shows up 3 times

Update for climate.daikin_ac fails
9:35:53 AM – components/daikin/__init__.py (ERROR)

Updating daikin climate took longer than the scheduled update interval 0:01:00
9:34:57 AM – Climate (WARNING) - message first occurred at 9:31:54 AM and shows up 4 times

Update for climate.daikin_ac fails
8:40:09 AM – components/daikin/__init__.py (ERROR) - message first occurred at 7:55:35 AM and shows up 3 times

Error while setting up daikin platform for switch
7:52:16 AM – Switch (ERROR)

the last error was about when I first configured the setup, so is probably innocuous. The others though are a little more interesting Shows that the integration and responses seem to be slow (so polling period too great for my device perhaps?)

I’ll dig more

I can confirm when I access zones.cgi via cURL I can see the info I expect.
C:\Users\brett>curl -s -X GET http://ac.local:2000/zones.cgi?pass=12345
nz=8&zone1=Living%20area&zone2=Front%20living&zone3=Bedrooms&zone4=Zone%204&zone5=Zone%205&zone6=Zone%206&zone7=Zone%207&zone8=Zone%208

Only zones 1 thru 3 are connected (the others are all named the default). Could I need actual areas in HA with exact matching names?

@fredrike just letting you know in case my tagging of this thread didn’t bring it to your attention

Found some details on setting up debug logging and got this:

2020-06-11 14:26:05 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['ac.cgi?pass={}', 'zones.cgi?pass={}']
2020-06-11 14:26:07 DEBUG (MainThread) [pydaikin.daikin_skyfi] Parsing opmode=0&units=.&settemp=23.0&fanspeed=3&fanflags=1&acmode=2&tonact=0&toffact=0&prog=0&time=14:27&day=3&roomtemp=22&outsidetemp=17&louvre=0&zone=128&flt=0&test=0&errdata=144&sensors=1
2020-06-11 14:26:08 DEBUG (MainThread) [pydaikin.daikin_skyfi] Parsing nz=8&zone1=Living%20area&zone2=Front%20living&zone3=Bedrooms&zone4=Zone%204&zone5=Zone%205&zone6=Zone%206&zone7=Zone%207&zone8=Zone%208
2020-06-11 14:26:08 INFO (MainThread) [homeassistant.components.climate] Setting up climate.daikin
2020-06-11 14:26:08 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['ac.cgi?pass={}', 'zones.cgi?pass={}']
2020-06-11 14:26:08 ERROR (MainThread) [homeassistant.components.switch] Error while setting up daikin platform for switch
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/daikin/switch.py", line 24, in async_setup_entry
    zones = daikin_api.device.zones
  File "/usr/local/lib/python3.7/site-packages/pydaikin/daikin_skyfi.py", line 158, in zones
    for i, onoff in enumerate(self.represent('zone')[1])
  File "/usr/local/lib/python3.7/site-packages/pydaikin/daikin_skyfi.py", line 121, in represent
    val = str(bin(int(self[key]) + 256))[3:][int(self['nz'])]
IndexError: string index out of range
2020-06-11 14:26:10 DEBUG (MainThread) [pydaikin.daikin_skyfi] Parsing opmode=0&units=.&settemp=23.0&fanspeed=3&fanflags=1&acmode=2&tonact=0&toffact=0&prog=0&time=14:27&day=3&roomtemp=22&outsidetemp=17&louvre=0&zone=128&flt=0&test=0&errdata=144&sensors=1
2020-06-11 14:26:11 DEBUG (MainThread) [pydaikin.daikin_skyfi] Parsing nz=8&zone1=Living%20area&zone2=Front%20living&zone3=Bedrooms&zone4=Zone%204&zone5=Zone%205&zone6=Zone%206&zone7=Zone%207&zone8=Zone%208

so it’s parsing my zone list where it’s failing.

It’s really strange, can you post the result from:

curl -s -X GET http://ac.local:2000/ac.cgi?pass=12345

1 Like

I did that above :slight_smile:

It flowed right under the command tho so wasn’t very clear

nz=8&zone1=Living%20area&zone2=Front%20living&zone3=Bedrooms&zone4=Zone%204&zone5=Zone%205&zone6=Zone%206&zone7=Zone%207&zone8=Zone%208

I don’t need to see you zones, I need to see your zone settings (from curl -s -X GET http://ac.local:2000/ac.cgi?pass=12345).

1 Like

(Currently off) ac.cgi:

opmode=0&units=.&settemp=22.0&fanspeed=3&fanflags=1&acmode=2&tonact=0&toffact=0&prog=0&time=16:03&day=3&roomtemp=23&outsidetemp=18&louvre=0&zone=128&flt=0&test=0&errdata=144&sensors=1

(now on) ac.cgi
opmode=1&units=.&settemp=22.0&fanspeed=3&fanflags=1&acmode=2&tonact=0&toffact=0&prog=0&time=16:04&day=3&roomtemp=22&outsidetemp=18&louvre=0&zone=128&flt=0&test=0&errdata=144&sensors=1

so the zone value is 128, zone 1 is only one on.

same issue I pinged you separately about for SkyFi :slight_smile:

1 Like

It’s hard to keep track of everything and still be active at your 9-5 job :stuck_out_tongue:.

1 Like

yeah - tell me about it :slight_smile: – appreciate what ever you can do as usual!

1 Like

That was what I were looking for. Will set up some tests and see if I can figure out what’s going on.

“Luckily” I’m only working 20% (with 88% salary) these days, so I have time to debug and support others units.

2 Likes

no worries. Always happy to help, and appreciative of any assistance given. @Borgy got me started, but now I need super-powers :slight_smile:

The debug log above had both the ac.cgi and zones.cgi output in them, and the error seemed to be related to the numzones “nz” parse which to me meant the parsing of the zone name list was going wrong, rather than the parse of what zones were enabled (but I clearly don’t know the code)

Yes, my misstake.

I’ve found the issue. Do you know how to replace the /usr/local/lib/python3.7/site-packages/pydaikin/daikin_skyfi.py file?

The proposed fix is in: https://bitbucket.org/mustang51/pydaikin/src/skyfi_zones/pydaikin/daikin_skyfi.py

I made an assumption and removed Zone 5, Zone 6 Zone 7 and Zone 8 (if they don’t have customized names they will be excluded).

nope, not yet :slight_smile: @Borgy will teach me and we’ll get back to you shortly :slight_smile:

1 Like

Hmm, /usr/local/lib doesn’t have anything in it - well linux novice me says so anyway.

ls -al /usr/local/lib/python3.7/
no such file or directory

ls -al /usr/local/lib/
(just . and … )

@poundy how are you running home assistant?

If docker is involved, you’ll need to find the right docker volume first (I think).

this is a full RPi setup so with managed docker instance. No idea even how to SSH direct to the Pi; I’m just using the “Terminal & SSH” add-on and looking there??