fredrike / pydaikin

GNU General Public License v3.0
2 stars 4 forks source link

Zone control not working on airbase #10

Closed mover85 closed 19 hours ago

mover85 commented 3 weeks ago

I have tested the latest release and zone control has stopped working. I found there is a missing parameter and a problem with aiohttp encoding parameters. If I visit the url in browser it works fine.

2024-06-12 19:27:41.774 DEBUG (MainThread) [pydaikin.daikin_base] Calling: http://ip/skyfi/aircon/get_zone_setting {} 2024-06-12 19:27:41.879 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=OK,zone_name=%41%61%72%6f%6e%3b%4d%61%73%74%65%72%20%42%65%64%3b%53%70%61%72%65%20%42%65%64%3b%4c%6f%75%6e%67%65%3b%4f%66%66%69%63%65%3b%44%69%6e%69%6e%67%3b%48%61%6c%6c%77%61%79%3b%4b%69%74%63%68%65%6e,zone_onoff=1%3b0%3b0%3b0%3b0%3b0%3b1%3b1,lztemp_c=21%3b21%3b21%3b21%3b21%3b21%3b21%3b21,lztemp_h=20%3b20%3b20%3b20%3b20%3b20%3b19%3b19 2024-06-12 19:27:41.879 DEBUG (MainThread) [pydaikin.daikin_airbase] Sending request to aircon/set_zone_setting with params: {'zone_name': '%41%61%72%6f%6e%3b%4d%61%73%74%65%72%20%42%65%64%3b%53%70%61%72%65%20%42%65%64%3b%4c%6f%75%6e%67%65%3b%4f%66%66%69%63%65%3b%44%69%6e%69%6e%67%3b%48%61%6c%6c%77%61%79%3b%4b%69%74%63%68%65%6e', 'zone_onoff': '1%3b0%3b0%3b0%3b0%3b0%3b1%3b1', 'lztemp_c': '21%3b21%3b21%3b21%3b21%3b21%3b21%3b21', 'lztemp_h': '20%3b20%3b20%3b20%3b20%3b20%3b19%3b20'} 2024-06-12 19:27:41.879 DEBUG (MainThread) [pydaikin.daikin_base] Calling: http://ip/skyfi/aircon/set_zone_setting {'zone_name': '%41%61%72%6f%6e%3b%4d%61%73%74%65%72%20%42%65%64%3b%53%70%61%72%65%20%42%65%64%3b%4c%6f%75%6e%67%65%3b%4f%66%66%69%63%65%3b%44%69%6e%69%6e%67%3b%48%61%6c%6c%77%61%79%3b%4b%69%74%63%68%65%6e', 'zone_onoff': '1%3b0%3b0%3b0%3b0%3b0%3b1%3b1', 'lztemp_c': '21%3b21%3b21%3b21%3b21%3b21%3b21%3b21', 'lztemp_h': '20%3b20%3b20%3b20%3b20%3b20%3b19%3b20'} 2024-06-12 19:27:41.983 DEBUG (MainThread) [pydaikin.daikin_airbase] Parsing ret=PARAM NG

fredrike commented 3 weeks ago

@mover85 Isn't this your change?

https://bitbucket.org/mustang51/pydaikin/pull-requests/83/diff

fredrike commented 3 weeks ago

Or perhaps this: https://bitbucket.org/mustang51/pydaikin/pull-requests/72/diff#chg-pydaikin/daikin_skyfi.py

kingy444 commented 3 weeks ago

found the issue - but i cant see where it happened. Somewhere magical in git land the set_zone function changed itself 😄

Fix Zone tempretature set_zone was using a query string zone-temperature-fix set_zone moved to a params query (but that change was not in that commit)

I am reverting the set_zone function to a query string now

image

fredrike commented 3 weeks ago

This is the commit that stopped using query string: https://github.com/fredrike/pydaikin/commit/344bdec476561b639501d58e56116c74bd90af14#diff-1f315c78265b431fecc17d42b8949e2305e6c663e4f599ce17386bc7286fd9c5