Giter VIP home page Giter VIP logo

Comments (11)

Koenkk avatar Koenkk commented on July 17, 2024

I don't think messages of the dimmer are the issue, but that the automation made based on the dimmer are an issue. Due to Koenkk/zigbee-herdsman-converters@ad29b2b it publishes more frequent -> if your automation responds to all of them using e.g. a dim command on a zigbee bulb, there will be a lot of commands.

from zigbee-herdsman.

h4nc avatar h4nc commented on July 17, 2024

I see, thanks. Wasn't thinking of that. Was thinking that z2m must be the issue because this is what I changed.

So the issue that I had to reflash my device way most probably something different, I had an error there but did not save it (sry). Can't find it in the logs any more.

This is my automation. Would it be better to use the sensor entity of the dimmer? I think this would probably change to often too? Or maybe adding some delay to the action at the end would help. But there is probably a more elegant way to do this.

- alias:  ikea rotate - plus
  initial_state: 'on'
  trigger:
    platform: mqtt
    topic: 'zigbee2mqtt/ikea dimmer'
  condition:
    - condition: template
      value_template: "{{ trigger.payload_json.action in ['rotate_right', 'rotate_right_quick'] }}"
    - condition: state
      entity_id: light.wz
      state: 'on'             
  action:         
    - service: light.turn_on
      data_template:
        entity_id: light.wz
        brightness: "{{  states.light.wz.attributes.brightness | int + 25 }}"

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

From the zigbee2mqtt side you can use the debounce: https://www.zigbee2mqtt.io/information/configuration.html#device-specific-configuration

from zigbee-herdsman.

h4nc avatar h4nc commented on July 17, 2024

Perfect solution, thanks!

from zigbee-herdsman.

lolorc avatar lolorc commented on July 17, 2024

another workaround would be to add some kind of repeat number like LIRC does. It sends the remote code with a sequence number. It would be easier to pick the first message or every message with sequence modulo something.
I don't like the debounce param :)

Nov 10 22:37:29 lirc/status/tv/v- 0
Nov 10 22:37:29 lirc/status/tv/v- 1
Nov 10 22:37:29 lirc/status/tv/v- 2
Nov 10 22:37:29 lirc/status/tv/v- 3
Nov 10 22:37:29 lirc/status/tv/v- 4
Nov 10 22:37:29 lirc/status/tv/v- 5

@h4nc @Koenkk would that make sense ?

from zigbee-herdsman.

h4nc avatar h4nc commented on July 17, 2024

Seems like debounce works fine, lag is gone. Don't know if lire would make more sense. @Koenkk ?

from zigbee-herdsman.

lolorc avatar lolorc commented on July 17, 2024

i guess the elapsed attribute could also be used in HA automation: don't treat msg with a
small elapsed.

from zigbee-herdsman.

h4nc avatar h4nc commented on July 17, 2024

But would this mean the broker has to deal with all those messages. Isn’t it better to avoid this on the z2m side with debounce?

from zigbee-herdsman.

Koenkk avatar Koenkk commented on July 17, 2024

I feel debounce is a cleaner solution, it doesn't add any extra stuff to the payload keeping it clean. @h4nc would you mind making a PR to update the docs? https://github.com/Koenkk/zigbee2mqtt.io/blob/master/docs/devices/ICTC-G-1.md

from zigbee-herdsman.

lolorc avatar lolorc commented on July 17, 2024

my point of view here is that I don't want z2m to mask/merge/do anything-supposedly-smart with my zigbee messages and attributes.
I don't like the cache setting either, it's just here to circumvent a limitation of HA.

from zigbee-herdsman.

h4nc avatar h4nc commented on July 17, 2024

@lolorc I understand your point of view, but for me debounce is good enough as it solves my issue

would you mind making a PR to update the docs?

@Koenkk done

from zigbee-herdsman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.