deiger / AirCon

Scripts for controlling Air Conditioners, e.g. with HiSense modules.
GNU General Public License v3.0
218 stars 58 forks source link

Cannot run server without MQTT #228

Open Andrei-Iosifescu123 opened 1 year ago

Andrei-Iosifescu123 commented 1 year ago

Whenever I try to start the server without the --mqtt_host parameter, I get an error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Andrei\Downloads\AirCon-master\AirCon-master\aircon\__main__.py", line 304, in <module>
    asyncio.run(run(parsed_args))
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Andrei\AppData\Local\Programs\Python\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\Andrei\Downloads\AirCon-master\AirCon-master\aircon\__main__.py", line 252, in run
    await asyncio.gather(mqtt_loop(mqtt_client), setup_and_run_http_server(parsed_args, devices),
  File "C:\Users\Andrei\Downloads\AirCon-master\AirCon-master\aircon\__main__.py", line 163, in mqtt_loop
    mqtt_client.loop()
    ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'loop'

This is my command: py -m aircon run --port 8888 --config config_aerconditionat.json. I'm using Python 3.11.3 on Windows 10 64-bit.

mazze-hub commented 1 year ago

Same error here. I am trying to start AirCon via Docker setup without MQTT.