plc-checkweigher 1.4.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/bin/cli.js +3 -1
  2. package/package.json +1 -1
  3. package/setup.sh +13 -8
package/bin/cli.js CHANGED
@@ -45,8 +45,10 @@ console.log(`${Y}This will:${NC}`);
45
45
  console.log(' 1. Install the PREEMPT_RT real-time kernel (reboots once)');
46
46
  console.log(' 2. Install all Python dependencies');
47
47
  console.log(' 3. Clone / update the plc-checkweigher repo');
48
- console.log(' 4. Configure WiFi, SMB file sharing');
48
+ console.log(' 4. Configure WiFi, SMB file sharing (credentials → smb_config.py)');
49
49
  console.log(' 5. Install systemd services with RT scheduling priority');
50
+ console.log(' 6. Set up live dashboard → http://<pi-ip>:8080/live');
51
+ console.log(' 7. Set up PDF report viewer with instant auto-refresh');
50
52
  console.log('');
51
53
  console.log(`${Y}Sudo password required to make system-level changes.${NC}`);
52
54
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plc-checkweigher",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "One-command installer for the PLC Check-Weigher system on Raspberry Pi (PREEMPT_RT kernel, Python stack, WiFi, SMB, systemd RT services)",
5
5
  "bin": {
6
6
  "plc-checkweigher": "bin/cli.js"
package/setup.sh CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  # =============================================================================
3
- # PLC Check-Weigher — Full Stack Installer v1.3
3
+ # PLC Check-Weigher — Full Stack Installer v1.4
4
4
  # =============================================================================
5
5
  # Run on any fresh Raspberry Pi:
6
6
  #
@@ -83,7 +83,7 @@ prompt_secret() {
83
83
 
84
84
  # ── 0. Pre-flight ─────────────────────────────────────────────────────────────
85
85
  preflight() {
86
- banner "PLC Check-Weigher Installer v1.2"
86
+ banner "PLC Check-Weigher Installer v1.4"
87
87
  [[ "${EUID}" -eq 0 ]] || die "Run via npx plc-checkweigher (asks for sudo password)"
88
88
  [[ "$(uname -m)" == "aarch64" ]] || die "Requires 64-bit Raspberry Pi (aarch64). Got: $(uname -m)"
89
89
  [[ -d "${HOME_DIR}" ]] || die "Home ${HOME_DIR} not found. Set PI_USER= to override."
@@ -560,17 +560,22 @@ do_reboot() {
560
560
  echo ""
561
561
  banner "Setup Complete"
562
562
  echo ""
563
- printf " ${G}%-32s${NC} %s\n" "Repo:" "${INSTALL_DIR}"
564
- printf " ${G}%-32s${NC} %s\n" "Python venv:" "${VENV_DIR}"
565
- printf " ${G}%-32s${NC} %s\n" "Reports output:" "${REPORTS_DIR}"
566
- printf " ${G}%-32s${NC} %s\n" "RT kernel:" "kernel8-rt.img (active after reboot)"
563
+ PI_IP="$(hostname -I | awk '{print $1}' 2>/dev/null || echo '<pi-ip>')"
564
+ printf " ${G}%-32s${NC} %s\n" "Repo:" "${INSTALL_DIR}"
565
+ printf " ${G}%-32s${NC} %s\n" "Python venv:" "${VENV_DIR}"
566
+ printf " ${G}%-32s${NC} %s\n" "Reports output:" "${REPORTS_DIR}"
567
+ printf " ${G}%-32s${NC} %s\n" "SMB config:" "${INSTALL_DIR}/smb_config.py"
568
+ printf " ${G}%-32s${NC} %s\n" "RT kernel:" "kernel8-rt.img (active after reboot)"
567
569
  printf " ${G}%-32s${NC} %s\n" "Stock kernel fallback:" "kernel8-stock.img"
568
- printf " ${G}%-32s${NC} %s\n" "Web dashboard (after reboot):" \
569
- "http://$(hostname -I | awk '{print $1}' 2>/dev/null || echo '<pi-ip>'):8080"
570
+ echo ""
571
+ echo -e " ${Y}Web interfaces (after reboot):${NC}"
572
+ printf " ${C}%-32s${NC} %s\n" "Report viewer:" "http://${PI_IP}:8080/"
573
+ printf " ${C}%-32s${NC} %s\n" "Live dashboard:" "http://${PI_IP}:8080/live"
570
574
  echo ""
571
575
  echo -e " ${Y}After reboot:${NC}"
572
576
  echo " journalctl -u plc_watcher -f # live logs"
573
577
  echo " sudo chrt -p \$(systemctl show -p MainPID --value plc_watcher) # verify RT"
578
+ echo " cat ${INSTALL_DIR}/procedure.md # full setup guide"
574
579
  echo ""
575
580
 
576
581
  echo -e "${G}"