Giter Site home page Giter Site logo

maxymvlasov / qingping Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 742 KB

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

License: GNU General Public License v2.0

JavaScript 100.00%
air-quality-data air-quality-monitor gnome-extension gnome-shell-extension qingping xiaomi cgdn1

qingping's Introduction

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

qingping's People

Contributors

maxymvlasov avatar renovate[bot] avatar

Watchers

 avatar

qingping's Issues

Renovate Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
Main configs and useful links are located in SpotOnInc/renovate-config; Renovate logs for debug here.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update actions/checkout action to v4.1.7
  • chore(deps): update actions/setup-python action to v5.1.1
  • chore(deps): update pre-commit hook pre-commit/pre-commit-hooks to v4.6.0

Detected dependencies

github-actions
.github/workflows/pre-commit.yaml
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/checkout v4.1.1@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/setup-python v5.1.0@82c7e631bb3cdc910f68e0081d67478d79c6982d
npm
package.json
  • lodash ^4.17.21
pre-commit
.pre-commit-config.yaml
  • pre-commit/pre-commit-hooks v4.5.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.