ericwolter / airq

API wrapper for uHoo Air

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AirQ

A macOS app that runs on the menu bar and shows air quality from your uHoo device.

screenshot

Run

$ # clone and install airq
$ git clone git@github.com:jererobles/airq.git && cd airq
$ poetry install

$ # create .env with userId + password
$ cp .env.example .env
$ nano .env

$ # run the venv
$ poetry run python airq/__main__.py

AirQ will create a session file in the app directory to keep refresh tokens and avoid unnecessary requests to the uHoo API.

Build

$ poetry run python setup.py py2app

Statuses

Emoji Caused by Comments
☺️ – All OK
🀒 Carbon dioxide Open the windows
🌡 Low humidity Turn on humidifier
πŸ’¦ High humidity Turn on AC
😷 Dust Do some cleaning
😣 Negative air pressure Open a window
πŸ˜– Positive air pressure Turn off ventilation
🫁 Red-brown gases Get some fresh air
😡 Various factors Air is bad
☠️ Carbon monoxide Air is poisonous
🦠 Various factors "Virus Index" triggered
❌ App error Connectivity issues or API changes

TODO

  • create initial login script by reversing authentication
  • create class to interface with API
  • use sessions to avoid handling cookies manually
  • persist session after script terminates
  • do something with data
  • make binaries
  • show values in menu bar

About

API wrapper for uHoo Air

License:MIT License


Languages

Language:Python 99.9%Language:Shell 0.1%