Announcement

Collapse
No announcement yet.

Feature request - filter commands to devices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Feature request - filter commands to devices

    Hi Spud,

    Great Plugin! Have been using it without issue since HS3.

    I would like to ask if you would consider adding a feature to filter commands to a device to avoid a deep queue of commands that are 'stale'.

    Here is an example:

    Something controls a UPB device and changes the value from 1 -> 100 every 1mS in steps of 1. Based on observation the plugin queues all these messages and transmits them to the device. I am not sure of the *exact* time for a UPB command but let's say it is 500mS for this discussion. So the end result is the light going from 1->100 every 500mS and this takes 50 seconds.

    Would it be possible to manage the queue such that it drops the unnecessary change messages? Ideally it would transmit the first one (value 1), then at t=500mS since all the messages 2-100 have come in, it would drop 2-99 and only transmit 100. In this case we will not be waiting 50 seconds for the light to catch up.

    A simple implementation could be (on insertion of another command) to lock the pending commnad list, scan for any command that would cause a state change that would be changed by the current command, and replace it with the current command to be inserted.

    I have run into the problem in the past with HStouch sliders when you move them too fast, and most recently using the HomeKit homebridge. When changing the device value from iPhone app it sends a ton of value changes and I sit watching the light go up and down for about 30-50 seconds until it settles on the last value.


    Thanks,
    Mike

    #2
    I can have a look, but a device should not received so many commands in the first place. For example, a slider should only send a command when it is released, I thought it was an option in HStouch?

    Comment


      #3
      Originally posted by mikemack View Post
      Something controls a UPB device and changes the value from 1 -> 100 every 1mS in steps of 1.
      Just to satisfy my curiosity, what circumstance might cause this? Would it be easier to modify the behavior of the source of these control signals?
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        Originally posted by spud View Post
        I can have a look, but a device should not received so many commands in the first place. For example, a slider should only send a command when it is released, I thought it was an option in HStouch?
        Thanks for taking a look!

        That is an option is HSTouch, so not an issue there (just used an an example) but when using with the homebridge it sends a ton of events when you move the slider. Of course my timing numbers of 1mS were not real, just an example to illustrate the point.

        Thanks,
        Mike

        Comment

        Working...
        X