{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/smart-switch-mount/schema.json",
 "title": "Smart switch & Zigbee mount — parameters",
 "description": "Generate 3D-printable wall plates, 80×80 mm EU wall-box covers, and desk wedges for SONOFF SNZB-01P, Philips Hue Dimmer V2, Aqara Mini Switch, and Hue Tap Dial. All lengths are millimetres. Unknown keys are rejected; out-of-range values are rejected by the URL and API and clamped when a project file is opened.",
 "x-tool": "smart-switch-mount",
 "x-toolVersion": "1.3.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "dev",
   "title": "Switch / button dimensions"
  },
  {
   "id": "mount",
   "title": "Mount style"
  },
  {
   "id": "look",
   "title": "Colour"
  }
 ],
 "x-presets": {
  "note": "Choosing a preset resets every key marked x-resetOnPreset to its default and then applies the preset values.",
  "items": [
   {
    "id": "measure-your-own",
    "title": "Measure your own button",
    "description": "Generic smart-button wall plate, 80×80 mm EU cover, or desk wedge.",
    "values": {
     "deviceWidth": 45,
     "deviceHeight": 45,
     "deviceDepth": 15,
     "mountType": "wall-80x80",
     "color": "#c5c9cc"
    }
   },
   {
    "id": "fits-sonoff-snzb-01p",
    "title": "Fits SONOFF SNZB-01P Zigbee Switch",
    "description": "Official SONOFF specs: 45×45×17.7 mm with easy CR2477 battery lift-out. Not affiliated with or endorsed by SONOFF.",
    "values": {
     "deviceWidth": 45,
     "deviceHeight": 45,
     "deviceDepth": 17.7,
     "mountType": "wall-80x80",
     "color": "#2a9d8f"
    }
   },
   {
    "id": "fits-hue-dimmer-switch-v2",
    "title": "Fits Philips Hue Dimmer Switch V2",
    "description": "Listing dims 35×92×11 mm — measure to confirm. Not affiliated with or endorsed by Philips Hue.",
    "values": {
     "deviceWidth": 35,
     "deviceHeight": 92,
     "deviceDepth": 11,
     "mountType": "backplate",
     "color": "#f2c14e"
    }
   },
   {
    "id": "fits-aqara-mini-switch",
    "title": "Fits Aqara Wireless Mini Switch",
    "description": "Listing dims 45×45×12 mm — measure to confirm. Not affiliated with or endorsed by Aqara.",
    "values": {
     "deviceWidth": 45,
     "deviceHeight": 45,
     "deviceDepth": 12,
     "mountType": "wall-80x80",
     "color": "#e76f51"
    }
   },
   {
    "id": "fits-hue-tap-dial",
    "title": "Fits Philips Hue Tap Dial Switch",
    "description": "Listing dims 80×80×20 mm — measure to confirm. Not affiliated with or endorsed by Philips Hue.",
    "values": {
     "deviceWidth": 80,
     "deviceHeight": 80,
     "deviceDepth": 20,
     "mountType": "desk-wedge",
     "color": "#5e60ce"
    }
   }
  ]
 },
 "x-coreParams": {
  "exportFormat": {
   "type": "string",
   "title": "File format",
   "description": "3mf = 3MF (mm); stl = STL files in a zip (mm)",
   "x-group": "download",
   "x-role": "core.exportFormat",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "3mf",
    "stl"
   ],
   "default": "3mf"
  },
  "exportTol": {
   "type": "number",
   "title": "Mesh precision",
   "description": "Simplification tolerance in mm (0 = original mesh).",
   "x-group": "download",
   "x-role": "core.exportTolerance",
   "x-unit": "mm",
   "x-agentSafe": true,
   "enum": [
    0,
    0.01,
    0.02
   ],
   "default": 0.02
  },
  "units": {
   "type": "string",
   "title": "Units shown",
   "description": "Display only: mm or inches (1 in = 25.4 mm). Stored values, the API and exports are always mm.",
   "x-group": "view",
   "x-role": "core.displayUnits",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "mm",
    "in"
   ],
   "x-enumTitles": {
    "mm": "Millimetres",
    "in": "Inches"
   },
   "default": "mm"
  },
  "massUnits": {
   "type": "string",
   "title": "Weight shown in",
   "description": "Display only: grams or ounces (1 oz = 28.3495 g). Stored values, the API and exports are always grams.",
   "x-group": "view",
   "x-role": "core.displayMassUnits",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "g",
    "oz"
   ],
   "x-enumTitles": {
    "g": "Grams",
    "oz": "Ounces"
   },
   "default": "g"
  }
 },
 "type": "object",
 "properties": {
  "deviceWidth": {
   "type": "number",
   "minimum": 25,
   "maximum": 110,
   "x-step": 0.5,
   "title": "Device width",
   "description": "Width of the button. The pocket is made this wide plus the clearance on each side.",
   "x-group": "dev",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Ierīces platums",
   "default": 45
  },
  "deviceHeight": {
   "type": "number",
   "minimum": 25,
   "maximum": 130,
   "x-step": 0.5,
   "title": "Device height",
   "description": "Height of the button. The pocket is made this tall plus the clearance on each side.",
   "x-group": "dev",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Ierīces augstums",
   "default": 45
  },
  "deviceDepth": {
   "type": "number",
   "minimum": 6,
   "maximum": 30,
   "x-step": 0.1,
   "title": "Device depth",
   "description": "Thickness of the button. The rim of the pocket wraps around 72 % of it, at most 13 mm, so the front stays free to press.",
   "x-group": "dev",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Ierīces biezums",
   "default": 17.7
  },
  "mountType": {
   "type": "string",
   "enum": [
    "wall-80x80",
    "backplate",
    "desk-wedge"
   ],
   "x-enumTitles": {
    "wall-80x80": "80×80 mm EU wall-box adapter",
    "backplate": "Compact wall backplate",
    "desk-wedge": "Angled desk wedge"
   },
   "title": "Mount type",
   "description": "EU wall box: a plate of at least 82 mm with two holes 60 mm apart. Backplate: a smaller plate with a hole above and below the button. Desk wedge: the plate on a foot, for a table.",
   "x-group": "mount",
   "x-agentSafe": true,
   "x-label-lv": "Stiprinājuma veids",
   "default": "wall-80x80"
  },
  "clearance": {
   "type": "number",
   "minimum": 0.2,
   "maximum": 1.5,
   "x-step": 0.1,
   "title": "Pocket clearance",
   "description": "Space between the button and the wall of the pocket on each side. Less holds the button by friction; more lets you lift it out.",
   "x-group": "mount",
   "x-unit": "mm",
   "x-role": "core.clearance",
   "x-agentSafe": true,
   "x-label-lv": "Kabatās atstarpe",
   "default": 0.4
  },
  "material": {
   "type": "string",
   "enum": [
    "pla",
    "petg"
   ],
   "x-enumTitles": {
    "pla": "PLA",
    "petg": "PETG"
   },
   "title": "Filament",
   "description": "PLA indoors. PETG if the plate sits in the sun or on a wall over a radiator.",
   "x-group": "mount",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Filaments",
   "default": "pla"
  },
  "wallCount": {
   "type": "integer",
   "minimum": 2,
   "maximum": 6,
   "multipleOf": 1,
   "title": "Perimeter walls",
   "description": "Perimeter lines. Three make the rim of the pocket solid.",
   "x-group": "mount",
   "x-unit": "count",
   "x-role": "print.wallCount",
   "x-agentSafe": true,
   "x-label-lv": "Sienu skaits",
   "default": 3
  },
  "infill": {
   "type": "integer",
   "minimum": 5,
   "maximum": 100,
   "multipleOf": 5,
   "title": "Infill",
   "description": "15 to 20 % is enough: the plate carries nothing but the button.",
   "x-group": "mount",
   "x-unit": "pct",
   "x-role": "print.infill",
   "x-agentSafe": true,
   "x-label-lv": "Aizpildījums",
   "default": 20
  },
  "plateTexture": {
   "type": "string",
   "enum": [
    "none",
    "waves",
    "diamond",
    "hex",
    "wood",
    "hammered",
    "basketweave",
    "folk",
    "dots"
   ],
   "x-enumTitles": {
    "none": "Smooth (plain)",
    "waves": "Flowing waves",
    "diamond": "Diamond lattice",
    "hex": "Honeycomb",
    "wood": "Woodgrain",
    "hammered": "Hammered / slate",
    "basketweave": "Basketweave",
    "folk": "Latvian folk motif",
    "dots": "Polka dots"
   },
   "title": "Wall plate texture",
   "description": "Optional carved decorative relief on the visible 80×80 mm wall-plate border around the switch cradle; prints flat without supports.",
   "x-group": "look",
   "x-visibleIf": {
    "mountType": "wall-80x80"
   },
   "x-agentSafe": true,
   "x-label-lv": "Sienas plāksnes tekstūra",
   "default": "none",
   "x-resetOnPreset": true
  },
  "textureDepth": {
   "type": "number",
   "minimum": 0.3,
   "maximum": 0.7,
   "x-step": 0.1,
   "title": "Texture depth",
   "description": "Carved depth into the front face of the wall plate (0.5 mm prints cleanly face-up).",
   "x-group": "look",
   "x-unit": "mm",
   "x-visibleIf": {
    "all": [
     {
      "mountType": "wall-80x80"
     },
     {
      "plateTexture": {
       "ne": "none"
      }
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Tekstūras dziļums",
   "default": 0.5,
   "x-resetOnPreset": true
  },
  "textureScale": {
   "type": "number",
   "minimum": 4,
   "maximum": 18,
   "multipleOf": 1,
   "title": "Texture scale",
   "description": "Size of one repeating pattern cell in millimetres.",
   "x-group": "look",
   "x-unit": "mm",
   "x-visibleIf": {
    "all": [
     {
      "mountType": "wall-80x80"
     },
     {
      "plateTexture": {
       "ne": "none"
      }
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Tekstūras mērogs",
   "default": 8,
   "x-resetOnPreset": true
  },
  "color": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Colour",
   "description": "Colour of the plate. Most wall boxes are white: choose white for them, or the colour of your switch to make the plate disappear.",
   "x-group": "look",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Krāsa",
   "default": "#c5c9cc"
  }
 },
 "additionalProperties": false,
 "recommended_materials": [
  {
   "id": "sonoff-snzb-01p",
   "title": "SONOFF SNZB-01P Zigbee wireless button",
   "why": "Exact match for the Fits SONOFF SNZB-01P preset (45×45×17.7 mm, official SONOFF spec).",
   "url": "https://paramlet.com/go/sonoff-snzb-01p?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  },
  {
   "id": "pla-matte-filament",
   "title": "Matte PLA Filament 1.75 mm (1 kg) — smooth surface finish",
   "why": "Clean matte finish for decorative vases, ornaments and candle holders.",
   "url": "https://paramlet.com/go/pla-matte-filament?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  },
  {
   "id": "petg-filament-1kg",
   "title": "PETG Filament 1.75 mm (1 kg) — heat-resistant & durable",
   "why": "Stronger and more heat-resistant than PLA for molds, jigs and outdoor parts.",
   "url": "https://paramlet.com/go/petg-filament-1kg?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  }
 ]
}