Intégration module Tuya-Zigbee TZ3000 (Eclairage 1,2,3,4 gang)

Bonjour,

J’ai exactement le même soucis.
J’ai commencé à explorer les infos que l’on trouve sur :

https://github.com/zigpy/zha-device-handlers/issues/1580
https://github.com/zigpy/zha-device-handlers/discussions/693
https://github.com/zigpy/zha-device-handlers/blob/dev/zhaquirks/tuya/ts000x.py

… sans succès pour l’instant.

Merci pour votre persévérance, moi je suis dépassé.

Bon, sans avoir l’impression de maitriser vraiment ce que j’ai fait, mes modules 2CH fonctionnent. Pour ce faire, je suis parti du fichier quirks Tx000x fourni dans les liens indiqués dans mon post précédent. Celui-ci gère le fameux « TuyaMagicSpell » nécessaire au fonctionnement de ces nouvelles versions de firmware. Je l’ai adapté pour qu’il reconnaisse la signature de mon module TZ3000_zmy4lslw (voir infos brutes dans post précédent).
Plus concrètement, pour faire marcher un module du même type il faut :

  • Recopier le script python ci après dans un fichier que l’on peut appeler tx0002v2.py par exemple (le nom du fichier donne son nom à la classe indiquée dans les infos brutes).
  • Recopier ce fichier dans le répertoire /var/www/html/plugins/zigbee/resources/zigbeed/quirks , puis relancer le deamon du plugin Zigbee
  • Supprimer complètement le module de la base Zigbee (bouton supprimer dans configuration du module, onglet actions). Si besoin refaire une initialisation du module en appuyant 10s sur son bouton.
  • Refaire une inclusion du module
    Le fonctionnement est un peu erratique lors des premières commandes (ex: commande marche ok, puis arrêt du relais sans envoi de commande quelques secondes plus tard), mais ca à priori ca se stabilise après quelques commandes.

Le script à recopier :

import asyncio

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
    Basic,
    GreenPowerProxy,
    Groups,
    Identify,
    OnOff,
    Ota,
    Scenes,
    Time,
)

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODEL,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import (
    TuyaZBE000Cluster,
    TuyaZBExternalSwitchTypeCluster,
    TuyaZBOnOffAttributeCluster,
    # modifs GP: ajout
    TuyaZBElectricalMeasurement,
    TuyaZBMeteringCluster,
    # fin ajout
)


class TuyaMagicSpell(CustomDevice):
    """Cast a magic spell for Tuya devices that needed."""

    def __init__(self, *args, **kwargs):
        """Initialize with task."""
        super().__init__(*args, **kwargs)

        # cast_tuya_magic_spell(self, tries=3)
        self._init_plug_task = asyncio.create_task(self.spell())

    async def spell(self) -> None:
        """Initialize device so that all endpoints become available."""
        basic_cluster = self.endpoints[1].in_clusters[0]

        self.debug("Device class will cast Tuya Magic Spell")
        attr_to_read = [4, 0, 1, 5, 7, 0xFFFE]
        await basic_cluster.read_attributes(attr_to_read)



class Switch_2G_GPP(TuyaMagicSpell, CustomDevice):
    """Tuya 2 gang switch module with restore power state support."""

    signature = {
        MODEL: "TS0002",
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=256
            # device_version=1
            # modifs GP : input_clusters=[3, 4, 5, 6, 1794, 2820,57344, 57345, 0]
            # old : input_clusters=[0, 3, 4, 5, 6, 57344, 57345]
            # output_clusters=[10, 25]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout                    
                    TuyaZBE000Cluster.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                    #modif GP: basic déplacé à la fin                    
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            # <SimpleDescriptor endpoint=2 profile=260 device_type=256
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
            # device_version=0
            # input_clusters=[]
            # output_clusters=[33]>
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }
5 « J'aime »

Bonsoir, comme tu dis sans en avoir l’air… et bien ce matin j’ai reçu un 2CH et j’ai constaté le problème de déclenchement simultané des 2 switch avec impossibilité de les dissocier. Direct une recherche et je tombe sur le seul post qui parle du sujet. Je le lis jusqu’au bout et je tombe sur ta proposition de solution. J’ai appliqué ta méthode à la lettre et cela à fonctionné du premier coup.

Alors ce petit mot pour confirmer que ta soluce est ok et te dire bravo pour ta persévérance.

2 « J'aime »

Hello

ça marche aussi sur mon 2 voies TZ3000_zmy4lslw.TS0002, merci beaucoup !!!

Je n’aurai pas le temps ce WE, mais je vais regarder comment adapter pour ceux de la même série en 1 voie ( peu d’interet ) 3 voies et 4 voies:

TZ3000_tqlv4ug4.TS0001
TZ3000_odzoiovu.TS0003
TZ3000_ltt60asa.TS0004

Merci beaucoup !

1 « J'aime »

Bonjour

J’ai finalement trouvé une heure.

En dupliquant la classe Switch_2G_GPP pour 3 et 4, ça fonctionne parfaitement aussi pour les références indiquées plus haut.

Ci après le fichier ( j’ai conservé le nom ts000xv2.py ):

import asyncio

from zigpy.profiles import zha
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import (
    Basic,
    GreenPowerProxy,
    Groups,
    Identify,
    OnOff,
    Ota,
    Scenes,
    Time,
)

from zhaquirks.const import (
    DEVICE_TYPE,
    ENDPOINTS,
    INPUT_CLUSTERS,
    MODEL,
    OUTPUT_CLUSTERS,
    PROFILE_ID,
)
from zhaquirks.tuya import (
    TuyaZBE000Cluster,
    TuyaZBExternalSwitchTypeCluster,
    TuyaZBOnOffAttributeCluster,
    # modifs GP: ajout
    TuyaZBElectricalMeasurement,
    TuyaZBMeteringCluster,
    # fin ajout
)


class TuyaMagicSpell(CustomDevice):
    """Cast a magic spell for Tuya devices that needed."""

    def __init__(self, *args, **kwargs):
        """Initialize with task."""
        super().__init__(*args, **kwargs)

        # cast_tuya_magic_spell(self, tries=3)
        self._init_plug_task = asyncio.create_task(self.spell())

    async def spell(self) -> None:
        """Initialize device so that all endpoints become available."""
        basic_cluster = self.endpoints[1].in_clusters[0]

        self.debug("Device class will cast Tuya Magic Spell")
        attr_to_read = [4, 0, 1, 5, 7, 0xFFFE]
        await basic_cluster.read_attributes(attr_to_read)



class Switch_2G_GPP(TuyaMagicSpell, CustomDevice):
    """Tuya 2 gang switch module with restore power state support."""

    signature = {
        MODEL: "TS0002",
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=256
            # device_version=1
            # modifs GP : input_clusters=[3, 4, 5, 6, 1794, 2820,57344, 57345, 0]
            # old : input_clusters=[0, 3, 4, 5, 6, 57344, 57345]
            # output_clusters=[10, 25]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout                    
                    TuyaZBE000Cluster.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                    #modif GP: basic déplacé à la fin                    
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            # <SimpleDescriptor endpoint=2 profile=260 device_type=256
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
            # device_version=0
            # input_clusters=[]
            # output_clusters=[33]>
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

class Switch_3G_GPP(TuyaMagicSpell, CustomDevice):
    """Tuya 3 gang switch module with restore power state support."""

    signature = {
        MODEL: "TS0003",
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=256
            # device_version=1
            # modifs GP : input_clusters=[3, 4, 5, 6, 1794, 2820,57344, 57345, 0]
            # old : input_clusters=[0, 3, 4, 5, 6, 57344, 57345]
            # output_clusters=[10, 25]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout                    
                    TuyaZBE000Cluster.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                    #modif GP: basic déplacé à la fin                    
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            # <SimpleDescriptor endpoint=2 profile=260 device_type=256
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=3 profile=260 device_type=256
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
            # device_version=0
            # input_clusters=[]
            # output_clusters=[33]>
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

class Switch_4G_GPP(TuyaMagicSpell, CustomDevice):
    """Tuya 4 gang switch module with restore power state support."""

    signature = {
        MODEL: "TS0004",
        ENDPOINTS: {
            # <SimpleDescriptor endpoint=1 profile=260 device_type=256
            # device_version=1
            # modifs GP : input_clusters=[3, 4, 5, 6, 1794, 2820,57344, 57345, 0]
            # old : input_clusters=[0, 3, 4, 5, 6, 57344, 57345]
            # output_clusters=[10, 25]>
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout                    
                    TuyaZBE000Cluster.cluster_id,
                    TuyaZBExternalSwitchTypeCluster.cluster_id,
                    #modif GP: basic déplacé à la fin                    
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            # <SimpleDescriptor endpoint=2 profile=260 device_type=256
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=3 profile=260 device_type=256
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=4 profile=260 device_type=256
            # device_version=1
            # input_clusters=[4, 5, 6, 57345]
            # output_clusters=[]>
            4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    OnOff.cluster_id,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster.cluster_id,
                ],
                OUTPUT_CLUSTERS: [],
            },
            # <SimpleDescriptor endpoint=242 profile=41440 device_type=97
            # device_version=0
            # input_clusters=[]
            # output_clusters=[33]>
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }
    replacement = {
        ENDPOINTS: {
            1: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Identify.cluster_id,
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    TuyaZBE000Cluster,
                    TuyaZBExternalSwitchTypeCluster,
                    #Modifs GP: ajout
                    TuyaZBMeteringCluster.cluster_id,
                    TuyaZBElectricalMeasurement.cluster_id,
                    #fin ajout
                    Basic.cluster_id,
                ],
                OUTPUT_CLUSTERS: [Time.cluster_id, Ota.cluster_id],
            },
            2: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            3: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            4: {
                PROFILE_ID: zha.PROFILE_ID,
                DEVICE_TYPE: zha.DeviceType.ON_OFF_LIGHT,
                INPUT_CLUSTERS: [
                    Groups.cluster_id,
                    Scenes.cluster_id,
                    TuyaZBOnOffAttributeCluster,
                    #modif GP: ligne suivante supprimée
                    #TuyaZBExternalSwitchTypeCluster,
                ],
                OUTPUT_CLUSTERS: [],
            },
            242: {
                PROFILE_ID: 41440,
                DEVICE_TYPE: 97,
                INPUT_CLUSTERS: [],
                OUTPUT_CLUSTERS: [GreenPowerProxy.cluster_id],
            },
        },
    }

Je pense que la résolution définitive et stable serait l’inclusion de ce code dans le package zhaquirks. Si un dev passe par là … je ne sais pas trop ou publier, c’est une dépendance du plugin zigbee, pas dans le plugin lui-même …

3 « J'aime »

Bonsoir à tous,

Merci pour votre persévérance et votre implication.
Je vais reprendre mes modules qui on se problème, et vais essayer votre méthode dans les jours qui viennent.
Encore merci à tous.

Bonjour,

J’ai donc essayé cette méthode sur mes modules en V70, et cela fonctionne parfaitement. Même mieux que ce que je demandais, puisque il est aussi à nouveau possible de régler l’état des relais à la mise sous tension (en cas de coupure de courant).

Alors encor merci à tous et joyeuses fêtes de fin d’année.

1 « J'aime »

Bonjour
Je suis sur le plugin-deconz avec conbee2. J’ai créé un post Pb Switch tuyaZigbee 4 gangs séparation des voies
pour traiter dans le bon forum.
J’ai exactement le même pb dans deconz. qq saurait il quoi faire pour adapter la solution ci dessus ?
ex le chemin
/usr/local/lib/python3.7/dist-packages/zhaquirks/tuya/ n’existe pas avec le plugin deconz.
Merci d’avance

1 « J'aime »

Bonjour,
Merci pour la solution, cela fonctionne, l’app version est 72 et non 70
Bonne soirée

Bonjour et merci pour l’investigation.
J’ai essayé la solution pour faire marcher mon interrupteur 3 voies: TZ3000_qewo8dlz.TS0013

J’ai suivi la méthode de @sylvainbecu, relancé le cron du module zigbee puis ré associé mon interrupteur. J’ai choisi un modèle 3 gang, donc un TS0003 mais j’ai toujours le même problème.

Quand j’active via jeedom un bouton, les 2 autres s’activent aussi et quand j’éteins, tous s’éteignent.
J’ai peut être raté quelque chose?

Merci par avance pour votre aide.

Voici les caractéristiques du module:

{
                    "id": 0,
                    "name": "Basic",
                    "attributes": [
                        {
                            "id": 0,
                            "name": "zcl_version",
                            "value": 3
                        },
                        {
                            "id": 1,
                            "name": "app_version",
                            "value": 80
                        },
                        {
                            "id": 2,
                            "name": "stack_version",
                            "value": 0
                        },
                        {
                            "id": 3,
                            "name": "hw_version",
                            "value": 1
                        },
                        {
                            "id": 4,
                            "name": "manufacturer",
                            "value": "_TZ3000_qewo8dlz"
                        },
                        {
                            "id": 5,
                            "name": "model",
                            "value": "TS0013"
                        },
                        {
                            "id": 6,
                            "name": "date_code",
                            "value": ""
                        },
                        {
                            "id": 7,
                            "name": "power_source",
                            "value": 3
                        }
                    ]
                }

Bonjour à tous,
Je viens également de faire l’acquisition d’un Switch 4 gangs TZ3000_ltt60asa.TS0004 et j’observe le même problème de déclenchement simultané des 4 gangs.
J’ai créé, comme indiqué par @gg78 et @sylvainbecu, un fichier ts0004v2.py mis dans le répertoire /var/www/html/plugins/zigbee/resources//zigbeed/quirks/ du plugin et dans lequel j’ai intégré les 3 classes Switch_xG_GPP, j’ai relancé le démon et refais une inclusion du module (module reconnu et paramétré directement), mais j’ai toujours le même problème.

Le module est en version 70 et le nom de la classe ts0004v2 apparait bien dans les infos brutes.

Auriez vous une piste pour corriger le problème ?
Merci beaucoup.

{
    "ieee": "a4:c1:38:04:f8:--:--:--",
    "nwk": 4926,
    "status": 2,
    "lqi": "0",
    "rssi": "None",
    "last_seen": "1678710950.071575",
    "node_descriptor": "01:40:8e:41:11:42:42:00:00:2a:42:00:00",
    "endpoints": [
        {
            "id": 1,
            "status": 1,
            "device_type": 256,
            "profile_id": 260,
            "manufacturer": "_TZ3000_ltt60asa",
            "model": "TS0004",
            "output_clusters": [
                {
                    "id": 10,
                    "name": "Time",
                    "attributes": []
                },
                {
                    "id": 25,
                    "name": "Ota",
                    "attributes": []
                }
            ],
            "input_clusters": [
                {
                    "id": 3,
                    "name": "Identify",
                    "attributes": []
                },
                {
                    "id": 4,
                    "name": "Groups",
                    "attributes": []
                },
                {
                    "id": 5,
                    "name": "Scenes",
                    "attributes": []
                },
                {
                    "id": 6,
                    "name": "On\/Off",
                    "attributes": [
                        {
                            "id": 0,
                            "name": "on_off",
                            "value": 1
                        },
                        {
                            "id": 16385,
                            "name": "on_time",
                            "value": 0
                        },
                        {
                            "id": 16386,
                            "name": "off_wait_time",
                            "value": 0
                        },
                        {
                            "id": 32770,
                            "name": "power_on_state",
                            "value": 2
                        }
                    ]
                },
                {
                    "id": 57344,
                    "name": "Tuya Manufacturer Specific",
                    "attributes": []
                },
                {
                    "id": 57345,
                    "name": "Tuya External Switch Type Cluster",
                    "attributes": [
                        {
                            "id": 53296,
                            "name": "external_switch_type",
                            "value": 2
                        }
                    ]
                },
                {
                    "id": 1794,
                    "name": "Metering",
                    "attributes": []
                },
                {
                    "id": 2820,
                    "name": "Electrical Measurement",
                    "attributes": [
                        {
                            "id": 1291,
                            "name": "active_power",
                            "value": 0
                        }
                    ]
                },
                {
                    "id": 0,
                    "name": "Basic",
                    "attributes": [
                        {
                            "id": 0,
                            "name": "zcl_version",
                            "value": 3
                        },
                        {
                            "id": 1,
                            "name": "app_version",
                            "value": 70
                        },
                        {
                            "id": 2,
                            "name": "stack_version",
                            "value": 0
                        },
                        {
                            "id": 3,
                            "name": "hw_version",
                            "value": 1
                        },
                        {
                            "id": 4,
                            "name": "manufacturer",
                            "value": "_TZ3000_ltt60asa"
                        },
                        {
                            "id": 5,
                            "name": "model",
                            "value": "TS0004"
                        },
                        {
                            "id": 6,
                            "name": "date_code",
                            "value": ""
                        },
                        {
                            "id": 7,
                            "name": "power_source",
                            "value": 1
                        }
                    ]
                }
            ]
        },
        {
            "id": 2,
            "status": 1,
            "device_type": 256,
            "profile_id": 260,
            "manufacturer": null,
            "model": null,
            "output_clusters": [],
            "input_clusters": [
                {
                    "id": 4,
                    "name": "Groups",
                    "attributes": []
                },
                {
                    "id": 5,
                    "name": "Scenes",
                    "attributes": []
                },
                {
                    "id": 6,
                    "name": "On\/Off",
                    "attributes": [
                        {
                            "id": 0,
                            "name": "on_off",
                            "value": 1
                        },
                        {
                            "id": 16385,
                            "name": "on_time",
                            "value": 0
                        },
                        {
                            "id": 16386,
                            "name": "off_wait_time",
                            "value": 0
                        }
                    ]
                }
            ]
        },
        {
            "id": 3,
            "status": 1,
            "device_type": 256,
            "profile_id": 260,
            "manufacturer": null,
            "model": null,
            "output_clusters": [],
            "input_clusters": [
                {
                    "id": 4,
                    "name": "Groups",
                    "attributes": []
                },
                {
                    "id": 5,
                    "name": "Scenes",
                    "attributes": []
                },
                {
                    "id": 6,
                    "name": "On\/Off",
                    "attributes": [
                        {
                            "id": 0,
                            "name": "on_off",
                            "value": 1
                        },
                        {
                            "id": 16385,
                            "name": "on_time",
                            "value": 0
                        },
                        {
                            "id": 16386,
                            "name": "off_wait_time",
                            "value": 0
                        }
                    ]
                }
            ]
        },
        {
            "id": 4,
            "status": 1,
            "device_type": 256,
            "profile_id": 260,
            "manufacturer": null,
            "model": null,
            "output_clusters": [],
            "input_clusters": [
                {
                    "id": 4,
                    "name": "Groups",
                    "attributes": []
                },
                {
                    "id": 5,
                    "name": "Scenes",
                    "attributes": []
                },
                {
                    "id": 6,
                    "name": "On\/Off",
                    "attributes": [
                        {
                            "id": 0,
                            "name": "on_off",
                            "value": 1
                        },
                        {
                            "id": 16385,
                            "name": "on_time",
                            "value": 0
                        },
                        {
                            "id": 16386,
                            "name": "off_wait_time",
                            "value": 0
                        }
                    ]
                }
            ]
        },
        {
            "id": 242,
            "status": 1,
            "device_type": 97,
            "profile_id": 41440,
            "manufacturer": null,
            "model": null,
            "output_clusters": [
                {
                    "id": 33,
                    "name": "GreenPowerProxy",
                    "attributes": []
                }
            ],
            "input_clusters": []
        }
    ],
    "signature": {
        "manufacturer": "_TZ3000_ltt60asa",
        "model": "TS0004",
        "node_desc": {
            "logical_type": 1,
            "complex_descriptor_available": 0,
            "user_descriptor_available": 0,
            "reserved": 0,
            "aps_flags": 0,
            "frequency_band": 8,
            "mac_capability_flags": 142,
            "manufacturer_code": 4417,
            "maximum_buffer_size": 66,
            "maximum_incoming_transfer_size": 66,
            "server_mask": 10752,
            "maximum_outgoing_transfer_size": 66,
            "descriptor_capability_field": 0
        },
        "endpoints": {
            "1": {
                "profile_id": 260,
                "device_type": 256,
                "input_clusters": [
                    3,
                    4,
                    5,
                    6,
                    57344,
                    57345,
                    1794,
                    2820,
                    0
                ],
                "output_clusters": [
                    10,
                    25
                ]
            },
            "2": {
                "profile_id": 260,
                "device_type": 256,
                "input_clusters": [
                    4,
                    5,
                    6
                ],
                "output_clusters": []
            },
            "3": {
                "profile_id": 260,
                "device_type": 256,
                "input_clusters": [
                    4,
                    5,
                    6
                ],
                "output_clusters": []
            },
            "4": {
                "profile_id": 260,
                "device_type": 256,
                "input_clusters": [
                    4,
                    5,
                    6
                ],
                "output_clusters": []
            },
            "242": {
                "profile_id": 41440,
                "device_type": 97,
                "input_clusters": [],
                "output_clusters": [
                    33
                ]
            }
        }
    },
    "class": "ts0004v2"
}

@gg78 . pourrais tu nous dire quelles lignes dans ton script sont à adapter vs les info dispo dans les info brutes?
J’ai aussi le même souci avec un autre modules 4 voies.
Merci d’avance.

1 « J'aime »

Bonjour,
J’ai le même problème …
Mon module est en version 70.
Avez vous eu des News ?
Merci et bonne journée

malheureusement @gg78 ou d’autres ne m’ont jamais donné les info … c’est bien dommage.

Bonsoir,
Personnellement j’ai appliqué la méthode de GG78 sans rien modifier au script ni même changer le nom. Attention avant de réinclure le module, il faut bien penser à le supprimer dans la configuration du module (plugin zigbee → ton module → configuration du module → action → suprimer) ensuite suprimer le module du plugin.

Bonjour,

Avez-avez vous résolut votre problématique?
J’ai le même soucis sur une version 80, class": « zigpy.device »

Salut

Le plugin zigbee est en fin de vie. Tu devrais passer à zigbeelinker ou jeezigbee. Je n’ai pas trouvé d’issue pour ce matériel sur leur github.

Antoine

Ce sujet a été automatiquement fermé après 30 jours. Aucune réponse n’est permise dorénavant.