rgerganov / py-air-control

Command line app for controlling Philips air purifiers
MIT License
266 stars 53 forks source link

philips (versuni) series 3000 standing fan. #104

Open william-niq opened 3 months ago

william-niq commented 3 months ago

Hi I was looking around to see if my philips standing fan would somewhat work with this.

It has this chip: https://www.mxchip.com/en/products/module/159?desc=%E9%80%9A%E4%BF%A1%E6%A8%A1%E7%BB%84&name=EMC6069-P

I get that this for air purifiers, But perhaps these 2 devices share some common items. Functions of this device are: swivel, 5 air speeds (1,2,3,night,eco) and timer.

Connecting to the wifi of the device I get the following errors:

> airctrl --ipaddr 10.0.0.1 --wifi-ssid 'snip' --wifi-pwd 'snip'
Exchanging secret key with the device ...
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1344, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1336, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1382, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1331, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1091, in _send_output
    self.send(msg)
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1035, in send
    self.connect()
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1001, in connect
    self.sock = self._create_connection(
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 865, in create_connection
    raise exceptions[0]
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 850, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/william/python3/bin/airctrl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/airctrl.py", line 201, in main
    c = HTTPAirCli(device["ip"])
        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/airctrl.py", line 116, in __init__
    super().__init__(HTTPAirClient(host, debug))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/http_client.py", line 111, in __init__
    self.load_key()
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/http_client.py", line 159, in load_key
    self._get_key()
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/http_client.py", line 122, in _get_key
    with urllib.request.urlopen(req) as response:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 215, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 515, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 532, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 492, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1373, in http_open
    return self.do_open(http.client.HTTPConnection, req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1347, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 61] Connection refused>

and

> airctrl --ipaddr 10.0.0.1 --wifi-ssid 'snip' --wifi-pwd 'snip' --protocol coap
Give up on message From None, To ('10.0.0.1', 5683), CON-35322, POST-LI, [Uri-Path: sys, Uri-Path: dev, Uri-Path: sync, ] 3C2F1B6F...8 bytes
Traceback (most recent call last):
  File "/Users/william/python3/bin/airctrl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/airctrl.py", line 205, in main
    c = CoAPCli(device["ip"], debug=args.debug)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/airctrl.py", line 99, in __init__
    super().__init__(CoAPAirClient(host, port, debug))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/coap_client.py", line 82, in __init__
    self._sync()
  File "/Users/william/python3/lib/python3.12/site-packages/pyairctrl/coap_client.py", line 100, in _sync
    raise Exception("sync timeout")
Exception: sync timeout