0. iPhone app (no laptop needed)
The app is also published on the internet as an installable app. It then works on the iPhone on its own, even with no signal at the plant.
- On the iPhone, open the app's web address in Safari (it must be Safari, not Chrome or WhatsApp's browser).
- Tap the Share button (square with an arrow), scroll down and tap Add to Home Screen, then Add.
- Open it from the new PPS Report icon. It opens full screen like any other app.
Always open it from the home-screen icon. Safari tabs and the home-screen app keep separate records, and iPhone may clear records of websites you don't visit for a few weeks. The home-screen app is not cleared that way.
PDF on the iPhone
Tap Share PDF. The iPhone share sheet opens: send it on WhatsApp or Mail, or choose Save to Files. If a small box says Your PDF is ready, tap Share / Save (the iPhone sometimes wants a second tap).
Back up the iPhone every week
Records → Backup file → Save to Files (iCloud Drive or Google Drive), or send it to yourself on WhatsApp or email. A red dot on Records reminds you until your first backup, then again 7 days after the last one. If the phone is lost, the backup file is the only copy.
Updates
When a new version is published, a blue bar says A new version of the app is ready. Tap Update now. Your records are not touched.
1. One-time setup (laptop)
- Install Python (free) from
python.org/downloads. Version 3.9 or newer.
On Windows, on the first install screen, tick "Add python.exe to PATH" before clicking Install. This is the step most people miss. - Unzip the
PPS_Particle_Count_Appfolder somewhere permanent, for exampleDocuments\PPS_Particle_Count_App. Don't run it from inside the zip or from the Downloads folder you clean out. - That's all. No other software, no internet needed.
2. Starting the app
Easiest: double-click
- Windows: double-click
start.bat. - Mac: double-click
start.command(first time: right-click → Open). - Phone on the same Wi-Fi:
start_lan.bat(Windows) orstart_lan.command(Mac).
A black window opens and your browser opens http://localhost:8765 with the app. Keep the black window open while you work. Closing it stops the app; your data is already saved.
From Visual Studio Code
- File → Open Folder → choose
PPS_Particle_Count_App. - Terminal → New Terminal.
- Type
python server.pyand press Enter (on Mac:python3 server.py). - The browser opens by itself. If it doesn't, open
http://localhost:8765. - To stop: click in the terminal and press Ctrl+C.
http://localhost:8765 in your browser. It only works while the app is running.3. The eight report forms
Click New report and pick the form you are filling in. Every form saves by itself, appears in Records, and prints as a PDF.
| Form | Report | Page | What it is for |
|---|---|---|---|
| PPS-F-01 | Equipment Commissioning & Acceptance | A4 portrait | Installing an ELC machine: the accessories supplied, the first membrane patch test, and the customer's acceptance signature. |
| PPS-F-02 | ELC Test Report for Oil Purity | A4 portrait | Membrane patch (0.8 µm) before and after electrostatic liquid cleaning, with the NAS 1638 and ISO 4406 classes. |
| PPS-F-03 | LVDH Test Report for Moisture Removal | A4 portrait | Low vacuum dehydration: visual appearance, free water, crackle test, ppm and membrane patch, before and after. |
| PPS-F-04 | PHE Service Report | A4 portrait | Plate heat exchanger service: the problem, the twelve-point checklist, and the parts replaced. |
| PPS-F-05 | Oil Analysis – Particle Count | A4 portrait | The original report: counter results with ISO 4406, NAS 1638 and SAE AS4059 verdicts (sections 4 and 10). |
| PPS-F-06 | Field Service Report | A4 landscape | An on-site service call for ELC / oil purification equipment, with the 22-point component checklist. |
| — | Oil Condition Report – Crackle Test | A4 portrait | Hot-plate crackle test for free and emulsified water: the band observed, photos of the sample and the plate, and the actions recommended. |
| — | Oil Cleanliness Test Report (Patch Test) | A4 portrait | 0.8 µm membrane patch before and after ELC cleaning, with the NAS 1638 rating and the customer's signature. |
Reports made before these forms existed are particle counts and still open exactly as they were. A backup file from an older version imports without any change.
The form you used last is remembered, so New report starts there — tap New report again to choose a different one.
4. Making a report
- Click New report. The report number fills itself (PPS/PC/26-27/001, 002 …). It restarts at 001 each financial year.
- Report: check the dates and type your name in Tested by. Your name and the counter details are remembered for every future report.
- 01 Client & sample: type the client name first. The report starts saving automatically as soon as it has a client name. The top bar shows Saved ✓.
- 02 Instrument: set once. Choose Hazy or Free water if the sample looked that way; the tool then recommends moisture removal.
- 03 Results: type the counts per ml from the counter slip (≥4, ≥6, ≥14, ≥21) and the NAS class. ISO codes calculate themselves and should match the slip.
- Free test (before only): for a first visit.
- After PPS filtration job: also enter the counts measured after purification. The report shows the improvement.
- 04 Target: pick the machine's most critical component. If the OEM manual gives a figure, type it over.
- 05 Recommendation: ticks itself from the results. Change any box if you disagree. Click Write observations from the results for a ready paragraph, then edit it.
- Plant & follow-up: contact, decision maker, power packs, oil spend, status, next step. None of this prints on the client's report.
- Click Save PDF (on a phone: Share PDF). The PDF goes to your Downloads folder, named with client and report number.
The right side shows the report exactly as it will print. On a phone, use the Enter / Report / Records switch at the top.
If the app or phone closes while you type, nothing is lost: the next time you open it, it says Unsaved changes were recovered. A red note under Report no. means another saved report already has that number.
5. Signing by hand
Every signature line on a form is a signature pad. You sign with your finger on a phone, or with the mouse on a laptop.
- Tap the signature box (or the Sign link under it).
- Write your signature inside the box. The line thins as you write faster, so it looks written.
- Undo removes the last stroke. Clear empties the box and you start again.
- Tap Use this signature. It appears in the box on the screen and prints on the dotted line where a wet signature would go.
- To change or remove it later, tap the box again (Sign), or tap Clear under the box to take it off the report.
Sign once, use it on every report. While signing, tick Remember this as my signature. From then on, opening any signature box offers Use my saved signature — tap it, then Use this signature. It is kept with your settings, so it is still there after closing the app, and it travels inside a Backup file.
If you do not want your signature kept on this device, open any signature box and tap Forget my saved signature. Signatures already placed on a report stay there until you clear that box.
Signing is part of the report data: it saves automatically, it is in the records list, and it appears in the PDF.
6. Photographs
Forms that have an "affix membrane patch" or "insert photo" space accept a picture straight from the phone camera.
- Tap the dashed picture box (or the Photo link under it).
- Take a photo or choose one from the gallery.
- The app shrinks it to fit the report — a 3 MB camera picture becomes roughly 25 KB — and shows it in the box and on the report.
- Remove takes it off again.
A useful patch photo is taken square-on, on white paper, with the patch filling most of the frame. If a report gets very heavy with pictures, the app asks before adding another one: big reports take longer to save, back up and send.
7. Records list
Click Records in the top bar (the number shows how many are saved).
- Every form is in the same list. The Details column shows the report kind and the machine, and Result shows the headline figure (for a particle count, the ISO code).
- Search by client, report number, equipment, contact, address or phone.
- Sort with the drop-down, or click a column heading (Report no., Test date, Client, Status, Next step). Click again to reverse.
- Filter by status with the buttons. The particle count report uses Sample taken / Report delivered / Quote sent / Won / Lost; the service forms use Draft / Scheduled / In progress / Completed / Report sent. Only the ones you actually use are shown. Each button shows its count.
- A red next-step date means it's overdue and the lead isn't closed.
- Click any row (or Open) to open that report and edit it. Changes save automatically.
- Delete needs two taps: Delete, then Confirm delete. Tap Undo in the message at the bottom within 10 seconds to bring it back; after that, only a backup can.
- Export to Excel (CSV) gives you every record in one sheet: the plant details for the particle count survey, and a set of columns for each other form. Pictures are marked [picture attached] rather than pasted in.
- Backup file saves every record in one file. Restore / import reads such a file back (see section 6).
- Press Esc or Back to report to return.
8. Where data is saved and backups
| What | Where |
|---|---|
| All records (the database) | data\pps_records.db inside the app folder |
| Automatic backup | data\backups\: one copy per day the app runs, the last 60 are kept |
| Backup on demand | Records → Backup file (works everywhere), or Database copy (.db) on the laptop |
| Before every import | The laptop saves a copy in data\backups\ named …_before_import.db |
| iPhone app | On the phone only. Back up with Records → Backup file every week |
| Excel copy | Records → Export to Excel (CSV) |
data folder to Google Drive or a pen drive. The automatic backups sit on the same computer; if the laptop is lost or the disk fails, only an outside copy saves you.Never delete the
data folder. When you get a new version of the app, copy your old data folder into the new app folder.Restoring from a backup
Easiest, while the app keeps running: Records → Restore / import and choose a PPS_backup_….json file. Records are merged; nothing is deleted.
Putting a whole database copy back (a .db file from data\backups):
- Stop the app (close the black window).
- In the app folder, open a terminal (in VS Code: Terminal → New Terminal) and type, with the file you want:
python server.py --restore data\backups\pps_records_2026-09-25.db
(Mac:python3and/instead of\) - It says how many records it restored. The database you had before is kept in
data\backupsas…_before_restore.db. - Start the app again.
Moving to another computer
Copy the whole app folder (including data), install Python on the new computer, and start as usual.
9. Phone and laptop together
Option A: the phone uses the laptop's database (same Wi-Fi)
Works only while the laptop is on and running the app, and both are on the same Wi-Fi.
- Start with
start_lan.bat(Mac:start_lan.command, orpython server.py --lan). - The black window shows a link like
http://192.168.1.25:8765/?key=Xy7…. Open that exact link on your phone (the?key=part is the password that stops other people on the Wi-Fi from seeing your records). The phone remembers it. - If Windows Firewall asks, allow access on Private networks only.
If start.bat is already open, close it first: start_lan tells you so. To change the key (for example after a phone is lost), stop the app, delete data\lan_key.txt and start start_lan again; open the new link on your phones.
On this address, Share PDF may download the file instead of opening the share sheet; that's normal.
Option B: the iPhone app on its own, then move records to the laptop
- On the iPhone: Records → Backup file → send it to yourself (WhatsApp Web, email, AirDrop, Google Drive).
- On the laptop: Records → Restore / import → choose that file.
- New records are added. A record that exists on both is kept in whichever copy was edited last. Nothing is deleted.
It works the other way too (laptop backup → import on the phone).
10. What the numbers mean
- Before / After: Before is the oil as you found it. After is the same machine re-tested once PPS filtration is done. For a free test, fill Before only.
- Counts are cumulative. The ≥14 µm count includes every particle 14 µm and bigger, so it already contains the ≥21 µm particles. The ≥21 count can never be higher than ≥14. If the app warns about this, you mistyped.
- ISO 4406 code (e.g. 21/20/19): three numbers for ≥4, ≥6 and ≥14 µm. Each step up roughly doubles the particle count.
- NAS 1638 class: taken straight from the counter slip. 12 is the dirtiest class on the scale.
- "31× the allowed particles": the measured count divided by the most the target allows, at the worst particle size. This is the headline for the client.
- Target NAS is an approximate conversion from the ISO target. Follow the OEM manual where you have it.
11. Problems and fixes
| What you see | What to do |
|---|---|
| "python is not recognized" or start.bat says Python is not installed | Install Python again and tick Add python.exe to PATH. Restart the computer. |
| Red bar: "Can't reach the app server" | The black window was closed. Start the app again. Keep the page open: what you typed saves by itself when the server is back (it also survives a reload). |
| Red bar: "This phone needs the access link" | Open the full link shown in the laptop's black window, the one ending in ?key=…. |
| Top bar says "Not saved" | Same as above: the app server isn't running, or see the orange bar. |
| Orange bar: "This report was changed in another window or on another device" | Someone saved the same report elsewhere after you opened it. Show the newer copy drops your unsaved changes; Keep my version saves yours over theirs. |
| "Replace what you typed?" under Observations | Tap again to replace your text with the written paragraph, or leave it. After replacing, Undo brings your text back. |
| Deleted a record by mistake | Tap Undo in the message at the bottom (10 seconds). Later: restore a backup. |
| "The app is already running" | It is open in another black window; the browser opens it for you. Use that one. |
| "Port 8765 is used by another program" | Close that program, or start with python server.py --port 8766 and open http://localhost:8766. |
| Page is blank or old-looking | Press Ctrl+F5 to reload. |
| "Add client name to save" | Reports save only once they have a client name. |
| PDF didn't appear | Look in your Downloads folder. If your browser blocks downloads, allow them for localhost. |
| iPhone: no "Add to Home Screen" | Open the address in Safari itself (not inside WhatsApp or Chrome), then Share → Add to Home Screen. |
| iPhone: records disappeared | Did you open it from Safari instead of the home-screen icon? They keep separate records. Otherwise restore your latest backup file with Records → Restore / import. |
| iPhone: Share PDF does nothing | Tap Share / Save in the small box that appears. Still nothing: update iOS (needs iOS 15 or newer). |
| Import says "not a PPS backup" | Choose the PPS_backup_….json file made by Backup file, not the CSV or PDF. |
| Phone can't open the address | Laptop and phone must be on the same Wi-Fi; start with start_lan.bat; allow Python in the firewall for private networks. |
