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

plc-checkweigher

v1.31.3

Published

One-command installer for the PLC Check-Weigher system on Raspberry Pi (PREEMPT_RT kernel, Python stack, WiFi, SMB, systemd RT services)

Readme

PLC Check-Weigher System

Hardware: Raspberry Pi 4B · Mitsubishi PLC (Type3E) · Check-weigher line
Author: Bibin VR

Real-time check-weigher data logger and report system for a Mitsubishi PLC production line. Monitors each item, logs weight and status, generates PDF batch reports, and instantly pushes them to a network PC via SMB.

Features

  • Live PLC polling at 50 ms — captures every item (accept/reject/weight)
  • PDF batch report generated automatically at end of each production run
  • Instant PDF push to Windows/Mac shared folder via SMB (no software needed on the receiving PC)
  • Live operations dashboard — weight gauge, batch stats, item feed in real time
  • PDF report viewer with live auto-refresh (new reports appear without page reload)
  • Systemd service — starts at boot, reconnects on PLC disconnect

Quick Start

# Install dependencies
python3 -m venv /home/pi/plc_env
source /home/pi/plc_env/bin/activate
pip install pymcprotocol flask reportlab
sudo apt install samba-client

# Start watcher (or install as systemd service — see procedure.md)
cd /home/pi/plc_checkweigher
python3 plc_watcher.py

# Start web interface
python3 web/app.py

Open http://<pi-ip>:8080 for the report viewer, /live for the dashboard.

PDF Push Setup

See procedure.md for full setup instructions including:

  • Windows local user creation (avoids Microsoft account credential issues)
  • macOS File Sharing configuration
  • Email delivery via Gmail
  • HTTP push using pdf_receiver.py

Project Layout

plc_checkweigher/
├── plc_watcher.py        # systemd entry — waits for PLC START
├── plc_reader.py         # per-item data collection + PDF trigger
├── plc_report.py         # PDF generation (ReportLab)
├── pdf_push.py           # instant PDF delivery to network PC
├── pdf_receiver.py       # optional HTTP receiver for target PC
├── plc_watcher.service   # systemd unit
├── procedure.md          # full setup & operating procedure
└── web/
    ├── app.py            # Flask server (port 8080)
    └── templates/
        ├── index.html    # report list with live SSE refresh
        └── live.html     # live operations dashboard

Configuration

Edit the top of each file:

| File | Key settings | |---|---| | plc_reader.py | PLC_IP, PLC_PORT | | plc_watcher.py | PLC_IP, PLC_PORT | | pdf_push.py | SMB_HOST, SMB_SHARE, SMB_USERNAME, SMB_PASSWORD | | web/app.py | REPORTS_DIR, PORT |