c913218162
Ajoute une section d'utilisation via cadMasterCLI (formulaire auto-généré, lien vers le depot) avant la procedure PowerShell manuelle existante, pour chaque langue.
254 lines
7.7 KiB
Markdown
254 lines
7.7 KiB
Markdown
<!-- FR -->
|
|
# DaliACLI
|
|
|
|
CLI PowerShell pour la gestion des configurations de sorties DALI adressable (**ECxLightDaliA**) sur des automates Distech Controls Eclypse.
|
|
|
|
---
|
|
|
|
> **IMPORTANT : Ce projet est un développement personnel indépendant.**
|
|
>
|
|
> Ce projet a été développé par Charles-Arthur DAVID à titre personnel.
|
|
> Distech Controls n'est pas responsable de ce projet et ne le supporte pas.
|
|
> Aucune demande de support ne sera prise en charge par Distech Controls.
|
|
> Distech Controls ne fournit aucune garantie ni assistance technique pour ce projet.
|
|
|
|
---
|
|
|
|
## Prérequis
|
|
|
|
- Windows 10 ou Windows 11
|
|
- Automates **Distech Controls ECY Facilities (V2)**
|
|
- Être connecté au même réseau que les automates (réseau local ou VPN)
|
|
- Avoir les identifiants de connexion aux automates (nom d'utilisateur et mot de passe)
|
|
|
|
## Fonctionnalités
|
|
|
|
- **Read** : Lit la configuration des modules ECxLightDaliA et génère un rapport CSV (une ligne par sortie)
|
|
- **Write** : Modifie les propriétés des sorties DALI à partir du CSV enrichi
|
|
|
|
## Utilisation avec cadMasterCLI
|
|
|
|
Ce script peut être piloté depuis **[cadMasterCLI](https://git.cadjou.net/DistechControls/cadMasterCLI)**, qui évite d'avoir à utiliser PowerShell manuellement.
|
|
|
|
1. Lancez `cadMasterCLI.ps1`
|
|
2. Sélectionnez **DaliACLI** dans la liste des scripts à gauche.
|
|
3. Choisissez l'action `Read` ou `Write` (RadioButtons).
|
|
4. Renseignez `CsvInput` avec le bouton **Parcourir...** (voir le [format CSV d'entrée](#format-csv-dentrée-automates) ci-dessous).
|
|
5. Renseignez `Username` / `Password` si besoin (sinon `admin` / vide par défaut).
|
|
6. Cliquez sur **Lancer le script** et suivez la progression dans le journal d'exécution intégré.
|
|
|
|
## Utilisation en ligne de commande (script autonome)
|
|
|
|
### Lecture des configurations
|
|
|
|
```powershell
|
|
.\DaliACLI.ps1 -Action Read -CsvInput ".\automates.csv"
|
|
```
|
|
|
|
Génère un fichier `dali_YYYY-MM-DD_HHhmm.csv` avec les propriétés de chaque sortie.
|
|
|
|
### Écriture des configurations
|
|
|
|
```powershell
|
|
.\DaliACLI.ps1 -Action Write -CsvInput ".\dali_2026-04-02_14h30.csv"
|
|
```
|
|
|
|
### Avec mot de passe
|
|
|
|
```powershell
|
|
.\DaliACLI.ps1 -Action Read -CsvInput ".\automates.csv" -Password "MonMotDePasse"
|
|
```
|
|
|
|
### Aide
|
|
|
|
```powershell
|
|
Get-Help .\DaliACLI.ps1 -Detailed
|
|
```
|
|
|
|
### Format CSV d'entrée (automates)
|
|
|
|
Séparateur : point-virgule (`;`)
|
|
|
|
```csv
|
|
Hostname;Current Ip;HttpPort;HttpsPort
|
|
Eclypse-RDC;192.168.1.11;0;443
|
|
Eclypse-Etage1;192.168.1.12;0;443
|
|
```
|
|
|
|
Colonnes optionnelles : `Username`, `Password` (surcharge les credentials par défaut `admin` / vide).
|
|
|
|
### Format CSV de sortie (Read)
|
|
|
|
Une ligne par sortie DALI :
|
|
|
|
| Colonne | Description |
|
|
|---------|-------------|
|
|
| Hostname | Nom de l'automate |
|
|
| Current Ip | Adresse IP |
|
|
| HttpPort | Port HTTP |
|
|
| HttpsPort | Port HTTPS |
|
|
| ModuleKey | Identifiant du module |
|
|
| ModuleName | Nom du module |
|
|
| OutputKey | Identifiant de la sortie |
|
|
| OutputName | Nom de la sortie |
|
|
| ControlGearKey | Clé du control gear DALI |
|
|
| Groups | Groupes DALI actifs (ex: `1,3,5`) |
|
|
| SystemFailLevel | Niveau en cas de défaillance système |
|
|
| PowerOnLevel | Niveau à la mise sous tension |
|
|
| MinDimmingLevel | Niveau minimum de variation |
|
|
| DefaultValue | Valeur par défaut |
|
|
| DimmingTime | Temps de variation (secondes) |
|
|
| MaxDimmingLevel | Niveau maximum de variation |
|
|
|
|
### Filtrage
|
|
|
|
Seuls les modules de type **ECxLightDaliA** sont traités. Les autres types (ECxLight4Dali, etc.) sont ignorés automatiquement.
|
|
|
|
### API
|
|
|
|
- **Endpoint** : `/api/rest/v2/services/subnet/devices/light-sunblind/modules`
|
|
- **Auth** : Basic Auth
|
|
- **TLS 1.2** avec support des certificats auto-signés
|
|
|
|
### Structure du projet
|
|
|
|
```
|
|
daliA/
|
|
├── DaliACLI.ps1 # Script principal
|
|
├── modules/
|
|
│ ├── Logger.psm1 # Logging console + fichier
|
|
│ ├── CsvHandler.psm1 # Lecture/écriture CSV
|
|
│ ├── ApiClient.psm1 # Communication REST API
|
|
│ └── DaliParser.psm1 # Parsing JSON DALI
|
|
├── plan/
|
|
│ └── daliacli.md # Plan de développement
|
|
└── README.md
|
|
```
|
|
|
|
<!-- EN -->
|
|
# DaliACLI
|
|
|
|
PowerShell CLI for managing addressable DALI output configurations (**ECxLightDaliA**) on Distech Controls Eclypse controllers.
|
|
|
|
---
|
|
|
|
> **IMPORTANT: This project is an independent personal project.**
|
|
>
|
|
> This project was developed by Charles-Arthur DAVID on a personal basis.
|
|
> Distech Controls is not responsible for this project and does not support it.
|
|
> No support request will be handled by Distech Controls.
|
|
> Distech Controls provides no warranty or technical assistance for this project.
|
|
|
|
---
|
|
|
|
## Requirements
|
|
|
|
- Windows 10 or Windows 11
|
|
- **Distech Controls ECY Facilities (V2)** controllers
|
|
- Connected to the same network as the controllers (local network or VPN)
|
|
- Controller login credentials (username and password)
|
|
|
|
## Features
|
|
|
|
- **Read**: Reads the ECxLightDaliA modules configuration and generates a CSV report (one line per output)
|
|
- **Write**: Updates DALI output properties from the enriched CSV
|
|
|
|
## Usage with cadMasterCLI
|
|
|
|
This script can be run from **[cadMasterCLI](https://git.cadjou.net/DistechControls/cadMasterCLI)**, which avoids having to use PowerShell manually.
|
|
|
|
1. Launch `cadMasterCLI.ps1`
|
|
2. Select **DaliACLI** in the script list on the left.
|
|
3. Choose the `Read` or `Write` action (RadioButtons).
|
|
4. Set `CsvInput` using the **Browse...** button (see the [input CSV format](#input-csv-format-controllers) below).
|
|
5. Set `Username` / `Password` if needed (otherwise defaults to `admin` / empty).
|
|
6. Click **Run script** and follow the progress in the built-in execution log.
|
|
|
|
## Command-line usage (standalone script)
|
|
|
|
### Reading configurations
|
|
|
|
```powershell
|
|
.\DaliACLI.ps1 -Action Read -CsvInput ".\automates.csv"
|
|
```
|
|
|
|
Generates a `dali_YYYY-MM-DD_HHhmm.csv` file with the properties of each output.
|
|
|
|
### Writing configurations
|
|
|
|
```powershell
|
|
.\DaliACLI.ps1 -Action Write -CsvInput ".\dali_2026-04-02_14h30.csv"
|
|
```
|
|
|
|
### With password
|
|
|
|
```powershell
|
|
.\DaliACLI.ps1 -Action Read -CsvInput ".\automates.csv" -Password "MyPassword"
|
|
```
|
|
|
|
### Help
|
|
|
|
```powershell
|
|
Get-Help .\DaliACLI.ps1 -Detailed
|
|
```
|
|
|
|
### Input CSV format (controllers)
|
|
|
|
Separator: semicolon (`;`)
|
|
|
|
```csv
|
|
Hostname;Current Ip;HttpPort;HttpsPort
|
|
Eclypse-RDC;192.168.1.11;0;443
|
|
Eclypse-Etage1;192.168.1.12;0;443
|
|
```
|
|
|
|
Optional columns: `Username`, `Password` (overrides the default `admin` / empty credentials).
|
|
|
|
### Output CSV format (Read)
|
|
|
|
One line per DALI output:
|
|
|
|
| Column | Description |
|
|
|---------|-------------|
|
|
| Hostname | Controller name |
|
|
| Current Ip | IP address |
|
|
| HttpPort | HTTP port |
|
|
| HttpsPort | HTTPS port |
|
|
| ModuleKey | Module identifier |
|
|
| ModuleName | Module name |
|
|
| OutputKey | Output identifier |
|
|
| OutputName | Output name |
|
|
| ControlGearKey | DALI control gear key |
|
|
| Groups | Active DALI groups (e.g. `1,3,5`) |
|
|
| SystemFailLevel | Level on system failure |
|
|
| PowerOnLevel | Level at power-on |
|
|
| MinDimmingLevel | Minimum dimming level |
|
|
| DefaultValue | Default value |
|
|
| DimmingTime | Dimming time (seconds) |
|
|
| MaxDimmingLevel | Maximum dimming level |
|
|
|
|
### Filtering
|
|
|
|
Only **ECxLightDaliA** module types are processed. Other types (ECxLight4Dali, etc.) are automatically ignored.
|
|
|
|
### API
|
|
|
|
- **Endpoint**: `/api/rest/v2/services/subnet/devices/light-sunblind/modules`
|
|
- **Auth**: Basic Auth
|
|
- **TLS 1.2** with self-signed certificate support
|
|
|
|
### Project structure
|
|
|
|
```
|
|
daliA/
|
|
├── DaliACLI.ps1 # Main script
|
|
├── modules/
|
|
│ ├── Logger.psm1 # Console + file logging
|
|
│ ├── CsvHandler.psm1 # CSV read/write
|
|
│ ├── ApiClient.psm1 # REST API communication
|
|
│ └── DaliParser.psm1 # DALI JSON parsing
|
|
├── plan/
|
|
│ └── daliacli.md # Development plan
|
|
└── README.md
|
|
```
|