Ajout du Micro dimmer MCOHome MH-P220 dans les matériels compatibles

Bonjour à tous.

Je me suis procuré un micro dimmer MCO MH-P220 et lorsque j’ai voulu l’installer il a bien été pris en compte mais aucun paramètres n’était affiché et les commandes possibles bien que fonctionnelles n’étaient pas très intuitives.

Je me suis inspiré du post https://community.jeedom.com/t/rtex-plugin-z-wave-equipement-inconnu-unknown-configuration-diy/18466 de @Akenad, merci à lui au passage. J’avoue que je n’ai pas tout compris mais je me suis retroussé les manches et voici ce que j’ai fait qui fonctionne:

<?xml version="1.0" encoding="utf-8"?>

<Product Revision="2" xmlns="https://github.com/OpenZWave/open-zwave">
  <MetaData>
    <MetaDataItem name="OzwInfoPage">http://www.openzwave.com/device-database/015f:5102:220a</MetaDataItem>
    <MetaDataItem name="ProductPic">images/mcohome/mhp220.png</MetaDataItem>
    <MetaDataItem id="5102" name="ZWProductPage" type="220A">https://products.z-wavealliance.org/products/3011/</MetaDataItem>
    <MetaDataItem id="5102" name="Identifier" type="220A">MH-P220</MetaDataItem>
    <MetaDataItem name="ResetDescription">Restoring Factory Settings:
The default configuration can be restored by:
*	Sending commands through controller/gateway (the command classes which support this function is Configuration Command Class). The parameter are as follows:

Parameter Number	0xFF
Size	1 BYTE
Default value	N/A
Configuration value	0x55
Set 0xFF as 0x55 will restore Factory Settings.

*	Or press the inner button on the module 10 times in quick succession.Please use this procedure only when the network primary controller is missing or otherwise inoperable.
</MetaDataItem>
    <MetaDataItem name="ProductManual">https://Products.Z-WaveAlliance.org/ProductManual/File?folder=&amp;filename=Manuals/3011/MH-P220UserManual.pdf</MetaDataItem>
    <MetaDataItem id="5102" name="FrequencyName" type="220A">U.S. / Canada / Mexico</MetaDataItem>
    <MetaDataItem name="ExclusionDescription">Remove the device from Z-Wave network:
1. Set controller into REMOVE mode. Follow the instructions provided by the controller/gateway manufacturer.
2.	Press the momentary button on the device 3 times, or the connected external button S1 3 times in quick succession. 
Note: If the REMOVE is successful, the INDICATION LED will blink 6 times. If not, INDICATION LED will be solid on or off depending on switch’s state.
</MetaDataItem>
    <MetaDataItem name="ListeParametres">https://products.z-wavealliance.org/products/3011/configs</MetaDataItem>
    <MetaDataItem name="Name">Micro Dimmer MHP-220</MetaDataItem>
    <MetaDataItem name="Description">This in-wall module is with compact design as well as stable performance, which can suit for any of the installation box  and various operation situation.  It supports basic command class, and also can act as repeater regardless of vendor to increase reliability of the network.</MetaDataItem>
    <MetaDataItem name="InclusionDescription">Add the device into Z-Wave network:
1.	Set controller into ADD mode. Follow the instructions provided by the controller/gateway manufacturer.
2.	Press the momentary button on the device 3 times, or the connected external button S1 3 times in quick succession. 
Note: If the ADD is successful, the INDICATION LED will blink 6 times. If not, INDICATION LED will be solid on or off depending on switch’s state.
</MetaDataItem>
    <ChangeLog>
      <Entry author="petergebruers - peter.gebruers@gmail.com" date="11 Jul 2019" revision="1">Initial Metadata Import from Z-Wave Alliance Database - file based on 1.4 version by @tonbor PR #1853</Entry>
      <Entry author="Noyax37 - alain.concours37@gmail.com" date="10 Janvier 2021" revision="1">Ajout de listes et correction de petites erreurs</Entry>
    </ChangeLog>
  </MetaData>

  <!--MCOHome (Zipato) MH-P220 Micro Dimmer -->
  <!-- Configuration -->
  <CommandClass id="112">
    <Value genre="config" index="1" instance="1" label="Dimmer state after power down" max="1" min="0" size="1" type="list" units="" value="1">
      <Help>Dimmer state saved or not when power down Default 1 (saved).</Help>
      <Item label="State NOT saved at power failure, all outputs are set to OFF upon power restore" value="0"/>
      <Item label="State saved at power failure, all outputs are set to previous state upon power restore" value="1"/>
    </Value>
    <Value genre="config" index="2" instance="1" label="External switch type" max="2" min="0" size="1" type="list" units="" value="0">
      <Help>External switch type Default 0 (mono-stable).</Help>
      <Item label="Mono-stable input (button)" value="0"/>
      <Item label="Bi-stable input (switch)" value="1"/>
      <Item label="Role blind switch (UP / DOWN) - two switch keys operate the Dimmer" value="2"/>
    </Value>
    <Value genre="config" index="3" instance="1" label="2-state Switches" max="1" min="0" size="1" type="list" units="" value="0">
      <Help>2-state Switches Default 1 (with).</Help>
      <Item label="For the toggle dimmer without specified on/off position" value="0"/>
      <Item label="For the toggle dimmer with specified on/off position" value="1"/>
    </Value>
    <Value genre="config" index="4" instance="1" label="ALL ON/ALL OFF" max="255" min="0" size="1" type="list" units="" value="255">
      <Help>ALL ON/ALL OFF. Default 255 (all on and off active)</Help>
      <Item label="ALL ON active / ALL OFF active" value="255" />
      <Item label="ALL ON disabled/ ALL OFF disabled" value="0" />
      <Item label="ALL ON disabled/ ALL OFF active" value="1" />
      <Item label="ALL ON active / ALL OFF disabled" value="2" />
    </Value>
    <Value genre="config" index="5" instance="1" label="Minimum brightness level" max="98" min="1" size="1" type="byte" units="" value="1">
      <Help>Options for changing parameter 1-98. Default 1.</Help>
    </Value>
    <Value genre="config" index="6" instance="1" label="Maximum brightness level" max="99" min="2" size="1" type="byte" units="" value="99">
      <Help>Options for changing parameter 2-99. Default 99.</Help>
    </Value>
    <Value genre="config" index="7" instance="1" label="Single dimming step time(Manual)" max="255" min="1" size="2" type="short" units="" value="3">
      <Help>Options for changing parameter 1-255 step 10ms (10ms - 2,55s). Default 3 (30ms).</Help>
    </Value>
    <Value genre="config" index="8" instance="1" label="Single dimming step size (Manual)" max="99" min="1" size="1" type="byte" units="" value="1">
      <Help>Options for changing parameter 1-99 (modification isn't recommanded). Default 1.</Help>
    </Value>
    <Value genre="config" index="9" instance="1" label="Single dimming step time (Auto)" max="255" min="1" size="2" type="short" units="" value="3">
      <Help>Options for changing parameter 1-255 step 10ms (10ms - 2,55s). Default 3 (30ms).</Help>
    </Value>
    <Value genre="config" index="10" instance="1" label="Single dimming step size (Auto)" max="99" min="1" size="1" type="byte" units="" value="1">
      <Help>Options for changing parameter 1-99 (modification isn't recommanded). Default 1.</Help>
    </Value>
    <Value genre="config" index="11" instance="1" label="Timer function (Auto-off)" max="255" min="0" size="2" type="short" units="" value="0">
      <Help>Options for changing parameter 0 = disabled, 1-255 (1s - 255s). Default 0 (disabled).</Help>
    </Value>
    <Value genre="config" index="13" instance="1" label="One click of S1" max="99" min="0" size="1" type="byte" units="" value="99">
      <Help>Options for changing parameter 0 = switch between Off and last saved brightness level, 1-99 percentage value switch between Off and the set. Default 0.</Help>
    </Value>
    <Value genre="config" index="14" instance="1" label="Double click of S1" max="1" min="0" size="1" type="list" units="" value="1">
      <Help>Enable or disable double click on S1. Default 1 (reach max).</Help>
      <Item label="Function disabled" value="0"/>
      <Item label="Reach max brightness level" value="1"/>
    </Value>
    <Value genre="config" index="15" instance="1" label="Operation report Switch1 to Assoc Group 2 and 3" max="255" min="0" size="1" type="byte" units="" value="0">
      <Help>Read documentation. Default 0.</Help>
    </Value>
    <Value genre="config" index="16" instance="1" label="Operation report Switch1 to Association Group 2" max="1" min="0" size="1" type="list" units="" value="1">
      <Help>Read documentation. Default 1 (option 01).</Help>
      <Item label="option 00" value="0" />
      <Item label="option 01" value="1" />
    </Value>
    <Value genre="config" index="17" instance="1" label="Switch 2 function" max="255" min="0" size="1" type="list" units="" value="255">
      <Help>S2 functions. Default 255 (disable).</Help>
      <Item label="Disable S2 function" value="255" />
      <Item label="wire with roller blinds switch" value="0" />
      <Item label="enable scene activation and send basic Set On/Off to AG4" value="1" />
      <Item label="Scene activation only" value="2" />
      <Item label="Send besic on/off only" value="3" />
    </Value>
    <Value genre="config" index="18" instance="1" label="Operation report Switch2 to Association Group 4" max="255" min="0" size="1" type="list" units="" value="0">
      <Help>Operation report to G4. Default 0 (send basic on and off).</Help>
      <Item label="No report to G4" value="255" />
      <Item label="send basic ON and OFF when turn on/off S2" value="0" />
      <Item label="only send basic ON" value="1" />
      <Item label="only send basic OFF" value="2" />
    </Value>
    <Value genre="config" index="19" instance="1" label="Scene ID sent to AG1 when one click of S2" max="255" min="0" size="1" type="byte" units="" value="0">
      <Help>Read documentation. Default 0.</Help>
    </Value>
    <Value genre="config" index="20" instance="1" label="Scene ID sent to AG1 double click of S2" max="255" min="0" size="1" type="byte" units="" value="0">
      <Help>Read documentation. Default 0.</Help>
    </Value>
    <Value genre="config" index="21" instance="1" label="Scene ID sent to AG1 when hold S2" max="255" min="0" size="1" type="byte" units="" value="0">
      <Help>Read documentation. Default 0.
      </Help>
    </Value>
  </CommandClass>
  <!-- Association Groups -->
  <CommandClass id="133">
    <Associations num_groups="4">
      <Group index="1" max_associations="1" label="Report service's dimming state. Only one ID"/>
      <Group index="2" max_associations="5" label="control associated devices when S1's state changes. Basic send command to this devices"/>
      <Group index="3" max_associations="5" label="control associated devices when S1's state changes. Multi level send command to this devices"/>
      <Group index="4" max_associations="5" label="control associated devices when S2's state changes. Basic send command to this devices"/>
    </Associations>
  </CommandClass>
</Product>
  • Création du fichier json dans le répertoire html/plugins/openzwave/core/config/devices/mco_351 en respectant le nom correspondant à « Identifiant du fabricant : 351 [0x015f] Type de produit : 8714 [0x220a] Identifiant du produit : 20738 [0x5102] » soit: 351.8714.20738_mh.p220.dimmer.json contenant:
{
  "name": "MH-P220 Micro Dimmer", 
  "type": "Micromodule", 
  "comlink": "3577-zipato-mini-micromodule-variateur-z-wave-3858890732733", 
  "remark": "Vendu aussi sous la marque Zipato", 
  "imglink": "mco.mhp220", 
  "commands": [
    {
      "name": "Intensité",
      "type": "action",
      "isVisible": 1,
      "isHistorized": 0,
      "configuration": {
        "class": 38,
        "value": "type=setvalue&value=#slider#",
        "index": 0,
        "instance": 1,
        "minValue": 0,
        "maxValue": 99
      },
      "value": "Etat",
      "subtype": "slider",
      "display": {
        "generic_type": "LIGHT_SLIDER"
      },
      "template": {
        "dashboard": "light",
        "mobile": "light"
      }
    },
    {
      "name": "On",
      "type": "action",
      "isVisible": 1,
      "isHistorized": 0,
      "configuration": {
        "class": 38,
        "value": "type=setvalue&value=99",
        "index": 0,
        "instance": 1,
        "minValue": 0,
        "maxValue": 99
      },
      "subtype": "other",
      "display": {
        "generic_type": "LIGHT_ON"
      }
    },
    {
      "name": "Off",
      "type": "action",
      "isVisible": 1,
      "isHistorized": 0,
      "configuration": {
        "class": 38,
        "value": "type=setvalue&value=0",
        "index": 0,
        "instance": 1,
        "minValue": 0,
        "maxValue": 99
      },
      "subtype": "other",
      "display": {
        "generic_type": "LIGHT_OFF"
      }
    },
    {
      "name": "Etat",
      "type": "info",
      "isVisible": 0,
      "isHistorized": 0,
      "configuration": {
        "class": 38,
        "value": "",
        "index": 0,
        "instance": 1,
        "minValue": 0,
        "maxValue": 100
      },
      "subtype": "numeric",
      "display": {
        "generic_type": "LIGHT_STATE"
      },
      "unite": "%"
    },
    {
      "name": "Scene",
      "type": "info",
      "isVisible": 0,
      "isHistorized": 0,
      "configuration": {
        "class": 43,
        "value": "",
        "index": 0,
        "instance": 1,
        "repeatEventManagement": "always"
      },
      "subtype": "numeric",
      "display": {
        "generic_type": "DONT"
      },
      "template": {
        "dashboard": "tile",
        "mobile": "tile"
      }
    }
  ],
  "configuration": {
    "1": {
      "name": "Sauvegarde de l'état de l'appareil après une coupure de courant",
      "help": "Valeur par défaut 1 (Sauvegarde)",
      "list": {
        "State NOT saved at power failure, all outputs are set to OFF upon power restore": "Etats non sauvé lors de la coupure de courant, toutes les sorties seront à OFF lors de la remise du courant",
        "State saved at power failure, all outputs are set to previous state upon power restore": "Etats sauvé lors de la coupure de courant, toute les sorties seront à l'état précedent lors de la remise du courant"
      }
    },
    "2": {
      "name": "Type d’interrupteur utilisé sur le commutateur.",
      "help": "Configuration du type d’interrupteur. Valeur par défaut 0 (bouton poussoir)",
      "list": {
        "Mono-stable input (button)": "Interrupteur type poussoir (monostable)",
        "Bi-stable input (switch)": "Interrupteur à 2 positions (bistable)",
        "Role blind switch (UP / DOWN) - two switch keys operate the Dimmer": "Bouton volets roulants (UP/DOWN)"
      }
    },
    "3": {
      "name": "Prise en compte de la position des boutons à 2 états.",
      "help": "Doit on tenir compte d'une position définie ou non. Valeur par défaut 0 (sans position)",
      "list": {
        "For the toggle dimmer without specified on/off position": "Interrupteur sans position définie",
        "For the toggle dimmer with specified on/off position": "Interrupteur avec les positions ON et OFF définies"
      }
    },
    "4": {
      "name": "Activation/Désactivation des fonctions ALL ON / ALL OFF",
      "help": "Activation/Désactivation des fonctions ALL ON / ALL OFF. Valeur par défaut 255 (tout actif)",
      "list": {
        "ALL ON active / ALL OFF active": "ALL ON actif / ALL OFF actif",
        "ALL ON disabled/ ALL OFF disabled": "ALL ON inactif / ALL OFF inactif",
        "ALL ON disabled/ ALL OFF active": "ALL ON inactif / ALL OFF actif",
        "ALL ON active / ALL OFF disabled": "ALL ON actif / ALL OFF inactif"
      }
    },
    "5": {
      "name": "Niveau minimum d’éclairage",
      "help": "Options pour ce paramètre 1-98. Valeur par défaut 1"
    },
    "6": {
      "name": "Niveau maximum d’éclairage",
      "help": "Options pour ce paramètre 2-99. Valeur par défaut 99"
    },
    "7": {
      "name": "Temps de variation d’une étape lors de contrôle manuel",
      "help": "Options pour modifier le paramètre 1-255 par pas de 10ms (10ms - 2,55s). Valeur par défaut 3 (30ms)"
    },
    "8": {
      "name": "Pourcentage de variation d’une étape lors de contrôle manuel",
      "help": "Options pour modifier le paramètre 1-99 (modification non recommandée). Valeur par défaut 1"
    },
    "9": {
      "name": "Temps de variation d’une étape lors de contrôle auto",
      "help": "Options pour modifier le paramètre 1-255 par pas de 10ms (10ms - 2,55s). Valeur par défaut 3 (30ms)"
    },
    "10": {
      "name": "Pourcentage de variation d’une étape lors de contrôle auto",
      "help": "Options pour modifier le paramètre 1-99 (modification non recommandée). Valeur par défaut 1"
    },
    "11": {
      "name": "Fonction timer (auto off).",
      "help": "Exctinction automatique? Valeur par défaut 0 (pas d'extinction auto). Sinon de 1 à 255 secondes"
    },
    "13": {
      "name": "Mode d'allumage sur simple appui S1.",
      "help": "Retour de off à une position définie ou sauvegardée? Valeur par défaut 99 de 1 à 99% à l'appui. Sinon 0 (allumage à la dernière valeur utilisée)"
    },
    "14": {
      "name": "Allumage au double click sur S1.",
      "help": "Doit on tenir compte d'un double click ou non. Valeur par défaut 1 (luminosité max)",
      "list": {
        "Function disabled": "Fonction non active",
        "Reach max brightness level": "Allumage à la luminosité maximale"
      }
    },
    "15": {
      "name": "Report de l'opération du switch 1 vers les groupes 2 et 3.",
      "help": "Lire la doc. Valeur par défaut 0"
    },
    "16": {
      "name": "Report de l'opération du switch 1 vers le groupe 2.",
      "help": "Lire la doc. Valeur par défaut 1",
      "list": {
        "option 00": "option 00",
        "option 01": "option 01"
      }
    },
    "17": {
      "name": "Fonctions du switch 2",
      "help": "Activation/Désactivation des fonctions du switch 2. Valeur par défaut 255 (S2 désactivé)",
      "list": {
        "Disable S2 function": "Désactiver S2",
        "wire with roller blinds switch": "Utiliser avec un bouton volet roulant",
        "enable scene activation and send basic Set On/Off to AG4": "Activer l'utilisation avec scéne et basic on/off",
        "Scene activation only": "Scéne uniquement",
        "Send besic on/off only": "Envoyer de basiques on/off seulement"
      }
    },
    "18": {
      "name": "Report du switch 2 vers le groupe 4",
      "help": "Report des actions sur le S2 vers le groupe 4. Valeur par défaut 0 (basique on off)",
      "list": {
        "No report to G4": "Pas de report",
        "send basic ON and OFF when turn on/off S2": "Basique On et OFF quand S2 est utilisé",
        "only send basic ON": "envoi basique du ON",
        "only send basic OFF": "envoi basique du OFF"
      }
    },
    "19": {
      "name": "Scene ID envoyé vers AG1 quand simple click sur S2.",
      "help": "Lire la doc. Valeur par défaut 0"
    },
    "20": {
      "name": "Scene ID envoyé vers AG1 quand double click sur S2.",
      "help": "Lire la doc. Valeur par défaut 0"
    },
    "21": {
      "name": "Scene ID envoyé vers AG1 quand appui long sur S2.",
      "help": "Lire la doc. Valeur par défaut 0"
    }
  }
}

  • upload de l’image du module dans le répertoire html/plugins/openzwave/core/config/devices/mco_351 avec comme nom 351.8714.20738_mh.p220.dimmer.jpg:
    351.8714.20738_mh.p220.dimmer

  • modification du fichier manufacturer_specific.xml que l’on trouve là: html/plugins/openzwave/resources/openzwaved/config/ en rajoutant la ligne

<Product type="220a" id="5102" name="MH-P220 Micro Dimmer" config="mcohome/mhp220.xml"/>

dans la section du fabricant (ligne 924 par exemple dans le fichier présent dans mon jeedom)

<Manufacturer id="015f" name="Mcohome">

Ensuite on exclus l’appareil s’il avait déjà été inclus puis on l’inclus.

Ca serait sympa si tout cela pouvait être intégré dans une prochaine mise à jour.

Merci pour tout commentaire qui pourrait me faire progresser :wink:

++

1 « J'aime »

Bonjour Noyax37,

Tu n’as pas eu peur de te retrousser les manches !
Bravo.

akenad :slight_smile:

Bonsoir @akenad, merci, je n’allais quand même pas laisser cet appareil dans un tiroir :wink: