It’s hard to keep track of everything and still be active at your 9-5 job .
yeah - tell me about it – appreciate what ever you can do as usual!
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.
no worries. Always happy to help, and appreciative of any assistance given. @Borgy got me started, but now I need super-powers
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).
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??
FYI it is working perfectly for me at version: Home Assistant 0.111.0
oh cool. Skyfi? If so, what zones do you have - would be nice to pass your zones response thru the above new code to confirm no breaking change for you there too.
I’m still looking to see if I can figure out how to get under the hood at all to replace files. Not sure it’ll be a quick thing for me to be able to test this
My zones are separate, manual push-button controller.
OK, in case the fix that made it to 0.111.4 was meant to address this (I really don’t know if it was) then it didn’t address it (on my already-configured integration).
2020-06-18 11:45:19 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
That one happened immediately after the .4 update finished applying, followed by:
2020-06-18 11:49:28 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=11:51&day=3&roomtemp=22&outsidetemp=17&louvre=0&zone=192&flt=0&test=0&errdata=144&sensors=1
2020-06-18 11:49:29 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-18 11:50:28 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['ac.cgi?pass={}', 'zones.cgi?pass={}']
2020-06-18 11:50:31 DEBUG (MainThread) [pydaikin.daikin_skyfi] ClientResponseError("400, message='invalid constant string', url='http://192.168.3.0:2000/ac.cgi?pass=12345") #0
I still haven’t got direct SSH access to the docker base, to test out replacing the file as per above. I’m a Windows user and have not managed to figure out reliably how to get SSH keys loaded and a service running as per https://developers.home-assistant.io/docs/operating-system/debugging/ but haven’t had too much time to look further.
Hi Team - great work on this plugin.
Have it working for the base functions but the zone switching isn’t appearing. Found this in the logs.
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
Extra details
Home Assistant 0.111.4
I know the URL (setzone.cgi?pass=XXXX&z=1&s=0)
Zone names = Zone 1 , Zone 2 (i had them as custom names previously which didn’t work either)
Any suggestions ?
Thanks
Andrew
Hi Andrew,
that’s the same bug that this thread is about - there’s an impending fix but I can’t test it to confirm that it’s fixed. Are you using this on a RPi (or other HASS OS + Docker ) build, or do you have access to replace underlying code to test the fix?
Ok great - good to see I’m in the right place
I am using HASS OS on Rpi , but easy enough for me to spin up an instance on another Pi or Docker to test - do you have a quick guide of what needs to be done?
Just this from @fredrike from earlier in this thread: Daikin Skyfi and 0.111.0 - first time use - no zones detected
Hopefully that puts you in a good place.
My linux and docker fu is pretty much non-existent so that’s why I haven’t cracked how best to test this. My GIT fu is equally deficient to know whether the above bitbucket chunk has made it into a release (I think 0.112 is dropping in the next 24 hours)
I just spun up a new https://hub.docker.com/r/homeassistant/home-assistant/ and it is on 0.111.1 , and the zones appear no problems.
My hass.io build is 0.111.4 and its broken there. Looks like i’ll have to dig out a Pi and try on 0.111.4
OK, so run up a https://hub.docker.com/r/homeassistant/home-assistant/
set the version in compose to 0.111.4
Zones have dissappeared when moving to 0.111.4
version: '3'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant:0.111.4
volumes:
- ./config/:/config
environment:
- TZ=Australia/Sydney
restart: always
network_mode: host
ran docker-compose up -d
serveradmin@dockerbox-dev01:~/riley-container-dev/docker-hass$ docker logs home-assistant
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing...
starting version 3.2.9
[17:24:17] INFO: Update udev information
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2020-06-30 17:24:29 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
Will retest shortly just to make sure I didn’t miss something.