Announcement

Collapse
No announcement yet.

Help with serial command queue

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

    Help with serial command queue

    I have written a plugin that controls an early Denon receiver. I made a public function that will send commands to it. I have a script that manipulates the Denon, but not all the commands are seen by the plugin. I suspect that it is a timing issue where one command is being processed and the next is missed.

    I'd like to create a queue where the commands are fed to the plugin with a bit of a pause or even better something that waits until the receiver sends back the command.

    Any ideas?

    Thks
    Don

    #2
    Fill an array with your commands then go through the array (for...next) with a pause in between each commands? You could sit in another loop waiting for the send response to come back before moving onto the next one.

    Comment


      #3
      I use hs.waitsecs(x) in all my scripts that send IR codes. 1-2 seconds is usually enough.

      I see the same issue when getting a devicevalue or device string. If concurrent scripts are running, I think the script processing time by HS can increase to the point where the script will not do what it is supposed to do.


      Sent from my iPad using Tapatalk HD
      HomeSeer Version: HS3 Pro Edition 3.0.0.368, Operating System: Microsoft Windows 10 - Home, Number of Devices: 373, Number of Events: 666, Enabled Plug-Ins
      2.0.83.0: BLRF, 2.0.10.0: BLUSBUIRT, 3.0.0.75: HSTouch Server, 3.0.0.58: mcsXap, 3.0.0.11: NetCAM, 3.0.0.36: X10, 3.0.1.25: Z-Wave,Alexa,HomeKit

      Comment


        #4
        Thanks for the advice guys. Turns out that I have opened a can of worms, and will have to spend some quality time on this.
        Don

        Comment

        Working...
        X