Migration‐1.0‐to‐1.1 - meduzapat/LEDSpicer GitHub Wiki

Migrating from Configuration 1.0 to 1.1

LEDSpicer 0.7.0 introduces configuration version 1.1 with breaking changes. Existing configuration files must be updated.

What Changed

Change 1.0 1.1
Version attribute version="1.0" version="1.1"
Forward bouncing direction="ForwardBouncing" direction="Forward" bouncer="True"
Backward bouncing direction="BackwardBouncing" direction="Backward" bouncer="True"
Input maps structure <map> directly under input <map> wrapped in <maps>
Reader inputs listenevents attribute on input source attribute on <maps>

Direction/Bouncer Split

Before (1.0):

<actor type="Serpentine" group="All" direction="ForwardBouncing" />

After (1.1):

<actor type="Serpentine" group="All" direction="Forward" bouncer="True" />

Input Maps Restructure

Before (1.0):

<input name="Actions" listenevents="joy">
    <map trigger="B1" target="Button1" type="Element" />
</input>

After (1.1):

<input name="Actions">
    <maps source="joy">
        <map trigger="B1" target="Button1" type="Element" />
    </maps>
</input>

For non-reader inputs (Mame, Network), use <maps> without source:

<input name="Mame">
    <maps>
        <map trigger="P1_B1" target="Button1" type="Element" />
    </maps>
</input>

Automatic Conversion

A Python script is provided to convert configuration files automatically.

Location: tools/convert_1.0_to_1.1.py

Usage

# Dry run - preview changes without modifying files
python3 convert_1.0_to_1.1.py /path/to/ledspicer/data -n

# Convert with automatic backup (.bak files created)
python3 convert_1.0_to_1.1.py /path/to/ledspicer/data

# Convert without backup
python3 convert_1.0_to_1.1.py /path/to/ledspicer/data --no-backup

# Convert single file
python3 convert_1.0_to_1.1.py /etc/ledspicer.conf

What the Script Handles

  1. version="1.0"version="1.1" (only in <LEDSpicer> root, not XML declaration)
  2. direction="ForwardBouncing"direction="Forward" bouncer="True"
  3. direction="BackwardBouncing"direction="Backward" bouncer="True"
  4. Reader inputs (Actions, Credits, Impulse, Blinker): removes listenevents, wraps maps in <maps source="...">
  5. Non-reader inputs: wraps maps in <maps>

Backup Recovery

If something goes wrong, restore from backup:

cp /etc/ledspicer.conf.bak /etc/ledspicer.conf
⚠️ **GitHub.com Fallback** ⚠️