Closed kine90 closed 1 year ago
- I can set the speed only to 75% max,
In the code there is a turbo
speed setting. Does your device have a turbo mode?
- is not possible anymore to turn it on
This feels like the connectivity problem. Not sure if this can be fixed. Was that the same with the previous betaboon integration?
- "Set preset" commands to "auto", "night", or "allergen" have no effect.
This is strange. It might also explain why you don't get full speed in the turbo
mode, as this is set in a similar way as the presets. Can you please enable debug logging and share a log with the response data from the device?
- Child-lock switch don´t show up.
There is no child-lock for this device in the code right now. I've added this for the next release. Thanks for pointing that out.
- Backlight controls and brightness don´t work
Again, please post a debug log with the data.
child lock switch added in v0.9.5
Hi, thanks for following back! I´ve reverted to Betaboon to keep some automations and flows going. I will re-install your version and provide the logs as soon I have some time, probably tomorrow. For now I can say:
Regarding the modes, I´ve noticed that, when calling fan.set_preset for Turbo, Allergen or Night mode, my device doesn´t even emit any beep to notify a received command, while calling set_preset Auto always results in a beep from the device. Also, using Betaboon, there are times when the device is off and simply sending fan.switch_on does not work. In these cases, adding set_preset to Auto brings back the device on in manual mode. May it be some kind of state-machine logic defining how the commands are interpreted according to the current purifier state?
These are interesting observations. As my work builds on betaboon, the internal settings logics are pretty much the same. If you discover a wake up method, that's worth understanding and verifying. Please keep observing and reporting.
The WiFi firmware seems to be the latest from Philips.
I think the next bit to look into is the question why the preset modes are always empty. Before controlling anything, you should at least see the current data. Can you post a full log of the device response. It should be a show up if you enable debug logging in HA for the integration.
Concerning: "Set preset" commands to "auto", "night", or "allergen" have no effect. As Im also using the AC1214 and experienced the same issue.
Found the following lines in Philips.py line 372
# TODO consolidate these classes as soon as we see a proper pattern
class PhilipsAC1214(PhilipsGenericCoAPFan):
AVAILABLE_PRESET_MODES = {
PRESET_MODE_AUTO: {PHILIPS_POWER: "1", PHILIPS_MODE: "P"},
PRESET_MODE_ALLERGEN: {PHILIPS_POWER: "1", PHILIPS_MODE: "A"},
# make speeds available as preset
PRESET_MODE_NIGHT: {PHILIPS_POWER: "1", PHILIPS_MODE: "N"},
SPEED_1: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "1"},
SPEED_2: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "2"},
SPEED_3: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "3"},
PRESET_MODE_TURBO: {PHILIPS_POWER: "1", PHILIPS_MODE: "T", PHILIPS_SPEED: "t"},
}
AVAILABLE_SPEEDS = {
PRESET_MODE_NIGHT: {PHILIPS_POWER: "1", PHILIPS_MODE: "N"},
SPEED_1: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "1"},
SPEED_2: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "2"},
SPEED_3: {PHILIPS_POWER: "1", PHILIPS_MODE: "M", PHILIPS_SPEED: "3"},
PRESET_MODE_TURBO: {PHILIPS_POWER: "1", PHILIPS_MODE: "T", PHILIPS_SPEED: "t"},
}
AVAILABLE_SWITCHES = [PHILIPS_CHILD_LOCK]
Removed: PHILIPS_POWER: "1" on all lines Changed for TURBO: PHILIPS_MODE: "T", to PHILIPS_MODE: "M",
I have no further knowledge on the subject, just edited this(trail and error) to get my automation working again and havent experienced any errors because of this change. Hope it may help!
Thanks for keeping the integration alive.
Found the following lines in Philips.py line 372
Yes, you find the right place where the specific settings for the AC1214 are defined :-)
The PHILIPS_POWER: "1"
is supposed to make sure that the device can switch on should it be off when setting one of the modes. It feels strange that you remove it. Just to be clear: you eliminate that bit and when the device is off, you can still select a preset mode and the device switches on in that selected preset mode?
With your change for the TURBO mode, is the device then working as expected for TURBO? Other devices have the same pattern that you discovered. If you confirm that this works, I'll change it in the code.
@lwd1991 what might be insightful is if you enable debug logging or directly try to use aioairctrl
from the command line to report back the answer message from the device for the various preset modes. Can you post that here?
No, after removing PHILIPS_POWER: "1" device does not switch on when selecting preset. Observed the following:
For Turbo mode, in my case at least, I can confirm this change made it working again. Besides above mentioned for switching from AUTO or NIGHT.
Ill enable logging and try to use aioairctrl
and get back to you when I have time.
For me this remedy solves my issues, hopefully this helps you and the topic starter a bit. Thanks for your time.
Hm, very fascinating. Thanks for clarifying. That feels like switching on and selecting the preset have to be separate actions and cannot be done in one call.
With Turbo mode, I'll change the setting. If that breaks for other AC1214 owners, I'll probably hear from them ;-)
I'd like to bring some structure into this. As far as I understand, we have three issues and three hypotheses for solutions:
turbo
mode needs code m
on this device: fixedauto
or night
doesn't work: #24Can someone with an AC1214 please check v0.10.1-beta1214.2
and report back what works and what doesn't?
Hi kongo09, thanks a lot for this release! It took a while but finally I had the time to test. The installation was smooth, first impressions are very positive. Everything is working out-of-the-box, except:
Tricky point: If the purifier goes into "Night mode" it remains stuck there. Whatever other mode you try to activate, the purifier blinks but does not execute the command, except for Auto. So, if the purifier is in Night mode and you want to change, i.e. to Turbo, first you have to recall Auto. Then you can switch to Turbo. Once known, one can script something to check the purifier mode and send an "Auto" command in case it needs to be awaken from being stuck into Night, but it would be nicer if this is implemented in the integration and happens in background. Unfortunately, this purifier comes with a light sensor, to set automatically Night mode under a certain brightness, so the chances to get stuck are hight.
However, brilliant work, this is the best Philips AC1214 integration I´ve tried so far. Thank you!
After fewo hours it stopped working and never come back, even powercycling the purifier and HA. HA log gives the following errors:
Logger: homeassistant.components.fan
Source: custom_components/philips_airpurifier_coap/philips.py:151
Integration: Fan (documentation, issues)
First occurred: 1:24:14 PM (1 occurrences)
Last logged: 1:24:14 PM
Error while setting up philips_airpurifier_coap platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/philips_airpurifier_coap/fan.py", line 41, in async_setup_entry
device = model_class(
File "/config/custom_components/philips_airpurifier_coap/philips.py", line 243, in __init__
super().__init__(coordinator, model, name)
File "/config/custom_components/philips_airpurifier_coap/philips.py", line 201, in __init__
super().__init__(coordinator)
File "/config/custom_components/philips_airpurifier_coap/philips.py", line 151, in __init__
self._serialNumber = coordinator.status["DeviceId"]
TypeError: tuple indices must be integers or slices, not str
Logger: homeassistant.components.switch
Source: custom_components/philips_airpurifier_coap/philips.py:151
Integration: Switch (documentation, issues)
First occurred: 1:24:14 PM (1 occurrences)
Last logged: 1:24:14 PM
Error while setting up philips_airpurifier_coap platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/philips_airpurifier_coap/switch.py", line 67, in async_setup_entry
switches.append(PhilipsSwitch(coordinator, name, model, switch))
File "/config/custom_components/philips_airpurifier_coap/switch.py", line 88, in __init__
super().__init__(coordinator)
File "/config/custom_components/philips_airpurifier_coap/philips.py", line 151, in __init__
self._serialNumber = coordinator.status["DeviceId"]
TypeError: tuple indices must be integers or slices, not str
Logger: homeassistant.components.light
Source: custom_components/philips_airpurifier_coap/philips.py:151
Integration: Light (documentation, issues)
First occurred: 1:24:14 PM (1 occurrences)
Last logged: 1:24:14 PM
Error while setting up philips_airpurifier_coap platform for light
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/philips_airpurifier_coap/light.py", line 72, in async_setup_entry
lights.append(PhilipsLight(coordinator, name, model, light))
File "/config/custom_components/philips_airpurifier_coap/light.py", line 93, in __init__
super().__init__(coordinator)
File "/config/custom_components/philips_airpurifier_coap/philips.py", line 151, in __init__
self._serialNumber = coordinator.status["DeviceId"]
TypeError: tuple indices must be integers or slices, not str
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/philips_airpurifier_coap/config_flow.py:94
Integration: Philips AirPurifier (documentation, issues)
First occurred: 1:24:46 PM (1 occurrences)
Last logged: 1:24:46 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 222, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 249, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data, init_done)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/philips_airpurifier_coap/config_flow.py", line 94, in async_step_dhcp
self._model = status['type']
TypeError: tuple indices must be integers or slices, not str
TypeError: tuple indices must be integers or slices, not str
This looks like a new error. I've never seen this before. Did you change anything in the last few days before it broke? Update of HA core maybe? Please file a new bug report for this.
Yes, the update of HA core to version 2022.8.4 - August 12 seems to coincide with the moment I´ve lost the purifier. I´ve started a new issue. Thanks!
The issue seems to be solved updating to the last version for AC1214/10. After one week of successful testing I made a pull request to merge it to the main branch. #52
I´ve just updated the integration for my purifier, before I was using the one from Betaboon.
In comparison, this loads much faster when HA is restarted. The connection seems to be working fine.
I can set the speed only to 75% max, everything above is ignored (which I guess would be the turbo speed).
If the purifier is switched off or set to 0% speed, it stops sending sensor data and is not possible anymore to turn it on, unless using the App or the front panel buttons.
"Set preset" commands to "auto", "night", or "allergen" have no effect.
Attribute "preset_mode" is always null.
Child-lock switch don´t show up.
Backlight controls and brightness don´t work.