fredrike / pydaikin

GNU General Public License v3.0
8 stars 9 forks source link

Streamer function doen't work #18

Closed fredrike closed 3 weeks ago

fredrike commented 3 weeks ago

Accroding to https://github.com/home-assistant/core/issues/123539 there is an issue in streamer function.

The code (https://github.com/fredrike/pydaikin/blame/7de7166e4c23a898d455b677b2441521d3a6483f/pydaikin/daikin_brp069.py#L218) was updated by @icovada in https://github.com/fredrike/pydaikin/commit/344bdec476561b639501d58e56116c74bd90af14.

@icovada do you know the reson for changing the way we are updating the streamer?

Old:

query_h = 'aircon/set_special_mode?en_streamer=%s' % value

New:

path = 'aircon/set_special_mode'
params = {
    "streamer": mode,
    "set_spmode": value,
}

The parameters are not even close to the same..

fredrike commented 3 weeks ago

Here are logs from v2.14.4:

2024-08-10 13:43:09.803 WARNING (MainThread) [homeassistant.components.esphome.manager] Error getting setting up connection for 192.168.1.44: Connection closed
2024-08-10 13:43:12.093 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for sensoritenda @ 192.168.1.55: Error while starting connection: Starting connection cancelled (APIConnectionCancelledError)
2024-08-10 13:43:12.658 ERROR (MainThread) [homeassistant.components.esphome.manager] Unexpected device found at 192.168.1.44; expected `sensoritenda` with mac address `e0:98:06:93:4d:1b`, found `sensoritenda` with mac address `68:c6:3a:d1:4e:12`
2024-08-10 13:43:15.156 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.sensoritenda_actual_gain_2 (<class 'homeassistant.components.esphome.sensor.EsphomeSensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('illuminance') it is using; expected one of ['lx']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+esphome%22
2024-08-10 14:15:17.601 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.soggiorno_inside_temperature is taking over 10 seconds
2024-08-10 14:15:37.602 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2024-08-10 15:23:18.706 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending request to aircon/set_special_mode with params: {'streamer': 'on', 'set_spmode': '1'}
2024-08-10 15:23:18.708 DEBUG (MainThread) [pydaikin.daikin_base] Calling: http://192.168.1.11/aircon/set_special_mode {'streamer': 'on', 'set_spmode': '1'}
2024-08-10 15:23:21.151 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending request to aircon/set_special_mode with params: {'streamer': 'on', 'set_spmode': '1'}
2024-08-10 15:23:21.152 DEBUG (MainThread) [pydaikin.daikin_base] Calling: http://192.168.1.12/aircon/set_special_mode {'streamer': 'on', 'set_spmode': '1'}
2024-08-10 15:49:27.456 DEBUG (MainThread) [homeassistant.components.daikin.config_flow] Zeroconf user_input: ZeroconfServiceInfo(ip_address=ZeroconfIPv4Address('192.168.1.11'), ip_addresses=[ZeroconfIPv4Address('192.168.1.11')], port=80, hostname='DaikinAP10674-2.local.', type='_dkapi._tcp.local.', name='DkApi-2._dkapi._tcp.local.', properties={'reg': 'eu', 'type': 'aircon', 'ver': '1_14_88', 'adp_kind': '3'})
2024-08-10 15:49:27.471 DEBUG (MainThread) [pydaikin.discovery] Discovered ('192.168.1.11', 49156), ret=OK,type=aircon,reg=eu,dst=1,ver=1_14_88,rev=8A618141,pow=1,err=0,location=0,name=%53%6f%67%67%69%6f%72%6e%6f,icon=1,method=polling,port=30050,id=6150bc20-89c6-4ac9-8004-5e43b6637835,pw=,lpw_flag=0,adp_kind=3,pv=3.30,cpv=3,cpv_minor=20,led=1,en_setzone=1,mac=80913313D356,adp_mode=run,en_hol=0,ssid1=Coppermine,radio1=-58,ssid=DaikinAP10674,grp_name=,en_grp=0
2024-08-10 15:49:28.477 DEBUG (MainThread) [homeassistant.components.daikin.config_flow] Zeroconf user_input: ZeroconfServiceInfo(ip_address=ZeroconfIPv4Address('192.168.1.12'), ip_addresses=[ZeroconfIPv4Address('192.168.1.12')], port=80, hostname='DaikinAP25159.local.', type='_dkapi._tcp.local.', name='DkApi._dkapi._tcp.local.', properties={'reg': 'eu', 'type': 'aircon', 'ver': '1_14_88', 'adp_kind': '3'})
2024-08-10 15:49:28.484 DEBUG (MainThread) [pydaikin.discovery] Discovered ('192.168.1.12', 49156), ret=OK,type=aircon,reg=eu,dst=1,ver=1_14_88,rev=8A618141,pow=1,err=0,location=0,name=%43%61%6d%65%72%61,icon=3,method=polling,port=30050,id=c2bd23d1-1999-42da-bc55-7cf31d917aed,pw=,lpw_flag=0,adp_kind=3,pv=3.30,cpv=3,cpv_minor=20,led=1,en_setzone=1,mac=D0C5D35B3D93,adp_mode=run,en_hol=0,ssid1=Coppermine,radio1=-35,ssid=DaikinAP25159,grp_name=,en_grp=0
2024-08-10 15:49:33.966 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending request to aircon/set_special_mode with params: {'streamer': 'on', 'set_spmode': '1'}
2024-08-10 15:49:33.967 DEBUG (MainThread) [pydaikin.daikin_base] Calling: http://192.168.1.11/aircon/set_special_mode {'streamer': 'on', 'set_spmode': '1'}
2024-08-10 15:49:35.980 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending request to aircon/set_special_mode with params: {'streamer': 'on', 'set_spmode': '1'}
2024-08-10 15:49:35.981 DEBUG (MainThread) [pydaikin.daikin_base] Calling: http://192.168.1.12/aircon/set_special_mode {'streamer': 'on', 'set_spmode': '1'}
fredrike commented 3 weeks ago

The problem

In the Daikin integration is possible control the stramer (air purify) of Daikin A/C. With the 2024.8.0 the ON/OFF toggles button not enable or disable the air purify. The ON/OFF toggles switch run, but after 2 seconds is retorn in previous state With 2024.7.3 it was OK. I use BRP069B4X wifi controller

What version of Home Assistant Core has the issue?

2024.8.0

What was the last working version of Home Assistant Core?

2024.7.3

Diagnostics information

home-assistant_daikin_2024-08-10T13-23-50.085Z.log

@Nerone1979, it would be great with debug output from 2024.7.3 too..

Nerone1979 commented 3 weeks ago

Here the log using 2024.7.3 version home-assistant_daikin_2024-08-22T15-36-26.881Z.log

fredrike commented 3 weeks ago

Here the log using 2024.7.3 version home-assistant_daikin_2024-08-22T15-36-26.881Z.log

Perfect, I'll release a new version of pydaikin. Sorry for the inconvenience.

2024-08-22 15:54:01.488 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2024-08-22 15:54:31.489 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2024-08-22 17:20:15.311 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending query: aircon/set_special_mode?en_streamer=1
2024-08-22 17:20:16.598 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending query: aircon/set_special_mode?en_streamer=1
2024-08-22 17:20:22.860 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending query: aircon/set_special_mode?en_streamer=0
2024-08-22 17:20:23.899 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending query: aircon/set_special_mode?en_streamer=0
2024-08-22 17:20:32.187 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2024-08-22 17:20:32.205 DEBUG (MainThread) [pydaikin.daikin_base] Updating ['aircon/get_sensor_info', 'aircon/get_control_info', 'aircon/get_day_power_ex', 'aircon/get_week_power', 'aircon/get_day_power_ex', 'aircon/get_week_power']
2024-08-22 17:21:55.805 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending query: aircon/set_special_mode?en_streamer=1
2024-08-22 17:21:57.815 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending query: aircon/set_special_mode?en_streamer=1
2024-08-22 17:22:03.994 DEBUG (MainThread) [pydaikin.daikin_brp069] Sending query: aircon/set_special_mode?en_streamer=0