Skip to content

gthrift/zwave-label-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Z-Wave SmartStart QR Decoder & Label Generator

A web-based tool to decode Z-Wave SmartStart QR codes and generate printable device labels. Perfect for home automation enthusiasts and Z-Wave device management.

Z-Wave QR Decoder License

Note: This project was vibe coded with Claude.ai πŸ€–

Features

✨ QR Code Decoding

  • Decode Z-Wave SmartStart QR codes instantly
  • πŸ“· Camera scanning - Point and scan with your device camera
  • Extract Device Specific Key (DSK)
  • Parse manufacturer ID, product type, and product ID
  • Display security classes and supported protocols

🏷️ Label Generation

  • Generate professional device labels
  • Embedded QR codes for easy re-scanning
  • Multiple export formats: SVG, PNG
  • Compact 250px width design perfect for label printers

πŸ” Device Lookup

  • Automatic device identification from local database
  • Fallback to Z-Wave JS database API
  • Display manufacturer name, device label, and description
  • Search links for unknown devices

πŸ› οΈ Developer-Friendly

  • Built-in debug tools
  • API lookup debugging
  • TLV parsing visualization
  • Clean, modern interface

Demo

https://gthrift.github.io/zwave-label-creator/

Decode QR Code

Paste your Z-Wave SmartStart QR code text to instantly decode device information:

9001621570034149504483534436062309043170212686520047001006144025600220006342867261443005120803003

Generated Label Preview

The tool generates compact labels with:

  • QR code for device provisioning
  • Manufacturer and product information
  • Product Type and ID
  • Full DSK (Device Specific Key)

Installation

Option 1: Direct Use (Static HTML)

Simply open index.html in a web browser. No server required for basic functionality!

git clone https://github.com/yourusername/zwave-qr-decoder.git
cd zwave-qr-decoder
open index.html  # or double-click the file

Option 2: Local Web Server (Recommended)

For full device lookup functionality using the PHP API:

# Clone the repository
git clone https://github.com/yourusername/zwave-qr-decoder.git
cd zwave-qr-decoder

# Start a PHP development server
php -S localhost:8000

# Open in browser
open http://localhost:8000

Option 3: Deploy to Web Server

Upload all files to your web server:

  • index.html - Main application
  • lookup.php - Device lookup API endpoint
  • devices.json - Local device database

Ensure PHP is enabled on your web server.

Usage

Basic Usage

  1. Obtain QR Code

    • Option A: Camera Scanning πŸ“·

      • Click the camera icon in the input field
      • Grant camera permission when prompted
      • Position the QR code in the target box
      • Automatic detection and decoding!
    • Option B: Manual Entry

      • Scan Z-Wave device QR code with any QR scanner app
      • Or locate the printed code text on device packaging
      • Paste into the input field
  2. Decode

    • QR code text appears in the input field
    • Click "πŸ” Decode QR Code" (or automatic after camera scan)
    • View decoded device information
  3. Generate Label

    • Click "🏷️ Generate Label" button
    • Preview the generated label
    • Download as SVG or PNG

Note: Camera access requires HTTPS or localhost. Works on all modern browsers with camera support.

Export Options

  • SVG: Vector format, perfect for scaling and editing
  • PNG: High-quality raster image (2x resolution)
  • JPEG: Currently hidden but available in code

Device Database

The tool includes a local devices.json database for offline device lookup.

Using the Included Database

The repository comes with a pre-populated device database. For most users, this is sufficient.

Updating the Database

To get the latest devices from Z-Wave JS:

Quick method:

  1. See DEVICE_EXTRACTION_QUICKSTART.md for 5-minute setup

Detailed method:

  1. See DEVICE_EXTRACTION.md for comprehensive guide

Using the extraction script:

# Clone Z-Wave JS repository
git clone https://github.com/zwave-js/node-zwave-js.git
cd node-zwave-js

# Run the extraction script
python3 extract_devices.py

# Copy to your tool
cp zwave_devices_db.json /path/to/zwave-qr-decoder/devices.json

Manual Device Addition

To add devices manually, edit devices.json:

{
  "manufacturerId": "0x0086",
  "manufacturer": "AEON Labs",
  "devices": [
    {
      "productType": "0x0003",
      "productId": "0x0084",
      "label": "ZW096",
      "description": "Smart Switch 6"
    }
  ]
}

Database Sources

File Structure

zwave-qr-decoder/
β”œβ”€β”€ index.html          # Main application (single-file app)
β”œβ”€β”€ lookup.php          # PHP API for device lookups
β”œβ”€β”€ devices.json        # Local device database
β”œβ”€β”€ README.md           # This file
β”œβ”€β”€ LICENSE             # MIT License
└── .gitignore          # Git ignore rules

Technical Details

QR Code Format

Z-Wave SmartStart QR codes follow the format:

  • Lead-in: 90 (SmartStart identifier)
  • Version: 2 digits
  • Checksum: 5 digits
  • Requested Keys: 3 digits (security classes)
  • DSK: 40 digits (Device Specific Key)
  • TLVs: Variable length (Type-Length-Value pairs)

TLV Types Supported

  • Type 2: Manufacturer/Product information
  • Type 8: Supported protocols (Z-Wave, Z-Wave LR)

Label Specifications

  • Dimensions: 250px Γ— 140px
  • QR Code: 100px Γ— 100px
  • Text: Variable size (10-14pt)
  • Format: SVG with embedded QR code

Browser Support

  • βœ… Chrome/Edge (Recommended)
  • βœ… Firefox
  • βœ… Safari
  • βœ… Mobile browsers

API Endpoints

Local Lookup

GET /lookup.php?manufacturerId=0x0086&productType=0x0003&productId=0x0084

Z-Wave JS Fallback

GET https://devices.zwave-js.io/api/devices?manufacturerId=0x0086&productType=0x0003&productId=0x0084

Development

Built with vanilla JavaScript - no frameworks required!

Dependencies:

Debug Mode

Enable debug information to see:

  • TLV parsing details
  • API request/response logs
  • Device lookup process

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Ideas for Contributions

  • Add more devices to devices.json
  • Improve label designs
  • Add support for additional TLV types
  • Multi-language support
  • Batch QR code processing

Known Issues

  • JPEG export is currently disabled (available in code)
  • Some older browsers may have issues with SVG export

Changelog

v1.0.0 (2025)

  • Initial release
  • QR code decoding
  • Label generation (SVG/PNG)
  • Device database lookup
  • Debug tools
  • Fixed PNG export QR code rendering bug

Credits

Vibe coded with Claude.ai πŸŽ‰

This project was created using Claude, an AI assistant by Anthropic, demonstrating the power of AI-assisted development for creating practical tools.

License

MIT License - see LICENSE file for details

Support

If you find this tool useful, please:

  • ⭐ Star this repository
  • πŸ› Report issues
  • πŸ”§ Submit pull requests
  • πŸ“’ Share with other Z-Wave enthusiasts

Links


Made with ❀️ and Claude.ai for the Z-Wave community

About

Create your own Z-Wave SmartStart QR codes and labels

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors