Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FHEM venetian blinds - first delayed cmd gets deleted #68

Open
ctc opened this issue Nov 14, 2020 · 0 comments
Open

FHEM venetian blinds - first delayed cmd gets deleted #68

ctc opened this issue Nov 14, 2020 · 0 comments

Comments

@ctc
Copy link

ctc commented Nov 14, 2020

When TargetHorizontalTiltAngle and TargetPosition is send from homebridge to fhem, the first delayed cmd will be deleted.

Happens in line 2461 in index.js:

  delayed: function(mapping,value,delay) {
    if( !this.delayed_timers )
      this.delayed_timers = {};

    if( typeof delay !== 'numeric' )
      delay = 1000;
    if( delay < 500 )
      delay = 500;

    var timer = this.delayed_timers[mapping];
    if( timer ) {
      //this.log(this.name + ' delayed: removing old command ' + mapping.characteristic_type);
      clearTimeout( timer );
    }

How to avoid this or how could the clearTimeout be avoided and do not harm other use cases?

pst-on-github added a commit to pst-on-github/homebridge-fhem that referenced this issue Nov 29, 2021
Using `mapping.informId` instead of `mapping` as key to `delayed_timers` (unique string). This should fix issue justme-1968#68
justme-1968 pushed a commit that referenced this issue Dec 5, 2021
* Accept numbers for 'delay' parameter. 

I can't find a reported issue that would be fixed by this change.

* Update README.md

* Fixed markdown for cmds and cmdSuffix parameter in section Homekit -> FHEM parameters

* Update index.js

Using `mapping.informId` instead of `mapping` as key to `delayed_timers` (unique string). This should fix issue #68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant