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 🙏

© 2026 – Pkg Stats / Ryan Hefner

weather-ml-edge

v1.0.7

Published

Edge client for ML-based rain prediction and automated shutter control.

Readme

🌧️ weather-ml-edge

Edge client for ML-based rain prediction and automated shutter control.

This package connects local devices (Raspberry Pi, servers, PCs) to the weather-ml machine learning system and enables real-time weather monitoring and automation — without exposing private API keys or location data.


✨ Features

  • 🤖 ML-based rain probability monitoring
  • 🪟 Smart shutter / relay control support
  • ⚡ Lightweight CLI tool
  • 🔐 Secure environment-based configuration
  • 🌍 Uses your own Visual Crossing account
  • 🌧️ CHIRPS-aware model metadata status (from upstream trained model)
  • 📦 No bundled datasets or credentials
  • 🖥️ Designed for edge / IoT deployment

🔒 Security Notice

⚠️ This package does NOT provide API access.

You must supply:

  • Your own Visual Crossing API key
  • Your own location

The author does not proxy, store, or distribute credentials.

All API usage is billed to your own account.


📦 Installation

Global Install (Recommended)

npm install -g weather-ml-edge

Local Install

npm install weather-ml-edge

⚙️ Configuration

Create a .env file in your project directory:

VISUAL_CROSSING_KEY=your_api_key_here
VISUAL_CROSSING_LOCATION=lat,lon
WEATHER_ML_MODEL_META_URL=https://raw.githubusercontent.com/rotsl/weather-ml/main/models/hgb_D_next_6h_current_meta.json

Example:

VISUAL_CROSSING_KEY=abc123xyz
VISUAL_CROSSING_LOCATION=lat,lon

WEATHER_ML_MODEL_META_URL is optional; the default points to the main weather-ml model metadata artifact.

Never commit this file.


🚀 Usage

CLI Mode

After installing globally:

weather-ml

Output:

🌧️ Weather Status
Temp: 26.4°C
Rain %: 12
Humidity: 81
CHIRPS training: Enabled
CHIRPS features: 17
Model horizon: D_next_6h
Model trained at: 2026-03-08T11:15:46.848136

Programmatic Usage

import { getChirpsStatus, getWeather, loadConfig, loadModelMeta } from "weather-ml-edge";

const cfg = loadConfig();

const weather = await getWeather(cfg.apiKey, cfg.location);
const meta = await loadModelMeta(cfg.modelMetaUrl);
const chirps = getChirpsStatus(meta);

console.log(weather.precipprob);
console.log(chirps.enabled, chirps.count);

🪟 Raspberry Pi Integration

Designed for use with:

  • Servo motors
  • Relay boards
  • GPIO buttons
  • Smart window systems

Typical setup:

Prediction → Threshold → GPIO → Motor

Example:

if (rainProb > 0.5) {
  closeShutters();
}

See main project:

https://github.com/rotsl/weather-ml


📊 Data Sources

Weather data provided by:

Model metadata may include CHIRPS-derived features from:

Subject to their terms and pricing.


📁 Project Structure

weather-ml-edge/
├── src/
│   ├── index.js
│   ├── predictor.js
│   ├── modelLoader.js
│   └── config.js
├── package.json
└── README.md

🛠️ Requirements

  • Node.js ≥ 18
  • Internet connection
  • Visual Crossing API account

🚧 Limitations

  • No offline forecasting
  • Requires external API
  • CHIRPS data is not downloaded directly by this package
  • No bundled ML models
  • No centralized service

This package is a client, not a server.


🗺️ Roadmap

Planned features:

  • MQTT output
  • Home Assistant integration
  • Camera verification
  • Local caching
  • Edge retraining hooks
  • Mobile notifications

🤝 Contributing

Contributions are welcome.

Steps:

  1. Fork repository
  2. Create feature branch
  3. Submit PR

See main project for guidelines.


📜 License

MIT License

See LICENSE for details.


👤 Author

Rohan (rotsl)

GitHub: https://github.com/rotsl Project: https://github.com/rotsl/weather-ml


📄 License

MIT © Rohan R.


🌱 Philosophy

"Build systems that predict, adapt, and protect — automatically."

Minimal • Secure • Edge-first • ML-powered