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

Setup error: No request interface could route message #70

Open MrMEScott opened 2 years ago

MrMEScott commented 2 years ago

I have a Philips ac2889 which I'm trying to integrate to Home Assistant. I have Home Assistant 2022.2.1 running in a Docker container on a Raspberry Pi4. I added the custom integration, and I've added the following to my configuration (as an include under "fan:")

# Fans

# Bedroom air purifier, AC2889, 172.28.16.95, coap

- platform: philips_airpurifier_coap
  host: "172.28.16.95"
  model: ac2889
  name: Bedroom

I get this error when I restart HA:

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 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/philips_airpurifier_coap/fan.py", line 198, in async_setup_platform
    await device.init()
  File "/config/custom_components/philips_airpurifier_coap/fan.py", line 293, in init
    self._client = await CoAPClient.create(self._host)
  File "/usr/local/lib/python3.9/site-packages/aioairctrl/coap/client.py", line 38, in create
    await obj._init()
  File "/usr/local/lib/python3.9/site-packages/aioairctrl/coap/client.py", line 33, in _init
    await self._sync()
  File "/usr/local/lib/python3.9/site-packages/aioairctrl/coap/client.py", line 54, in _sync
    response = await self._client_context.request(request).response
  File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 842, in _run_outer
    await cls._run(app_request, response, weak_observation, protocol, log)
  File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 867, in _run
    await protocol.find_remote_and_interface(app_request)
  File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 342, in find_remote_and_interface
    raise RuntimeError("No request interface could route message")
RuntimeError: No request interface could route message

Any suggestions?

ronaldt80 commented 2 years ago

Which year did you buy the 2889? There are a couple of versions which operate either on http or coap encrypted. You could try an http version of this integration.

Also double check your ha instance can reach the Purifier entity, EG no firewall rules.

Sent from ProtonMail mobile

-------- Original Message -------- On 4 Feb 2022, 13:45, MrMEScott wrote:

I have a Philips ac2889 which I'm trying to integrate to Home Assistant. I have Home Assistant 2022.2.1 running in a Docker container on a Raspberry Pi4. I added the custom integration, and I've added the following to my configuration (as an include under "fan:")

Fans

Bedroom air purifier, AC2889, 172.28.16.95, coap

  • platform: philips_airpurifier_coap host: "172.28.16.95" model: ac2889 name: Bedroom

I get this error when I restart HA:

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 249, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/philips_airpurifier_coap/fan.py", line 198, in async_setup_platform await device.init() File "/config/custom_components/philips_airpurifier_coap/fan.py", line 293, in init self._client = await CoAPClient.create(self._host) File "/usr/local/lib/python3.9/site-packages/aioairctrl/coap/client.py", line 38, in create await obj._init() File "/usr/local/lib/python3.9/site-packages/aioairctrl/coap/client.py", line 33, in _init await self._sync() File "/usr/local/lib/python3.9/site-packages/aioairctrl/coap/client.py", line 54, in _sync response = await self._client_context.request(request).response File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 842, in _run_outer await cls._run(app_request, response, weak_observation, protocol, log) File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 867, in _run await protocol.find_remote_and_interface(app_request) File "/usr/local/lib/python3.9/site-packages/aiocoap/protocol.py", line 342, in find_remote_and_interface raise RuntimeError("No request interface could route message") RuntimeError: No request interface could route message

Any suggestions?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you are subscribed to this thread.Message ID: @.***>

MrMEScott commented 2 years ago

The air filter is on the same network as the HA server, and it's definitely a coap device: I have a couple of scripts that I use to control it via the pyairctrl package's coap interface, but I find them to be rather flaky (often doesn't respond). So I'm hoping that I can get more reliable results with this package.

ronaldt80 commented 2 years ago

There have been some issues with the new fw of Philips lately. Be sure to use the right repo/ make the required changes to manifest. My repo is up to date, I think kongo09 is also up to date.

Also, if you use HassOS a reboot of the host may be required to load the dependencies, don't ask me why but for me that has made the difference at times

Sent from ProtonMail mobile

-------- Original Message -------- On 4 Feb 2022, 14:56, MrMEScott wrote:

The air filter is on the same network as the HA server, and it's definitely a coap device: I have a couple of scripts that I use to control it via the pyairctrl package's coap interface, but I find them to be rather flaky (often doesn't respond). So I'm hoping that I can get more reliable results with this package.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

kongo09 commented 2 years ago

Unfortunately, the integration is not maintained at the moment. There have been a few patches that I tried to pull together on my fork, please try that.

However, the experience will be flaky at best since the new firmware by Phillips.

MrMEScott commented 2 years ago

I tried using kongo09's fork, but I get same error message. It looks to me like the issue is in the aiocoap package, rather than the air purifier code - it's not able to contact the device. I reloaded the aiocoap package in the Docker container, made no difference. I haven't time to go further with this right now, but I'll leave this issue open in case anyone is able to reproduce and/or fix.