Déclenchement service via entitées de scènes NodOn Soft Remote

Mon problème

J’ai intégré la télécommande NodON CRC-3-6-0x à zwaveJS. Le pb est qu’il manque les entitées pour contrôler les boutons…

Toutes les commandes sont pourtant bien enregistrées dans Zwave:

Une idée de ce qui ne va pas? A savoir que sur Homey ça fonctionnait très bien.

Ma configuration


System Health

version core-2021.2.3
installation_type Home Assistant OS
dev false
hassio true
docker true
virtualenv false
python_version 3.8.7
os_name Linux
os_version 5.4.99
arch x86_64
timezone Europe/Paris
Home Assistant Community Store
GitHub API ok
Github API Calls Remaining 4578
Installed Version 1.11.3
Stage running
Available Repositories 748
Installed Repositories 6
Home Assistant Cloud
logged_in true
subscription_expiration 9 mars 2021 à 01:00
relayer_connected true
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Hass.io
host_os Home Assistant OS 5.12
update_channel stable
supervisor_version supervisor-2021.02.11
docker_version 19.03.13
disk_total 30.8 GB
disk_used 7.0 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Terminal & SSH (9.0.2), File editor (5.2.0), Samba share (9.3.0), OpenZWave (0.9.1), Mosquitto broker (5.1.1), Z-Wave JS to MQTT (0.5.0), Bitwarden RS (0.8.0), Duck DNS (1.12.5), Let’s Encrypt (4.11.0)
Lovelace
dashboards 1
resources 4
views 5
mode storage
___

J’ai trouvé comment activer les boutons, la fonction par défaut « central scene » ne fonctionne pas. Il faut donc modifier la bon paramètre en « scene activation »:

image

Mon problème devient maintenant un pb YAML de déclenchement. Voici mon automatisation:

alias: Test bouton + portail
description: ''
trigger:
  - platform: event
    event_type: zwave.scene_activated
    event_data:
      node_id: 45
      scene_value_id: 20
condition: []
action:
  - service: switch.turn_on
    entity_id: switch.portail
mode: single

J’ai beau vérifier 15 fois, je ne trouve pas ce qui empêche le déclenchement du service. Le node est bien le 45 et le bouton est bien le 20. C’est le log qui me le dit quand j’appuie sur le bouton:

2021-03-01 17:45:09.358 INFO ZWAVE: Node 45: value notification: 43-0-sceneId 20
2021-03-01 17:45:09.363 INFO ZWAVE: Node 45: value updated: 43-0-dimmingDuration [Duration: 0seconds] => [Duration: 0seconds]
2021-03-01 17:45:09.676 INFO ZWAVE: Node 45 is now awake
2021-03-01 17:45:09.739 INFO ZWAVE: Node 45: value updated: 132-0-wakeUpInterval 0 => 0
2021-03-01 17:45:09.741 INFO ZWAVE: Node 45: value updated: 132-0-controllerNodeId 1 => 1
2021-03-01 17:45:10.788 INFO ZWAVE: Node 45 is now asleep

Node 45 sceneId 20. Quand j’execute l’automatisation à la main, cela fonctionne, le service est bien appelé. Mais quand j’appuie sur le bouton du NodOn, rien n’est déclenché.

C’est pas plutôt scene_id ?

Nan, j’ai essayé aussi mais j’avais le même pb que lui:

Et qu’affiche l’écouteur ?

Tu le trouve dans Outils de développement → Onglet ÉVÉNEMENTS

Tu mets * pour écouter tous les événements et tu appuis sur le bouton de la télécommande.

Tu récupéreras le message et tu verras les paramètres qu’il te faut utiliser (pense à arrêter l’écouteur sinon tu va te faire spammer de message :wink:)

Voici ce que ça donne en mode Central Scene:

Événement 0 déclenché 18:42:

{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 45,
        "home_id": 3261817885,
        "endpoint": null,
        "device_id": "bc1620abe763b138777f0f258019bae9",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 002",
        "property_name": "scene",
        "property_key_name": "002",
        "value": "KeyPressed"
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-01T17:42:59.977496+00:00",
    "context": {
        "id": "d067701c05c74d93f63e0e12a5dbce39",
        "parent_id": null,
        "user_id": null
    }
}

Et en mode Scene Activation:

{
    "event_type": "zwave_js_event",
    "data": {
        "type": "value_notification",
        "domain": "zwave_js",
        "node_id": 45,
        "home_id": 3261817885,
        "endpoint": 0,
        "device_id": "bc1620abe763b138777f0f258019bae9",
        "command_class": 43,
        "command_class_name": "Scene Activation",
        "label": "Scene ID",
        "property_name": "sceneId",
        "property_key_name": null,
        "value": 20
    },
    "origin": "LOCAL",
    "time_fired": "2021-03-01T19:18:56.377255+00:00",
    "context": {
        "id": "3c6455ad41bb02266b4b2d320b08c216",
        "parent_id": null,
        "user_id": null
    }
}

Le type d’event était faux, c’est « zwave_js_event », mais ça ne change pas le pb… il doit y avoir quelque chose avec l’id de scene mais j’ai essayé plusieurs formats (sceneId, sceneId_value etc) sans succès.

Si tu regarde mieux c’est ni l’un ni l’autre mais value:innocent:

Tu peux à la rigueur ajouter d’autre propriétés si tu veux plus de contrôle (au moins le device_id pour ma part) :

alias: Test bouton + portail
description: ''
trigger:
  - platform: event
    event_type: zwave_js_event
    event_data:
      node_id: 45
      value: 20
      #property_name: sceneId
      #home_id: 3261817885
      device_id: bc1620abe763b138777f0f258019bae9
condition: []
action:
  - service: switch.turn_on
    entity_id: switch.portail
mode: single

Je me doutais que c’était un truc con mais là… j’y ai passé 3h aujourd’hui à faire des tests. :dizzy_face:

Je tente demain, car là c’est séance PS5! Merci!

Bon ba ça fonctionne avec « value »… Merci @Clemalex je vais retenir l’astuce d’écouter un service pour avoir les commandes.

1 « J'aime »

C’est plus une bonne pratique qu’une astuce… :innocent: :smiling_face_with_three_hearts:

Hello,

Je viens d’acquérir cette télécommande mais elle me semble complexe…

@Clemalex j’ai suivi tes recommandations pour l’écoute avec * mais je ne vois pas bien…

Je souhaiterai commander un volet roulant avec le bouton + mais je ne vois pas bien comment faire…

voici ce que j’obtiens quand j’écoute :

Événement 149 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "localhost",
            "payload": "{\"event_type\": \"call_service\", \"event_data\": {\"domain\": \"mqtt\", \"service\": \"publish\", \"service_data\": {\"topic\": \"homeassistant/sensor/last_clock_synchronization_2/device_class\", \"qos\": 1, \"retain\": true, \"payload\": \"\\\"timestamp\\\"\"}}}"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.399540+00:00",
    "context": {
        "id": "826890f81153175c9060143b87f0536a",
        "parent_id": null,
        "user_id": null
    }
}

Événement 148 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "localhost",
            "payload": "{\"event_type\": \"call_service\", \"event_data\": {\"domain\": \"mqtt\", \"service\": \"publish\", \"service_data\": {\"topic\": \"homeassistant/sensor/last_clock_synchronization_2/friendly_name\", \"qos\": 1, \"retain\": true, \"payload\": \"\\\"Last Clock Synchronization\\\"\"}}}"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.398724+00:00",
    "context": {
        "id": "e05fc5821c62553471fb9ae8297df429",
        "parent_id": null,
        "user_id": null
    }
}

Événement 147 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "localhost",
            "payload": "{\"event_type\": \"call_service\", \"event_data\": {\"domain\": \"mqtt\", \"service\": \"publish\", \"service_data\": {\"topic\": \"homeassistant/sensor/last_clock_synchronization_2/last_changed\", \"qos\": 1, \"retain\": true, \"payload\": \"2021-09-23T18:47:46.368703+00:00\"}}}"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.398234+00:00",
    "context": {
        "id": "ce35ba7ff372d927ee782cada7620da3",
        "parent_id": null,
        "user_id": null
    }
}

Événement 146 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "localhost",
            "payload": "{\"event_type\": \"call_service\", \"event_data\": {\"domain\": \"mqtt\", \"service\": \"publish\", \"service_data\": {\"topic\": \"homeassistant/sensor/last_clock_synchronization_2/last_updated\", \"qos\": 1, \"retain\": true, \"payload\": \"2021-09-23T18:47:46.368703+00:00\"}}}"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.397734+00:00",
    "context": {
        "id": "3050038ff504625a3129ff1e50fa9a4d",
        "parent_id": null,
        "user_id": null
    }
}

Événement 145 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "localhost",
            "payload": "{\"event_type\": \"call_service\", \"event_data\": {\"domain\": \"mqtt\", \"service\": \"publish\", \"service_data\": {\"topic\": \"homeassistant/sensor/last_clock_synchronization_2/state\", \"qos\": 1, \"retain\": true, \"payload\": \"1970-01-21 20:47:46+01:00\"}}}"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.397104+00:00",
    "context": {
        "id": "12b1cd47c5bf5c089e33dd34156aba96",
        "parent_id": null,
        "user_id": null
    }
}

Événement 144 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "homeassistant/sensor/last_clock_synchronization_2/device_class",
            "qos": 1,
            "retain": true,
            "payload": "\"timestamp\""
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.377862+00:00",
    "context": {
        "id": "eae258630d46e29052b2e11649b43425",
        "parent_id": null,
        "user_id": null
    }
}

Événement 143 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "homeassistant/sensor/last_clock_synchronization_2/friendly_name",
            "qos": 1,
            "retain": true,
            "payload": "\"Last Clock Synchronization\""
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.377397+00:00",
    "context": {
        "id": "cdee39f910dc322cfdb04730a1348e25",
        "parent_id": null,
        "user_id": null
    }
}

Événement 142 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "homeassistant/sensor/last_clock_synchronization_2/last_changed",
            "qos": 1,
            "retain": true,
            "payload": "2021-09-23T18:47:46.368703+00:00"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.376924+00:00",
    "context": {
        "id": "5bfcb91cf5f65678449e53d2d28ab7c9",
        "parent_id": null,
        "user_id": null
    }
}

Événement 141 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "homeassistant/sensor/last_clock_synchronization_2/last_updated",
            "qos": 1,
            "retain": true,
            "payload": "2021-09-23T18:47:46.368703+00:00"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.376434+00:00",
    "context": {
        "id": "af4edac7e01491c80bbf9caba839ea3e",
        "parent_id": null,
        "user_id": null
    }
}

Événement 140 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "homeassistant/sensor/last_clock_synchronization_2/state",
            "qos": 1,
            "retain": true,
            "payload": "1970-01-21 20:47:46+01:00"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.375898+00:00",
    "context": {
        "id": "5a3f8f380f507af96d8f595cc36f4abf",
        "parent_id": null,
        "user_id": null
    }
}

Événement 139 déclenché 20:47:

{
    "event_type": "call_service",
    "data": {
        "domain": "mqtt",
        "service": "publish",
        "service_data": {
            "topic": "localhost",
            "payload": "{\"event_type\": \"state_changed\", \"event_data\": {\"entity_id\": \"sensor.last_clock_synchronization_2\", \"old_state\": {\"entity_id\": \"sensor.last_clock_synchronization_2\", \"state\": \"1970-01-21 20:46:46+01:00\", \"attributes\": {\"friendly_name\": \"Last Clock Synchronization\", \"device_class\": \"timestamp\"}, \"last_changed\": \"2021-09-23T18:46:46.705207+00:00\", \"last_updated\": \"2021-09-23T18:46:46.705207+00:00\", \"context\": {\"id\": \"6ea919a05aa3e63ada74e9231f962fc7\", \"parent_id\": null, \"user_id\": null}}, \"new_state\": {\"entity_id\": \"sensor.last_clock_synchronization_2\", \"state\": \"1970-01-21 20:47:46+01:00\", \"attributes\": {\"friendly_name\": \"Last Clock Synchronization\", \"device_class\": \"timestamp\"}, \"last_changed\": \"2021-09-23T18:47:46.368703+00:00\", \"last_updated\": \"2021-09-23T18:47:46.368703+00:00\", \"context\": {\"id\": \"9349098270d43509df203e68b56d4480\", \"parent_id\": null, \"user_id\": null}}}}"
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.374442+00:00",
    "context": {
        "id": "ff177d41d280d04c34c28e756af84133",
        "parent_id": null,
        "user_id": null
    }
}

Événement 138 déclenché 20:47:

{
    "event_type": "state_changed",
    "data": {
        "entity_id": "sensor.last_clock_synchronization_2",
        "old_state": {
            "entity_id": "sensor.last_clock_synchronization_2",
            "state": "1970-01-21 20:46:46+01:00",
            "attributes": {
                "friendly_name": "Last Clock Synchronization",
                "device_class": "timestamp"
            },
            "last_changed": "2021-09-23T18:46:46.705207+00:00",
            "last_updated": "2021-09-23T18:46:46.705207+00:00",
            "context": {
                "id": "6ea919a05aa3e63ada74e9231f962fc7",
                "parent_id": null,
                "user_id": null
            }
        },
        "new_state": {
            "entity_id": "sensor.last_clock_synchronization_2",
            "state": "1970-01-21 20:47:46+01:00",
            "attributes": {
                "friendly_name": "Last Clock Synchronization",
                "device_class": "timestamp"
            },
            "last_changed": "2021-09-23T18:47:46.368703+00:00",
            "last_updated": "2021-09-23T18:47:46.368703+00:00",
            "context": {
                "id": "9349098270d43509df203e68b56d4480",
                "parent_id": null,
                "user_id": null
            }
        }
    },
    "origin": "LOCAL",
    "time_fired": "2021-09-23T18:47:46.368703+00:00",
    "context": {
        "id": "9349098270d43509df203e68b56d4480",
        "parent_id": null,
        "user_id": null
    }
}


Merci d’avance pour votre aide et support

Et voici la configuration sur zwwavejs2mqtt :

Désolé, j’avais mal lu les informations de l’écoute…
Ça fonctionne maintenant ! Merci !

1 « J'aime »