AYapejian / node-red-contrib-home-assistant

Home Assistant + Node-Red
MIT License
75 stars 33 forks source link

DeCONZ long release or hold commands not working #72

Open FezVrasta opened 6 years ago

FezVrasta commented 6 years ago

Describe the bug The DeCONZ events received by the remotes don't seem to work properly, I can only get "short release" (short press) events, while "long release" and "hold" seem to be flaky, I managed to trigger a long release event only once.

I'm sure it's a bug with this package because the same events work just fine if controlled using the built-in Home Assistant automation scripts.

To Reproduce Steps to reproduce the behavior:

  1. Read a deconz_event from the events: all node
  2. Log all the msg.payload.event.event codes using debugger
  3. Notice how, after long pressing the detected events are only ending with 2 (short release)

Expected behavior All the deconz event should be detected

Screenshot image

Example Flow

[
  {
    id: "e9415866.e8e818",
    type: "server-events",
    z: "20911376.3811fc",
    name: "Home Assistant",
    server: "a513c2af.8fb5c",
    x: 240,
    y: 480,
    wires: [["d064837b.5c32e"]]
  },
  {
    id: "5ed9b78f.5f6e08",
    type: "debug",
    z: "20911376.3811fc",
    name: "",
    active: true,
    tosidebar: true,
    console: false,
    tostatus: false,
    complete: "payload.event.event",
    x: 690,
    y: 480,
    wires: []
  },
  {
    id: "d064837b.5c32e",
    type: "function",
    z: "20911376.3811fc",
    name: "is deconz event",
    func:
      "if (msg.event_type === 'deconz_event') {\n    return msg\n}\nreturn null;",
    outputs: 1,
    noerr: 0,
    x: 440,
    y: 480,
    wires: [["5ed9b78f.5f6e08"]]
  },
  {
    id: "a513c2af.8fb5c",
    type: "server",
    z: "",
    name: "Home Assistant",
    url: "https://127.0.0.1:8123",
    pass: "xxxxxxx"
  }
];

Environment (please complete the following information):

Other (please complete the following information):

Additional context

The below Home Assistant action works just fine, as you can see it's listening for the 2001 event (button hold)

- action:
  - data_template:
      brightness: 255
      entity_id: light.kitchen
    service: light.turn_on
  alias: Brighten to max kitchen lights
  condition: []
  id: '1519727307662'
  trigger:
  - event_data:
      event: 2001
      id: kitchen_remote
    event_type: deconz_event
    platform: event
  hide_entity: true
jonathanweinberg commented 6 years ago

Are you using Lutron Connect Bulb Remotes?

FezVrasta commented 6 years ago

Nope it's the Ikea Remote. Lately it started to work more reliably, at least for the "long press", the "hold" still doesn't work tho

jonathanweinberg commented 6 years ago

Hmmm. I have the Lutron if you couldn’t guess. Let me post my flow in the morning that I’ve been using. It works...okay-ish.

Jonathan Weinberg


From: Federico Zivolo notifications@github.com Sent: Saturday, May 26, 2018 3:52:29 AM To: AYapejian/node-red-contrib-home-assistant Cc: Jonathan D Weinberg; Comment Subject: Re: [AYapejian/node-red-contrib-home-assistant] DeCONZ long release or hold commands not working (#72)

Nope it's the Ikea Remote. Lately it started to work more reliably, at least for the "long press", the "hold" still doesn't work tho

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/AYapejian/node-red-contrib-home-assistant/issues/72#issuecomment-392244550, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACDTU9_e9fbOaJrQGHRczrsPGmoxn0f-ks5t2Qm9gaJpZM4T6O5w.