This solution automates the generation of store manager configuration files for WDM (Wall Display Management) systems, similar to the existing printer configuration approach but focused on wall configurations, web-UI server settings, and service card management.
✨ Graphical User Interface (GUI) - Simple, user-friendly interface for all operations 🤖 Automated Generation - Single command generates all store configurations 🎯 Flexible Configuration - Support for variable number of walls per store 💳 Service Cards Management - Automatic service card configuration 📊 Excel to JSON Converter - Built-in conversion tool in GUI (requires pandas) 🌐 Web-UI Integration - Server address configuration ✅ Built-in Validation - Comprehensive error checking 📊 Real-time Feedback - Progress logging and status updates 🔄 Multiple Modes - Separate or combined output files
The automation solution consists of:
- Graphical User Interface (
src/gui.py) - Simple GUI for all operations - Store Mapping Configuration (
config/mappings/store_wall_mapping.json) - Defines stores and their wall IP addresses - Service Cards Mapping (
config/mappings/service_cards_mapping.json) - Defines service cards for each store - Configuration Generator (
src/generate_store_config.py) - Creates structure XML files - Configuration Validator (
src/validate_config.py) - Validates generated configurations - Excel to JSON Converter (
src/convert_service_cards_to_json.py) - Converts service cards Excel to JSON - Implementation Plan (
docs/store_configuration_automation_plan.md) - Detailed technical documentation
Coop_Automation/
├── README.md # Main documentation (you are here)
├── .gitignore # Git ignore rules
├── start_gui.bat # Windows launcher for GUI
│
├── src/ # Source code
│ ├── gui.py # Graphical user interface
│ ├── generate_store_config.py # Configuration generator
│ ├── validate_config.py # Configuration validator
│ └── convert_service_cards_to_json.py # Excel converter
│
├── config/ # Configuration files
│ ├── templates/ # XML templates
│ │ ├── template.xml
│ │ ├── web-ui-config.xml
│ │ └── wall-config.xml
│ ├── mappings/ # Store and service mappings
│ │ ├── store_wall_mapping.json
│ │ ├── service_cards_mapping.json
│ │ └── store_ip_mapping.properties
│ └── examples/ # Example configurations
│
├── docs/ # Documentation
│ ├── GUI_QUICKSTART.md
│ ├── GUI_VISUAL_GUIDE.md
│ ├── GUI_IMPLEMENTATION.md
│ ├── BUILD_EXECUTABLE_GUIDE.md
│ └── ... (more docs)
│
├── scripts/ # Build and utility scripts
│ └── build_exe.py # PyInstaller build script
│
└── output/ # Generated configurations
└── store_*.xml # Generated store configs
python src/gui.pyOr use the Windows launcher:
start_gui.batThe GUI provides an easy-to-use interface with:
- 🎯 Store selection dropdown
- 🚀 One-click configuration generation
- ✓ Built-in validation
- 📁 Direct access to output folder
- 📊 Real-time log output
- 📑 Excel to JSON conversion (for service cards)
python src/generate_store_config.py --store 9999python src/generate_store_config.py --allpython src/generate_store_config.py --all --combinedpython src/validate_config.py --file output/store_9999_config.xmlpython src/validate_config.py --directory outputThe solution can generate structure XML files in two formats:
output/store_9999_config.xml- Installation Test Store configurationoutput/store_1674_config.xml- Store 1674 configurationoutput/store_1655_config.xml- Store 1655 configuration
output/all_stores_config.xml- All stores in a single configuration file
Simply run:
python src/gui.pyOr double-click: start_gui.bat
The GUI provides an intuitive interface with the following sections:
- Set paths for store mapping, template, and output directory
- Default values work out of the box
- Convert Excel files (
service-cards.xlsx) to JSON format - Browse button to select Excel file
- Specify output JSON filename
- One-click conversion with detailed feedback
- Note: Requires
pandaslibrary:pip install pandas openpyxl
- Generate All Stores (Separate Files) - Creates individual XML files for each store
- Generate All Stores (Combined File) - Creates a single XML with all stores
- Generate Single Store - Select and generate one store from the dropdown
- 🚀 Generate Configuration - Starts the generation process
- ✓ Validate Output - Validates all generated files
- 📁 Open Output Folder - Opens the output directory in file explorer
- 🔄 Reload Stores - Refreshes the store list from mapping file
- Real-time feedback during generation and validation
- Shows progress, errors, and success messages
- Clear log button to start fresh
- Shows current operation status at the bottom
- Launch GUI: Run
python src/gui.pyor double-clickstart_gui.bat - Select Mode: Choose generation mode (all stores, combined, or single)
- Select Store (if single mode): Pick from dropdown
- Generate: Click "Generate Configuration" button
- Validate: Click "Validate Output" to check generated files
- Open Folder: Click "Open Output Folder" to view results
- Launch GUI: Run
python src/gui.pyor double-clickstart_gui.bat - Locate Excel Section: "Service Cards Conversion" section
- Select File: Click "Browse..." or enter path to
service-cards.xlsx - Convert: Click "📊 Convert Excel to JSON" button
- Check Log: See conversion results and statistics
- Use JSON: The generated
service_cards_mapping.jsonis ready to use
Note: Excel conversion requires pandas: pip install pandas openpyxl
✅ No Command Line Required - Perfect for non-technical users ✅ Visual Feedback - See exactly what's happening ✅ Error Prevention - Clear options prevent mistakes ✅ Quick Access - Open output folder directly ✅ Integrated Validation - Test configurations immediately ✅ Store Browser - See all available stores at a glance
- GUI Quick Start Guide - Step-by-step getting started
- GUI Visual Guide - Visual interface walkthrough
- GUI Implementation Details - Technical documentation
- Build Executable Guide - Create standalone .exe file
Each generated configuration includes:
The key feature is the addition of wall configuration changes to the CSE-wdm node:
<node alias="CSE-wdm" country="SE" name="WDM" unique-name="9999.WDM">
<change file="wall-config.xml" url="wall-config.walls.1.clientId" value="192.168.99.101"/>
<change file="wall-config.xml" url="wall-config.walls.2.clientId" value="192.168.99.102"/>
<change file="wall-config.xml" url="wall-config.walls.3.clientId" value="192.168.99.103"/>
<change file="wall-config.xml" url="wall-config.walls.100.clientId" value="192.168.99.200"/>
<change file="web-ui-config.xml" url="webUiConfig.system.serverAddress" value="http://192.168.26.213:8080/app-wdm"/>
<change file="service-cards.xml" url="service-cards-config.service-cards.service-card" value="9903215"/>
<change file="service-cards.xml" url="service-cards-config.service-cards.service-card:2" value="9903183"/>
<change file="service-cards.xml" url="service-cards-config.service-cards.service-card:3" value="9903292"/>
</node>The solution also supports web-ui-config changes based on a simple store IP mapping properties file (store_ip_mapping.properties):
Format of store_ip_mapping.properties:
# Store IP Mapping Properties File
# Format: StoreID:IPAddress
9999:192.168.26.213
1674:10.1.0.20
1655:192.168.55.100
Generated web-ui-config change:
<change file="web-ui-config.xml" url="webUiConfig.system.serverAddress" value="http://192.168.26.213:8080/app-wdm"/>The solution also supports service-cards.xml changes based on service cards mapping JSON file (service_cards_mapping.json):
Service Cards Mapping Structure:
{
"stores": {
"1038": {
"cards": ["9903215", "9903183", "9903292", "9903184"],
"card_count": 4
}
}
}Generated service-cards changes:
<change file="service-cards.xml" url="service-cards-config.service-cards.service-card" value="9903215"/>
<change file="service-cards.xml" url="service-cards-config.service-cards.service-card:2" value="9903183"/>
<change file="service-cards.xml" url="service-cards-config.service-cards.service-card:3" value="9903292"/>
<change file="service-cards.xml" url="service-cards-config.service-cards.service-card:4" value="9903184"/>Note: The first service card has no index suffix, while subsequent cards use :2, :3, :4, etc.
Converting Excel to JSON:
If you have service cards in Excel format (service-cards.xlsx), convert it to JSON:
python src/convert_service_cards_to_json.py- Wall 1: Dispensing wall (mandatory)
- Wall 2, 3: Additional dispensing walls (optional)
- Wall 100: Disposal wall (mandatory)
The store_wall_mapping.json file defines:
{
"stores": {
"9999": {
"name": "Installation Test Store",
"country": "SE",
"parent_node": "ENTERPRISE.TENANT.SWEDEN",
"walls": {
"1": "192.168.99.101",
"2": "192.168.99.102",
"3": "192.168.99.103",
"100": "192.168.99.200"
}
}
}
}- Single command generates all store configurations
- Template-based approach ensures consistency
- Proper XML formatting and structure
- Support for variable number of walls per store
- Mandatory walls: 1 (dispense) and 100 (disposal)
- Optional walls: 2, 3, etc.
- Support for multiple service cards per store
- Automatic conversion from Excel to JSON format
- First card uses base URL, subsequent cards use indexed URLs (
:2,:3, etc.) - Optional feature - stores without service cards work fine
- Unique IP per wall per store
- IP address format validation
- Duplicate IP detection
- XML schema validation
- Wall configuration validation
- Comprehensive error reporting
- JSON-based store mapping
- Template-driven generation
- Clear separation of concerns
python src/generate_store_config.py [OPTIONS]
Options:
--all Generate configurations for all stores
--store STORE_ID Generate configuration for specific store
--combined Generate all stores in a single combined file (use with --all)
--output OUTPUT_DIR Output directory (default: output)
--mapping MAPPING_FILE Store mapping file (default: config/mappings/store_wall_mapping.json)
--template TEMPLATE_FILE Template file (default: config/templates/template.xml)
--ip-mapping IP_FILE Store IP mapping file (default: config/mappings/store_ip_mapping.properties)
--service-cards CARDS Service cards mapping file (default: config/mappings/service_cards_mapping.json)
--help Show help messagepython src/validate_config.py [OPTIONS]
Options:
--file FILE_PATH Validate specific configuration file
--directory DIRECTORY Validate all XML files in directory
--summary Show only summary for directory validation
--help Show help messageTo add a new store:
- Edit
store_wall_mapping.json - Add new store entry with required walls and IP addresses
- Run the generator to create the configuration
Example:
"1234": {
"name": "New Store",
"country": "SE",
"parent_node": "ENTERPRISE.TENANT.SWEDEN",
"walls": {
"1": "192.168.12.101",
"100": "192.168.12.200"
}
}For stores that should keep the template unchanged (no WDM or web UI changes), set "skip_wdm": true and omit the walls block (or leave it empty).
The generated XML files can be imported directly into the store manager application, similar to how the GKStores configurations were imported. The wall configuration changes will be applied to the target wall-config.xml file during import.
- Base Template:
template.xml - Target Configurations:
wall-config.xml- Wall IP configurationsweb-ui-config.xml- Web UI server configurations
- URL Patterns:
wall-config.walls.X.clientId- Wall configurationswebUiConfig.system.serverAddress- Web UI server address
- Similar to: Printer configuration pattern from GKStores example
The validator checks for:
- ✅ Valid XML structure
- ✅ Required sections (systems, nodes, etc.)
- ✅ Mandatory walls (1 and 100)
- ✅ Valid IP address format
- ✅ No duplicate IP addresses
- ✅ Proper CSE-wdm node configuration
- ✅ Web-UI configuration URL format validation
- ✅ Server address format (http://ip:8080/app-wdm)
- ✅ Service card number format validation
- ✅ Service card URL pattern validation
Coop_Automation/
├── src/ # Source code
│ ├── gui.py # Graphical User Interface
│ ├── generate_store_config.py # Configuration generator
│ ├── validate_config.py # Configuration validator
│ └── convert_service_cards_to_json.py # Excel to JSON converter
│
├── config/ # Configuration files
│ ├── templates/ # XML templates
│ │ ├── template.xml
│ │ ├── web-ui-config.xml
│ │ └── wall-config.xml
│ ├── mappings/ # Mappings
│ │ ├── store_wall_mapping.json # Store to wall IP mapping
│ │ ├── store_ip_mapping.properties # Store to server IP mapping
│ │ └── service_cards_mapping.json # Store to service cards mapping
│ └── examples/ # Example files
│
├── docs/ # Documentation
│ ├── GUI_QUICKSTART.md
│ ├── BUILD_EXECUTABLE_GUIDE.md
│ ├── SERVICE_CARDS_IMPLEMENTATION.md
│ └── ... (more documentation)
│
├── scripts/ # Build scripts
│ └── build_exe.py # PyInstaller build script
│
├── output/ # Generated configurations
│ ├── store_9999_config.xml # Individual store files
│ ├── store_1674_config.xml
│ ├── store_1655_config.xml
│ └── all_stores_config.xml # Combined file (with --combined)
│
├── README.md # This file
├── .gitignore # Git ignore rules
└── start_gui.bat # Windows launcher
python src/generate_store_config.py --all- Generates individual XML files for each store
- Easier to manage individual store configurations
- Suitable for selective imports
python src/generate_store_config.py --all --combined- Generates single XML file containing all stores
- Similar to GKStores configuration format
- Suitable for bulk imports
- All stores in one file:
output/all_stores_config.xml
✅ Generated 3 store configurations successfully ✅ Wall configuration changes properly added to CSE-wdm nodes ✅ Web-UI configuration changes added based on IP mapping ✅ Unique IP addresses assigned per wall per store ✅ Server IP addresses configured for web-ui-config ✅ Mandatory walls (1, 100) included for all stores ✅ Optional walls (2, 3) included where specified ✅ Proper XML structure and formatting ✅ Template-based approach ensures consistency ✅ Support for both separate and combined output formats ✅ Dual configuration system (wall + web-ui) working seamlessly ✅ Service cards configuration system integrated ✅ Excel to JSON conversion tool for service cards ✅ Automatic indexed URL generation for multiple service cards
The solution is ready for production use and can be easily extended for additional stores or modified wall configurations. Wall management, web-UI server configurations, and service cards management are all fully automated.