Event Counter

Setup

Configure this press-line Pi. Changes are saved to /etc/dump-counter/config.yaml. Use Save & restart after counting or HAT changes so the service reloads config.

Physical stack (bottom → top): Pi → Smart Fan HAT → Eight HV Inputs HAT.
1 · Machine identity

Sent in every job summary to Supabase. Each Pi in the fleet needs a unique ID that matches the machines table (e.g. PLP1, PLP2).

2 · Polling

How often the service reads the inputs HAT. Default 50 ms is fine for production.

3 · Smart Fan cooling

Controls the Sequent Smart Fan HAT (middle layer). Uses Pi CPU temperature in automatic mode with hysteresis so the fan does not rapid-cycle. Bench test on SSH: fan -list, fan 0 pwr 50.

Automatic temperature control

Fan turns on when CPU reaches the “turn on” temp, and off when it drops to the “turn off” temp. Keep at least 10°C gap between them to avoid chattering.

Manual fixed speed

Fan runs at a constant speed whenever enabled. Use for bench testing only — automatic mode is safer for 24×7 production.

4 · Production counting

One section per PLC input that increments production counts. Channel numbers are the screw terminals on the inputs HAT (1–8).

Input 1

Input 2

5 · Supabase sync

Same webhook URL for every Pi in the fleet. Location is resolved from machine_id on the backend — you do not set location here.

Secrets stored in /etc/dump-counter/env — never overwritten when left blank.