Halden Heating has sent its own fault code file, with F40 for ignition lockout, a code missing from the table Dev copied from the manual. Python has one import system, but Node has two, and Halden’s file uses the older one, CommonJS, which you’ll also meet in legacy packages and answers online. You’ll learn to read it here while your own files stay ECMAScript (ES) modules.
Read What the File Exports
Make a reading folder and enter it. These commands work in a macOS or Linux terminal and in Windows PowerShell:
$ mkdir ~/halden-reading
$ cd ~/halden-reading
Save a reading copy of Halden’s file there as halden-faults.cjs, since a filename ending in .cjs marks a file as CommonJS:
halden-faults.cjs
const FAULTS = {
F12: "low water pressure",
F21: "flue sensor fault",
F33: "pump overrun",
F40: "ignition lockout",
};
function describe(code) {
const meaning = Object.hasOwn(FAULTS, code)
? FAULTS[code]
: "unknown fault";
return `${code} (${meaning})`;
}
module.exports = { describe, FAULTS };