Hello, I can confirm my purifier is using plain_coap with below command but it's only work with sudo.
sudo airctrl --ipaddr 192.168.1.40 --protocol plain_coap
[name] Name: AirPurifier
[modelid] ModelId: AC4558/31
[swversion] Version: 1.0.1
[StatusType] StatusType: localcontrol
[ota] Over the air updates: no
[Runtime] Runtime: 12.46 hours
[pwr] Power: ON
[pm25] PM25: 4
[iaql] Allergen index: 1
[mode] Mode: AG
[om] Fan speed: a
[aqil] Light brightness: 1
[uil] Buttons light: ON
[ddp] Used index: PM2.5
[cl] Child lock: False
[fltsts0] Pre-filter and Wick: clean in 23 hours
[fltsts1] HEPA filter: replace in 3368 hours
[fltsts2] Active carbon filter: replace in 0 hours
If I test it with airctrol command without sudo, may I know how can I permit such access to fix it ?
7/5/2020, 11:54:49 AM Traceback (most recent call last):
7/5/2020, 11:54:49 AM File "/home/hoobs/.hoobs/node_modules/philips-air/pyaircontrol.py", line 123, in
7/5/2020, 11:54:49 AM main()
7/5/2020, 11:54:49 AM File "/home/hoobs/.hoobs/node_modules/philips-air/pyaircontrol.py", line 104, in main
7/5/2020, 11:54:49 AM print(c.get_status())
7/5/2020, 11:54:49 AM File "/home/hoobs/.hoobs/node_modules/philips-air/pyaircontrol.py", line 68, in get_status
7/5/2020, 11:54:49 AM status = self._client.get_status(False)
7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 220, in get_status
7/5/2020, 11:54:49 AM status = self._get()
7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 50, in _get
7/5/2020, 11:54:49 AM self._send_hello_sequence(client)
7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 83, in _send_hello_sequence
7/5/2020, 11:54:49 AM self._send_over_socket(self.server, packet)
7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 38, in _send_over_socket
7/5/2020, 11:54:49 AM s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, protocol)
7/5/2020, 11:54:49 AM File "/usr/lib/python3.7/socket.py", line 151, in init
7/5/2020, 11:54:49 AM _socket.socket.init(self, family, type, proto, fileno)
7/5/2020, 11:54:49 AM PermissionError: [Errno 13] Permission denied
It was installed with below steps running in a raspberry pi:
Hello, I can confirm my purifier is using plain_coap with below command but it's only work with sudo.
sudo airctrl --ipaddr 192.168.1.40 --protocol plain_coap [name] Name: AirPurifier [modelid] ModelId: AC4558/31 [swversion] Version: 1.0.1 [StatusType] StatusType: localcontrol [ota] Over the air updates: no [Runtime] Runtime: 12.46 hours [pwr] Power: ON [pm25] PM25: 4 [iaql] Allergen index: 1 [mode] Mode: AG [om] Fan speed: a [aqil] Light brightness: 1 [uil] Buttons light: ON [ddp] Used index: PM2.5 [cl] Child lock: False [fltsts0] Pre-filter and Wick: clean in 23 hours [fltsts1] HEPA filter: replace in 3368 hours [fltsts2] Active carbon filter: replace in 0 hours
If I test it with airctrol command without sudo, may I know how can I permit such access to fix it ?
7/5/2020, 11:54:49 AM Traceback (most recent call last): 7/5/2020, 11:54:49 AM File "/home/hoobs/.hoobs/node_modules/philips-air/pyaircontrol.py", line 123, in 7/5/2020, 11:54:49 AM main() 7/5/2020, 11:54:49 AM File "/home/hoobs/.hoobs/node_modules/philips-air/pyaircontrol.py", line 104, in main 7/5/2020, 11:54:49 AM print(c.get_status()) 7/5/2020, 11:54:49 AM File "/home/hoobs/.hoobs/node_modules/philips-air/pyaircontrol.py", line 68, in get_status 7/5/2020, 11:54:49 AM status = self._client.get_status(False) 7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 220, in get_status 7/5/2020, 11:54:49 AM status = self._get() 7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 50, in _get 7/5/2020, 11:54:49 AM self._send_hello_sequence(client) 7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 83, in _send_hello_sequence 7/5/2020, 11:54:49 AM self._send_over_socket(self.server, packet) 7/5/2020, 11:54:49 AM File "/home/hoobs/.local/lib/python3.7/site-packages/pyairctrl/plain_coap_client.py", line 38, in _send_over_socket 7/5/2020, 11:54:49 AM s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, protocol) 7/5/2020, 11:54:49 AM File "/usr/lib/python3.7/socket.py", line 151, in init 7/5/2020, 11:54:49 AM _socket.socket.init(self, family, type, proto, fileno) 7/5/2020, 11:54:49 AM PermissionError: [Errno 13] Permission denied
It was installed with below steps running in a raspberry pi: