betaboon / philips-airpurifier-coap

💨 Philips AirPurifier custom component for Home Assistant. With support for new Devices with CoAP protocol. Tested on AC2729/10 (bought early 2020)
70 stars 31 forks source link

AC1214: initial support #5

Closed betaboon closed 3 years ago

betaboon commented 3 years ago

this issue is the place to discuss the initial AC1214 support.

references

raw-data (provided by @bboerendans): https://github.com/betaboon/philips-airpurifier/issues/3#issuecomment-751010937

cc: @bboerendans, @wolfhond

barbatron commented 3 years ago

I get a 500 internal server error from /api/config/core/check_config when validating config. My config yaml:

# Philips AC1214/10 air purifier
fan:
  platform: philips_airpurifier
  host: 192.168.2.130
  model: ac1214
betaboon commented 3 years ago

@barbatron could you try pulling the repo again. i just had to do a force-push due to the previous commits breaking something

barbatron commented 3 years ago

@betaboon Yep got the update just now. Now I get a log entry after restart:

Logger: homeassistant.components.hassio
Source: components/hassio/__init__.py:420
Integration: Hass.io (documentation, issues)
First occurred: 10:19:00 PM (1 occurrences)
Last logged: 10:19:00 PM

Invalid config for [fan.philips_airpurifier]: value is not allowed for dictionary value @ data['model']. Got 'ac1214'. (See ?, line ?)

EDIT I might not have restarted enough (still learning!) - let's see. I do see the const declared so it feels like I wasn't running latest.

betaboon commented 3 years ago

@barbatron just saw that i indeed forgot to add the new models to the configuration structure.

just pushed a commit that should fix it :)

betaboon commented 3 years ago

@barbatron if you get around to it: could you test if all the speed-settings work and match the app for this model ? :)

barbatron commented 3 years ago

@betaboon ok, no warnings to be found in the UI or devtools network calls. Though the entity is displayed as unavailable. Any tips on how I can gather more details? 😬

EDIT: Config validation is OK. Added a name to help distinguish from previous fan config.

betaboon commented 3 years ago

@barbatron you could try getting debug logs. i just added some information on that to the README.md (see: https://github.com/betaboon/philips-airpurifier#debugging)

barbatron commented 3 years ago

@betaboon I see some that looks good:

config $ cat home-assistant.log | grep philips
2020-12-25 22:43:59 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for philips_airpurifier which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-25 22:44:00 INFO (MainThread) [homeassistant.components.fan] Setting up fan.philips_airpurifier
2020-12-25 22:44:02 DEBUG (MainThread) [custom_components.philips_airpurifier.fan] retrieving initial status
2020-12-25 22:44:03 DEBUG (MainThread) [custom_components.philips_airpurifier.fan] {'name': 'Living Room', 'type': 'AC1214', 'modelid': 'AC1214/10', 'swversion': '2.0.0', 'om': '2', 'pwr': '1', 'cl': False, 'aqil': 25, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 2, 'iaql': 1, 'aqit': 4, 'ddp': '0', 'err': 0, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 256, 'fltsts1': 2626, 'fltsts2': 466, 'ota': 'no', 'Runtime': 525017759, 'WifiVersion': 'AWS_Philips_AIR@51.1', 'ProductId': 'dca8c9d2f2ab11e8a1e3061302926720', 'DeviceId': '###xx##x######x#x#x#############', 'StatusType': 'localcontrol', 'ConnectType': 'Localcontrol'}

...and some that might hint of some issue but idk:

2020-12-25 22:44:25 INFO (MainThread) [coap] Retransmission, Message ID: 51395.
2020-12-25 22:44:25 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:44:48 INFO (MainThread) [coap] Retransmission, Message ID: 51395.
2020-12-25 22:44:48 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:45:33 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:45:33 INFO (MainThread) [coap] Exchange timed out
2020-12-25 22:45:34 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:45:35 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:46:16 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:46:17 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:46:27 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:46:29 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:46:41 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:47:05 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:47:07 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:47:10 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
[this goes on and happens every few sec]

I'm installing latest and trying again

barbatron commented 3 years ago

@betaboon Not much new, I believe. Please advise if I can do/run anything in particular to assist. If you know how, I could expose the device to you over vpn :)

config $ cat home-assistant.log | grep -Ei 'coap|philips|aio'
2020-12-25 22:58:39 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for philips_airpurifier which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-25 22:58:41 INFO (MainThread) [homeassistant.components.fan] Setting up fan.philips_airpurifier
2020-12-25 22:58:41 INFO (MainThread) [snitun.utils.aiohttp_client] AioHTTP snitun client started on 127.0.0.1:49595
2020-12-25 22:58:44 DEBUG (MainThread) [custom_components.philips_airpurifier.fan] retrieving initial status
2020-12-25 22:58:44 INFO (MainThread) [snitun.utils.aiohttp_client] AioHTTP snitun client connected to: eu-west-2.ui.nabu.casa:443
2020-12-25 22:58:45 DEBUG (MainThread) [custom_components.philips_airpurifier.fan] {'name': 'Living Room', 'type': 'AC1214', 'modelid': 'AC1214/10', 'swversion': '2.0.0', 'om': '2', 'pwr': '1', 'cl': False, 'aqil': 25, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 3, 'iaql': 1, 'aqit': 4, 'ddp': '0', 'err': 0, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 256, 'fltsts1': 2626, 'fltsts2': 466, 'ota': 'no', 'Runtime': 525920715, 'WifiVersion': 'AWS_Philips_AIR@51.1', 'ProductId': 'dca8c9d2f2ab11e8a1e3061302926720', 'DeviceId': '###xx##x######x#x#x#############', 'StatusType': 'localcontrol', 'ConnectType': 'Localcontrol'}
2020-12-25 22:58:47 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:58:53 INFO (MainThread) [coap] Retransmission, Message ID: 4598.
2020-12-25 22:58:53 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:58:55 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:58:58 INFO (MainThread) [coap] Retransmission, Message ID: 4598.
2020-12-25 22:58:58 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:59:00 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:59:04 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:59:05 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:59:06 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:59:10 INFO (MainThread) [coap] Retransmission, Message ID: 4598.
2020-12-25 22:59:10 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:59:34 INFO (MainThread) [coap] Retransmission, Message ID: 4598.
2020-12-25 22:59:34 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 22:59:59 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:00:06 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:00:20 INFO (MainThread) [coap] Exchange timed out
barbatron commented 3 years ago

@betaboon It seems to work now! 🤷‍♂️😅
image

barbatron commented 3 years ago

@betaboon not sure why, but it's back to "unavailable". I might be doing something wrong. Restarting HA and taking another look at logs/state.

Here's logs from last restart. Grafana shows no new datapoints.

config $ tail -f  home-assistant.log | grep -Ei 'coap|philips|aio'
2020-12-25 23:31:33 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for philips_airpurifier which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-12-25 23:31:41 INFO (MainThread) [homeassistant.components.fan] Setting up fan.philips_airpurifier
2020-12-25 23:31:42 INFO (MainThread) [snitun.utils.aiohttp_client] AioHTTP snitun client started on 127.0.0.1:59007
2020-12-25 23:31:43 DEBUG (MainThread) [custom_components.philips_airpurifier.fan] retrieving initial status
2020-12-25 23:31:45 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:31:45 DEBUG (MainThread) [custom_components.philips_airpurifier.fan] {'name': 'Living Room', 'type': 'AC1214', 'modelid': 'AC1214/10', 'swversion': '2.0.0', 'om': '3', 'pwr': '1', 'cl': False, 'aqil': 50, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 21, 'iaql': 5, 'aqit': 4, 'ddp': '0', 'err': 0, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 255, 'fltsts1': 2625, 'fltsts2': 465, 'ota': 'no', 'Runtime': 527947424, 'WifiVersion': 'AWS_Philips_AIR@51.1', 'ProductId': 'dca8c9d2f2ab11e8a1e3061302926720', 'DeviceId': '###xx##x######x#x#x#############', 'StatusType': 'localcontrol', 'ConnectType': 'Localcontrol'}
2020-12-25 23:31:46 INFO (MainThread) [snitun.utils.aiohttp_client] AioHTTP snitun client connected to: eu-west-2.ui.nabu.casa:443
2020-12-25 23:31:46 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:31:48 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:31:49 INFO (MainThread) [coap] Retransmission, Message ID: 19465.
2020-12-25 23:31:49 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:31:53 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:31:54 INFO (MainThread) [coap] Retransmission, Message ID: 19465.
2020-12-25 23:31:54 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:31:56 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:00 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:03 INFO (MainThread) [coap] Retransmission, Message ID: 19465.
2020-12-25 23:32:03 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:18 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:19 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:23 INFO (MainThread) [coap] Retransmission, Message ID: 19465.
2020-12-25 23:32:23 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:25 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:29 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:32 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:37 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:38 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:39 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:40 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:45 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:48 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:51 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:53 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:54 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:56 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:32:59 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:33:01 INFO (MainThread) [coap] Exchange timed out
2020-12-25 23:33:03 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:33:11 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-25 23:33:14 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
betaboon commented 3 years ago

interesting. i just pushed some more debug-logging for the observation code. could you please try that out?

it might help if you enable debug-logging for coap as well:

logger:
  logs:
    custom_components.philips_airpurifier: debug
    coap: debug
barbatron commented 3 years ago

Is there an expected lag time? In the spirit of proper science I've been trying to only change a single thing per restart/state check, but I'm also seeing periods where connectivity seems to be working. I might be too nooby to know if I've set up sensors correctly. Would the name attribute have any impact on entity id?

image

barbatron commented 3 years ago

Latest tail:

2020-12-26 00:18:26 INFO (MainThread) [custom_components.hacs] Loading known repositories
2020-12-26 00:18:29 INFO (MainThread) [coap] Retransmission, Message ID: 40784.
2020-12-26 00:18:30 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f78a84b80: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:18:30 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:18:35 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77ae9790: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:18:35 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:18:38 INFO (MainThread) [custom_components.hacs] Stage changed: HacsStage.RUNNING
2020-12-26 00:18:44 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f7e1db700: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:18:44 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:18:45 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f78874730: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:18:45 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:18:46 INFO (MainThread) [coap] Retransmission, Message ID: 40784.
2020-12-26 00:18:46 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f7d89cfd0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:18:46 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:19:11 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f79f33e80: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:19:11 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:19:19 INFO (MainThread) [coap] Exchange timed out
2020-12-26 00:19:33 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f7e1ca4c0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:19:33 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:19:53 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f79da8ac0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:19:53 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:20:11 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77ca86d0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:20:11 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:20:13 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f789a28b0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:20:13 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:20:19 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f798683a0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:20:19 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:20:24 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77ae93a0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:20:24 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:20:37 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f775926d0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:20:37 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:20:50 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77ca8c70: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:20:50 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:20:57 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77ae97f0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:20:57 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:21:25 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77cce310: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:21:25 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:21:32 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f78a36fd0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:21:32 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:21:54 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f78a36b50: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:21:54 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:21:58 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f7d89cf40: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:21:58 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:22:53 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77b076d0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:22:53 DEBUG (MainThread) [coap] New unique message received
2020-12-26 00:22:53 DEBUG (MainThread) [coap] Received Response: <aiocoap.Message at 0x7f77b076d0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:22:53 DEBUG (MainThread) [coap] Response <aiocoap.Message at 0x7f77b076d0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload> matched to request <aiocoap.tokenmanager.PlumbingRequest object at 0x7f7d89c640>
2020-12-26 00:23:08 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f775328b0: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:23:08 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 00:23:10 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f77592580: Type.NON 2.05 Content (MID 1, token f964) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 00:23:10 INFO (MainThread) [coap] Duplicate NON, ACK or RST received

...and config yaml:


# Philips AC1214/10 air purifier
fan:
  platform: philips_airpurifier
  host: 192.168.2.130
  model: ac1214

sensor:
  - platform: template
    sensors:
      purifier_aqi:
        friendly_name: "Air Quality Index"
        value_template: "{{ states.fan.philips_airpurifier.attributes.air_quality_index }}"
        unit_of_measurement: "Index"
      purifier_iai:
        friendly_name: "Indoor Allergen index"
        value_template: "{{ states.fan.philips_airpurifier.attributes.indoor_allergen_index }}"
        unit_of_measurement: "Index"
      purifier_speed:
        friendly_name: "Speed"
        value_template: "{{ states.fan.philips_airpurifier.attributes.speed }}"
      purifier_pm25:
        friendly_name: "PM25"
        value_template: "{{ states.fan.philips_airpurifier.attributes.pm25 }}"
        unit_of_measurement: "ppv"
      purifier_mode:
        friendly_name: "Mode"
        value_template: "{{ states.fan.philips_airpurifier.attributes.mode }}"
betaboon commented 3 years ago

can you provide a more complete log? from the very start where the component was started? should start somewhere before retrieving initial status

barbatron commented 3 years ago

Got data, I think my settings and my readings were, or are, lagging. Don't have time to check atm but it seems to be like an hour lagging as before 🤔 I'll get back with timestamps. image

barbatron commented 3 years ago

@betaboon Things do seem to work. I have ~5 minutes between data points (configurable through scan_interval?) and am confused about old entity names lingering ("white_huffer" or similar was not in my config anywhere but numbers are coming in through that name, is it because of the "singleton" fan definition maybe). Also, there seems to be about 8-10 minutes after restart where the fan.[name] entity is listed as "Unavailable" but it pops back after a while.

image

Debug logs from restart to when it popped back on in this gist

One thing I'm missing that is available in the status payload, is the filter names and time-to-change attributes:

{ ... "fltt1":"A3","fltt2":"C7","fltsts0":242,"fltsts1":2612,"fltsts2":452}

where fltt1 and fltt2 seem to be the type codes displayed whenever the filter needs replacement, and the fltsts<number> are some time unit ticking down.

bboerendans commented 3 years ago

Its working almost fine :), took some time before I saw that changing the type in configration.yaml created a new fan with _2

As soon i set the speed to Turbo in HA, it switches to speed 2.

Could it be possible to configure the light brightness from HA too? I can't change that in the app.

betaboon commented 3 years ago

@barbatron i have no clue about the white_huffer entity. regarding the 10min-unavailable: i noticed several models have weird CoAP-behavior. i just pushed a commit that might help with this.

i will add fan-readings next after fixing some bugs.

@bboerendans so you dont have any issues with this model? i will add brightness at some point in the (not so distant) future.

@barbatron can you verify the same behavior regarding the Turbo mode that @bboerendans described?

bboerendans commented 3 years ago

Besides the turbo option, everything is working fine.

Looks like the days remaining for filters is not implemented yet?

Thanks for your work on this integration!

betaboon commented 3 years ago

can you provide state-data for the turbo mode in the following fashion:

barbatron commented 3 years ago

@betaboon First I got no reaction at all from selecting turbo - other modes work great. Last time just now it did select speed 1. Logs below. In my experience even the AirMatters and the previous Philips-endorsed app both have been failing at selecting turbo speed - it's been broken for as long as I've owned the device.

Logs from selecting turbo:

2020-12-26 18:36:14 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f72242af0: Type.NON 2.05 Content (MID 1, token 9ae6) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 18:36:14 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 18:36:16 DEBUG (MainThread) [custom_components.philips_airpurifier.aioairctrl.coap_client] REQUEST: {"state": {"desired": {"CommandType": "app", "DeviceId": "", "EnduserId": "", "pwr": "1", "mode": "M", "om": "t"}}}
2020-12-26 18:36:16 DEBUG (MainThread) [coap] Sending request - Token: 9aed, Remote: <UDP6EndpointAddress 192.168.2.130>
2020-12-26 18:36:16 DEBUG (MainThread) [coap] Sending message <aiocoap.Message at 0x7f716ac4f0: Type.NON POST (MID 51649, token 9aed) remote <UDP6EndpointAddress 192.168.2.130>, 2 option(s), 328 byte(s) payload>
2020-12-26 18:36:16 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f72443280: Type.NON 2.05 Content (MID 51649, token 9aed) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload>
2020-12-26 18:36:16 DEBUG (MainThread) [coap] New unique message received
2020-12-26 18:36:16 DEBUG (MainThread) [coap] Received Response: <aiocoap.Message at 0x7f72443280: Type.NON 2.05 Content (MID 51649, token 9aed) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload>
2020-12-26 18:36:16 DEBUG (MainThread) [coap] Response <aiocoap.Message at 0x7f72443280: Type.NON 2.05 Content (MID 51649, token 9aed) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload> matched to request <aiocoap.tokenmanager.PlumbingRequest object at 0x7f716aca90>
2020-12-26 18:36:16 DEBUG (MainThread) [custom_components.philips_airpurifier.aioairctrl.coap_client] RESPONSE: b'{"status":"success"}'
2020-12-26 18:36:17 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f76f11c10: Type.NON 2.05 Content (MID 1, token 9ae6) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 18:36:17 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 18:36:17 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f7248bd60: Type.NON 2.05 Content (MID 1, token 9ae6) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 18:36:17 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 18:36:21 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f76eb5790: Type.NON 2.05 Content (MID 1, token 9ae6) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 18:36:21 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
2020-12-26 18:36:23 DEBUG (MainThread) [coap] Incoming message <aiocoap.Message at 0x7f76f090a0: Type.NON 2.05 Content (MID 1, token 9ae6) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 3 option(s), 1128 byte(s) payload>
2020-12-26 18:36:23 INFO (MainThread) [coap] Duplicate NON, ACK or RST received
barbatron commented 3 years ago

can you provide state-data for the turbo mode in the following fashion:

  • enable auto-mode
  • enable turbo-mode

@betaboon I got an error when source:ing the script to prep environment on my desktop computer. Don't remember exact output but something-something-"wheel" and some missing prop/member IIRC. Fetching status json then also failed.

When repeating in a new session, the prep script did not print any errors, although fetching status still fails:

# jorbatron @ computer in ~/git/philips-airpurifier on git:dev o [18:52:02]
$ source ./aioairctrl-shell.sh
Requirement already satisfied: pycryptodomex in ./.venv/lib/python3.6/site-packages
Requirement already satisfied: aiocoap==0.4b3 in ./.venv/lib/python3.6/site-packages
(.venv)

# jorbatron @ computer in ~/git/philips-airpurifier on git:dev o [18:52:14]
$ aioairctrl --host 192.168.2.130 status --json
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/jorbatron/git/philips-airpurifier/custom_components/philips_airpurifier/aioairctrl/cli.py", line 118, in <module>
    asyncio.run(main())
AttributeError: module 'asyncio' has no attribute 'run'
(.venv)

When attemping the script on my HA I don't seem to have python3 there 🤷‍♂️ - sorry haven't figured out how to get the tooling in there yet.

philips-airpurifier $ source ./aioairctrl-shell.sh
-bash: python3: command not found

EDIT I got it working by pyenv:ing to 3.8 and then source:ing. I'll follow up with output.

barbatron commented 3 years ago

Not sure if I did this right. I activated auto mode manually. Ran the aioairctrl to get status. Then activated turbo mode manually, and ran it again. This is the output:

# jorbatron @ computer in ~/git/philips-airpurifier on git:dev x [19:23:18]
$ aioairctrl --host 192.168.2.130 status --json
{"name": "Living Room", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "t", "pwr": "1", "cl": false, "aqil": 100, "uil": "1", "dt": 0, "dtrs": 0, "mode": "P", "pm25": 73, "iaql": 10, "aqit": 4, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 235, "fltsts1": 2605, "fltsts2": 445, "ota": "no", "Runtime": 601273088, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "764fb10a926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}

# jorbatron @ computer in ~/git/philips-airpurifier on git:dev x [19:25:10]
$ aioairctrl --host 192.168.2.130 status --json
{"name": "Living Room", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "t", "pwr": "1", "cl": false, "aqil": 100, "uil": "1", "dt": 0, "dtrs": 0, "mode": "M", "pm25": 66, "iaql": 10, "aqit": 4, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 235, "fltsts1": 2605, "fltsts2": 445, "ota": "no", "Runtime": 601302994, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "764fb10a926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}
bboerendans commented 3 years ago

auto mode: {"name": "kantoor", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "1", "pwr": "1", "cl": false, "aqil": 25, "uil": "1", "dt": 0, "dtrs": 0, "mode": "P", "pm25": 6, "iaql": 2, "aqit": 10, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 231, "fltsts1": 3893, "fltsts2": 1394, "ota": "no", "Runtime": 205547885, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "766b1454926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}

Turbo: {"name": "kantoor", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "t", "pwr": "1", "cl": false, "aqil": 25, "uil": "1", "dt": 0, "dtrs": 0, "mode": "M", "pm25": 6, "iaql": 2, "aqit": 10, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 231, "fltsts1": 3893, "fltsts2": 1394, "ota": "no", "Runtime": 205602416, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "766b1454926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}

When i change the speed to turbo via the app, it shows turbo in HA too: image

Manually changing to turbo in HA does not make any difference.

betaboon commented 3 years ago

just so that i get this right: enabling Turbo-mode via the app works and is reflected in HA, enabling Turbo-mode via HA does not work!?

this is very weird. maybe someone can get a pcap of the network-traffic between app and device?

you could try setting the modes manually using aioairctrl: aioairctrl --host $DEVICE_IP --debug set mode=M om=t aioairctrl --host $DEVICE_IP --debug set mode=T om=t

barbatron commented 3 years ago

@betaboon turbo speed is set by that first command:

$ aioairctrl --host 192.168.2.130 --debug set mode=M om=t
DEBUG:philips_airpurifier.aioairctrl.coap_client:syncing
DEBUG:coap:Sending request - Token: 29cd, Remote: <UDP6EndpointAddress 192.168.2.130>
DEBUG:coap:Sending message <aiocoap.Message at 0x7f48746e3250: Type.NON POST (MID 44817, token 29cd) remote <UDP6EndpointAddress 192.168.2.130>, 2 option(s), 8 byte(s) payload>
DEBUG:coap:Incoming message <aiocoap.Message at 0x7f4872fd8d90: Type.NON 2.05 Content (MID 44817, token 29cd) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 8 byte(s) payload>
DEBUG:coap:New unique message received
DEBUG:coap:Received Response: <aiocoap.Message at 0x7f4872fd8d90: Type.NON 2.05 Content (MID 44817, token 29cd) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 8 byte(s) payload>
DEBUG:coap:Response <aiocoap.Message at 0x7f4872fd8d90: Type.NON 2.05 Content (MID 44817, token 29cd) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 8 byte(s) payload> matched to request <aiocoap.tokenmanager.PlumbingRequest object at 0x7f4872fd8b80>
DEBUG:philips_airpurifier.aioairctrl.coap_client:synced: 75F11BAA
DEBUG:philips_airpurifier.aioairctrl.coap_client:REQUEST: {"state": {"desired": {"CommandType": "app", "DeviceId": "", "EnduserId": "", "mode": "M", "om": "t"}}}
DEBUG:coap:Sending request - Token: 29ce, Remote: <UDP6EndpointAddress 192.168.2.130>
DEBUG:coap:Sending message <aiocoap.Message at 0x7f4872fd8df0: Type.NON POST (MID 44818, token 29ce) remote <UDP6EndpointAddress 192.168.2.130>, 2 option(s), 296 byte(s) payload>
DEBUG:coap:Incoming message <aiocoap.Message at 0x7f48746e3220: Type.NON 2.05 Content (MID 44818, token 29ce) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload>
DEBUG:coap:New unique message received
DEBUG:coap:Received Response: <aiocoap.Message at 0x7f48746e3220: Type.NON 2.05 Content (MID 44818, token 29ce) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload>
DEBUG:coap:Response <aiocoap.Message at 0x7f48746e3220: Type.NON 2.05 Content (MID 44818, token 29ce) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload> matched to request <aiocoap.tokenmanager.PlumbingRequest object at 0x7f48746e3f10>
DEBUG:philips_airpurifier.aioairctrl.coap_client:RESPONSE: b'{"status":"success"}'
DEBUG:coap:Shutting down context

PCAP is all encrypted but speaks with AWS EC2, lmk if it is of interest.

Second command also successfully sets turbo mode:

$ aioairctrl --host 192.168.2.130 --debug set mode=T om=t
DEBUG:philips_airpurifier.aioairctrl.coap_client:syncing
DEBUG:coap:Sending request - Token: 8445, Remote: <UDP6EndpointAddress 192.168.2.130>
DEBUG:coap:Sending message <aiocoap.Message at 0x7fc3717de250: Type.NON POST (MID 35064, token 8445) remote <UDP6EndpointAddress 192.168.2.130>, 2 option(s), 8 byte(s) payload>
DEBUG:coap:Incoming message <aiocoap.Message at 0x7fc3700d3d90: Type.NON 2.05 Content (MID 35064, token 8445) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 8 byte(s) payload>
DEBUG:coap:New unique message received
DEBUG:coap:Received Response: <aiocoap.Message at 0x7fc3700d3d90: Type.NON 2.05 Content (MID 35064, token 8445) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 8 byte(s) payload>
DEBUG:coap:Response <aiocoap.Message at 0x7fc3700d3d90: Type.NON 2.05 Content (MID 35064, token 8445) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 8 byte(s) payload> matched to request <aiocoap.tokenmanager.PlumbingRequest object at 0x7fc3700d3b80>
DEBUG:philips_airpurifier.aioairctrl.coap_client:synced: 045E1F76
DEBUG:philips_airpurifier.aioairctrl.coap_client:REQUEST: {"state": {"desired": {"CommandType": "app", "DeviceId": "", "EnduserId": "", "mode": "T", "om": "t"}}}
DEBUG:coap:Sending request - Token: 8446, Remote: <UDP6EndpointAddress 192.168.2.130>
DEBUG:coap:Sending message <aiocoap.Message at 0x7fc3700d3df0: Type.NON POST (MID 35065, token 8446) remote <UDP6EndpointAddress 192.168.2.130>, 2 option(s), 296 byte(s) payload>
DEBUG:coap:Incoming message <aiocoap.Message at 0x7fc3717de220: Type.NON 2.05 Content (MID 35065, token 8446) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload>
DEBUG:coap:New unique message received
DEBUG:coap:Received Response: <aiocoap.Message at 0x7fc3717de220: Type.NON 2.05 Content (MID 35065, token 8446) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload>
DEBUG:coap:Response <aiocoap.Message at 0x7fc3717de220: Type.NON 2.05 Content (MID 35065, token 8446) remote <UDP6EndpointAddress 192.168.2.130 with local address>, 1 option(s), 20 byte(s) payload> matched to request <aiocoap.tokenmanager.PlumbingRequest object at 0x7fc3717def10>
DEBUG:philips_airpurifier.aioairctrl.coap_client:RESPONSE: b'{"status":"success"}'
DEBUG:coap:Shutting down context
betaboon commented 3 years ago

@barbatron can you try with the following settings as well: aioairctrl --host $DEVICE_IP --debug set pwr=1 mode=M om=t aioairctrl --host $DEVICE_IP --debug set pwr=1 mode=T om=t

barbatron commented 3 years ago

@betaboon they both work fine.

I am resetting speed through the AirMatters app in between attempts. I just updated to latest commit on dev so the device is in the "unavailable" 8-10 minute atm, so haven't been able to test through HA yet

betaboon commented 3 years ago

it is very weird that setting them like this manually seems to work, but not through HA, as those are the exact values that are being sent.

for the "unavailable"-issue: can you provide a debug-log ? :dagger: (thanks for your assistance)

bboerendans commented 3 years ago

Did some steps to figure out if we could find some differences: Opened HA, and changed the status to speed 3: {"name": "kantoor", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "3", "pwr": "1", "cl": false, "aqil": 25, "uil": "1", "dt": 0, "dtrs": 0, "mode": "M", "pm25": 4, "iaql": 1, "aqit": 10, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 214, "fltsts1": 3876, "fltsts2": 1377, "ota": "no", "Runtime": 265933110, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "766b1454926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}

switchting to alergen mode: devices gives beep, {"name": "kantoor", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "2", "pwr": "1", "cl": false, "aqil": 25, "uil": "1", "dt": 0, "dtrs": 0, "mode": "A", "pm25": 4, "iaql": 1, "aqit": 10, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 214, "fltsts1": 3876, "fltsts2": 1377, "ota": "no", "Runtime": 266001682, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "766b1454926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}

switchting to turbo mode: devices gives beep, and slows down the fan {"name": "kantoor", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "1", "pwr": "1", "cl": false, "aqil": 25, "uil": "1", "dt": 0, "dtrs": 0, "mode": "M", "pm25": 9, "iaql": 3, "aqit": 10, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 214, "fltsts1": 3876, "fltsts2": 1377, "ota": "no", "Runtime": 266069545, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "766b1454926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}

When i open the app, the speeds shows 1. As soon as i change the speed to turbo via the app: {"name": "kantoor", "type": "AC1214", "modelid": "AC1214/10", "swversion": "2.0.0", "om": "t", "pwr": "1", "cl": false, "aqil": 25, "uil": "1", "dt": 0, "dtrs": 0, "mode": "M", "pm25": 4, "iaql": 1, "aqit": 10, "ddp": "0", "err": 0, "fltt1": "A3", "fltt2": "C7", "fltsts0": 214, "fltsts1": 3876, "fltsts2": 1377, "ota": "no", "Runtime": 266176419, "WifiVersion": "AWS_Philips_AIR@51.1", "ProductId": "dca8c9d2f2ab11e8a1e3061302926720", "DeviceId": "766b1454926511e9a1e3061302926720", "StatusType": "localcontrol", "ConnectType": "Localcontrol"}

So, looks like via HA it should do "om": "t" and "mode": "M" if i'm correctly?

betaboon commented 3 years ago

@bboerendans mode=M om=t is weirdly enough exactly what we are currently using: https://github.com/betaboon/philips-airpurifier/blob/dev/custom_components/philips_airpurifier/fan.py#L325

betaboon commented 3 years ago

i just pushed a commit that tries to set mode=T om=t (as some other models do) (see: https://github.com/betaboon/philips-airpurifier/commit/38c2eaa2aab5e37e2095cff0fcfe0266aa6cfe8b) maybe you could test and report back :)

barbatron commented 3 years ago

@betaboon debug log from restart to some time after when it popped back on here: https://gist.github.com/barbatron/3a637e68415502973eafda765ccad742

barbatron commented 3 years ago

Turbo mode in HA works fine for me now, again. I believe I was on d4d0e9c9cbb3517b81ff99c7a75ec8a804337e03. Speed 1, 3 and t works fine, but speed 2 didn't 😅 Sometimes nothing happens when I select a new speed in HA - it's just ignored.

Will try again after update/rediscovery.

barbatron commented 3 years ago

@betaboon switching around randomly everything seems to work fine now. Installed SHA is 38c2eaa. I do have the occasional message that seems to get dropped or ignored but mostly it's all 👍

EDIT I can't switch to speed 1. Nothing shows up in the debug log when issuing the change

betaboon commented 3 years ago

@barbatron my device sometimes reports {"status": "success"} when sending a command but it actually doesn't do anything. not much i can do in that cases i fear.

barbatron commented 3 years ago

Now it's speed 2. I'm not even seeing a request such as REQUEST: {"state": {"desired": {"CommandType": "app", "DeviceId": "", "EnduserId": "", "pwr": "1", "mode": "M", "om": "1"}}} , are state changes/requests ignored when deemed duplicate/no-change?

EDIT When I wait for the occasional observation status in the logs and then issue the change, it is applied and sets the speed I selected.

betaboon commented 3 years ago

nope there is no logic for that. a note on home-assistant.log: i noticed that file doesn't seem to get written to immediately. it seems to get written to in chunks

bboerendans commented 3 years ago

with the last update Turbo is working for me 👍

bboerendans commented 3 years ago

Super! Filter data is working fine too 💯 image

betaboon commented 3 years ago

i just pushed services for:

it would be great if you could test it :)

wolfhond commented 3 years ago

@bboerendans How do you have made that card? And now installing latest version it is unavailable.

wolfhond commented 3 years ago

what is the best method to install the newest version. just overwrite en reboot? Or?

betaboon commented 3 years ago

either: install using HACS -> update there -> restart using server-controls or: override -> restart using server-controls

betaboon commented 3 years ago

it is not yet officially included in HACS. you would need to add it as a custom Repository

wolfhond commented 3 years ago

@betaboon found it ;-)

bboerendans commented 3 years ago

@betaboon child_lock: false light_brightness: 25 display_backlight: true

edit: ah just found the services to test if i will change. Will test later on today.

This device does not have the option for

bboerendans commented 3 years ago

@bboerendans How do you have made that card? And now installing latest version it is unavailable.

@wolfhond It's the default entity card, with custom:mini-graph-card in the footer.

wolfhond commented 3 years ago

I think I look totally wrong.

But when I make a entity card I can only add fan.philips_airpurifier thats it. I have no sensors.

I add this: fan: platform: philips_airpurifier host: 192.168.1.46 model: ac1214 sensor: