MaxymVlasov / qingping

Show Qingping Air Monitor Lite (CGDN1) data in your GNOME top bar or in terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qingping Air Monitor Lite Fetcher

Show Qingping Air Monitor Lite (CGDN1) data in your GNOME top bar or inside the terminal.

It has various settings, here how it could look like:

  • Default settings: ('co2','humidity','temperature','aqi_worst') few-sensors-different-status-emoji aqi_worst display worst result between PM2.5 and PM10 AQIs

  • When all display_sensors enabled: ('co2','humidity','temperature','aqi_worst','aqi_pm25','aqi_pm10') all-emoji-verbosity0

  • You can not show or rearrange any of the sensors: all-except-worst-aqi-verbosity0 few-rearranged-sensors-verbosity0 few-sensors-verbosity0

  • You can enable or disable "emoji status" and "text status" representations few-sensors-no-emoji few-sensors-text-and-emoji few-sensors-text

  • You can set the verbosity level to show only when something goes wrong: verbosity1 If for a long period (default: 30 min) there is no new data from sensors and verbosity_level != 0 next msg will pop up: no-data-alert the rest of the time, as long as everything is normal, nothing will be displayed: nothing-to-show

Cold start

  1. Connect your Qingping Air Monitor Lite to the Qingping+ App.

  2. Register in Qingping+ App.

  3. Login to developer.qingping.co/login

  4. Clone this repo and go inside it.

  5. Install the latest nodejs LTS version (tested on 20.12.1) and run npm install

  6. Create settings.json from example file

    cp user-settings-example.js user-settings.js
  7. Populate credentials in user-settings.js with corresponding values from developer.qingping.co/personal/permissionApply

  8. Run node .

  9. If you'd like to run it as part of the GNOME top bar:

    1. Install extensions.gnome.org/extension/2932/executor/

    2. Set /full/path/to/node /full/path/to/cloned/repo/ eg:

      /usr/bin/node /home/${USER}/.config/qingping/
    3. Set a 300+ seconds (5+ minutes) update interval - Qingping by default updates data not more frequently than once in 15min.

    4. Save settings.
      Note that you rerun script each time when you save settings.

Authors

The repository is managed by MaxymVlasov.

Shout-outs:

  • To the amazing Homey App community, especially tjaadvd and Wout_van_den_Dool, which done most of the work figuring out how to get data from obscure Qingping docs in this thread

Notes

It would be great to make it a full-fledged GNOME extension, but after spending a few hours understanding how it could be achieved I choose this "good enough" solution to me. If you'd like to convert to the GNOME extension - I am open to contributions

About

Show Qingping Air Monitor Lite (CGDN1) data in your GNOME top bar or in terminal

License:GNU General Public License v2.0


Languages

Language:JavaScript 100.0%