rgerganov/py-air-control

Issue with COAP on AC1214

mj16792 opened this issue · 6 comments

Whenever I use COAP or Plain COAP I get a string of errors, even though I can find the purifier on my home bridge.

For example:

This plugin generated a warning from the characteristic 'Filter Life Level': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

And:

[Bedroom Purifier] Unable to load filter info: Error: Command failed: python3 /usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py --ipaddr 192.168.178.58 --protocol coap --status
Give up on message From None, To ('192.168.178.58', 5683), CON-2602, POST-ZF, [Uri-Path: sys, Uri-Path: dev, Uri-Path: sync, ] AF0BBB79...8 bytes
Traceback (most recent call last):
File "/usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py", line 123, in
main()
File "/usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py", line 99, in main
c = CoAPCli(args.ipaddr)
File "/usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py", line 15, in init
self._client = CoAPAirClient(host, port, False)
File "/usr/local/lib/python3.7/dist-packages/pyairctrl/coap_client.py", line 80, in init
self._sync()
File "/usr/local/lib/python3.7/dist-packages/pyairctrl/coap_client.py", line 96, in _sync
raise Exception("sync timeout")
Exception: sync timeout

Seems to be slowing down my entire Homebridge set up as it works through these errors very few mins, have had to remove the purifier for now.

Sorry but I am not familiar with Homebridge and I cannot debug problems related to it.
Please try running the standalone py-air-control and if you still have issues you can report them here.

Whenever I use COAP or Plain COAP I get a string of errors, even though I can find the purifier on my home bridge.

For example:

This plugin generated a warning from the characteristic 'Filter Life Level': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

And:

[Bedroom Purifier] Unable to load filter info: Error: Command failed: python3 /usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py --ipaddr 192.168.178.58 --protocol coap --status
Give up on message From None, To ('192.168.178.58', 5683), CON-2602, POST-ZF, [Uri-Path: sys, Uri-Path: dev, Uri-Path: sync, ] AF0BBB79...8 bytes
Traceback (most recent call last):
File "/usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py", line 123, in
main()
File "/usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py", line 99, in main
c = CoAPCli(args.ipaddr)
File "/usr/local/lib/node_modules/homebridge-philips-air/node_modules/philips-air/pyaircontrol.py", line 15, in init
self._client = CoAPAirClient(host, port, False)
File "/usr/local/lib/python3.7/dist-packages/pyairctrl/coap_client.py", line 80, in init
self._sync()
File "/usr/local/lib/python3.7/dist-packages/pyairctrl/coap_client.py", line 96, in _sync
raise Exception("sync timeout")
Exception: sync timeout

Seems to be slowing down my entire Homebridge set up as it works through these errors very few mins, have had to remove the purifier for now.

Probably because your purifier has HTTP protocol!
Why are you using the COAP?
Снимок экрана 2021-04-05 в 11 51 58

The newer AC1214s use COAP.....even though they haven’t changed the model numbers. If I use HTTP the purifier is not found, I’ve already been through the whole ‘but it should be http’ trial and error thing. If I use COAP it is found, but COAP slows down my other plugins because it’s terribly buggy.

My older HTTP air purifier (AC2889) works fine with an old version of the homebridge and no pyaircontrol plug-in is needed. I wish you were right an my AC1214 were HTTP too so I could use them together, but sadly it isn’t!

D9E58FF0-83B3-4E60-AFC1-9E8975D6B916

The newer AC1214s use COAP.....even though they haven’t changed the model numbers. If I use HTTP the purifier is not found, I’ve already been through the whole ‘but it should be http’ trial and error thing. If I use COAP it is found, but COAP slows down my other plugins because it’s terribly buggy.

My older HTTP air purifier (AC2889) works fine with an old version of the homebridge and no pyaircontrol plug-in is needed. I wish you were right an my AC1214 were HTTP too so I could use them together, but sadly it isn’t!

D9E58FF0-83B3-4E60-AFC1-9E8975D6B916

Wow. I did not know. Thanks.
What OS are you using?
I got COAP and Error: spawnSync python3 ENOENT or Error: CONNECT slow when I had problems with python.
I reinstalled the OS from the start and then COAP worked very quickly and all the errors were gone.

So I’m running homebridge on a Rasberry Pi? Not actually sure what version as I don’t have a screen to connect to it and have been having problems with my ssh connection to it. I have reinstalled homebridge twice though, and it didn’t help with my errors

So I’m running homebridge on a Rasberry Pi? Not actually sure what version as I don’t have a screen to connect to it and have been having problems with my ssh connection to it. I have reinstalled homebridge twice though, and it didn’t help with my errors

You can connect via VNC to the Raspberry Pi
And to connect via ssh, you need to add a file named SSH to the SD card