npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pimatic-hongkongpollution

v0.0.1

Published

Pimatic plugin to get current pollution readings and forecasts from the Hong Kong Environmental Department.

Downloads

8

Readme

pimatic-hongkongpollution

Hong Kong Pollution Readings and Forecasts for Pimatic. This plugin uses the node.js module hongkong-pollution to grab the information.

Data is taken from the Hong Kong Environmental Departments Website and RSS feed. In Hong Kong, pollution is a big consideration as it is for many large cities. The reason for developing this module is so that you can have reminders to wear a pollution mask, stay indoors or combine it with other modules in Pimatic so you can automatically turn on the indoor Air Filter.

Plugin Configuration

You can load the plugin by editing your config.json to include:

{
   "plugin": "hongkongpollution"
}

in the plugins Array.

Device Configuration

Devices can be added by adding them to the devices Array in the config file. Set the class property to PollutionForecastDevice or PollutionReadingsDevice

For device configuration options see the device-config-schema file.

Device examples

Pollution Forecast Device

This gives you a general forecast of the AQHI for the whole day, including a human friendly "Risk" as well as the aggregated AQHI reading.

{
  "id": "pollution-forecast",
  "name": "HK Pollution Forecast",
  "class": "PollutionForecastDevice",
}

The following optional settings are available. For more information see device-config-schema.

{
  "showRoadsideAQHI": true,
  "showGeneralAQHI": true,
  "showRoadsideRisk": true,
  "showGeneralRisk": true,
  "updateInterval": 3600,
  "language": "en"
}

Pollution Readings Device

This allows you to show all pollution readings for a specific area such as PM2.5,PM10,NO2,SO2,O3,CO.

The most important setting is which reporting station to use. Click here for more information about which reporting station to use for your district. The example below uses the "Sham Sha Po" monitoring station.

{
  "id": "pollution-readings",
  "name": "HK Pollution Readings",
  "class": "PollutionReadingsDevice",
  "reportingStation": "Sham Sha Po"
}

The following optional settings are available. For more information see device-config-schema.

{
  "updateInterval": 3600,
  "showNO2": true,
  "showCO": true,
  "showSO2": true,
  "showO3": true,
  "showPM2_5": true,
  "showPM10": true,
  "showAQHI": true
}

Air Quality information

TODO

  • Add Beach Water Quality
  • Add some pretty graphics to the front-end (how can I do this?)
  • Support rules so we can automate things using the readings from this module (need to do more research on how this works)
  • I would love to have some way to test using Mocha, right now this seems impossible.

Contributing

Feel free to submit any pull requests or add functionality, I'm usually pretty responsive.

If you like the module, please consider donating some bitcoin or litecoin.

Bitcoin

LNzdZksXcCF6qXbuiQpHPQ7LUeHuWa8dDW

LiteCoin

LNzdZksXcCF6qXbuiQpHPQ7LUeHuWa8dDW