Skip to content

jererobles/airq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]: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