Announcement

Collapse
No announcement yet.

Need Help with hs.PluginFunction

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

    Need Help with hs.PluginFunction


    Originally posted by sparkman View Post

    remove the quotes from around lockCode here:

    Code:
    hs.PluginFunction("BLLock", "", "AddUserCodePin", New Object(){647,80,lockCode,"TEST"})
    Found this is an old thread, but I no one responded in the Blade forum.

    I'm using BLLock need to be able to edit user codes via HSTouch which will trigger either an event or script.

    Does anyone know what each parameter does?

    In this case lockCode is a virtual device reference. I'm assuming that "TEST" is the user name?

    Is the first number (647 in this case) the lock's device ref #?

    Is 80 the command?

    Normally I would experiment and figure it out, but I don't want to take a chance of screwing up the existing codes in the lock.

    Thanks in advance for any help!

    Jeff


    #2
    The subject object array is a plugin author decision as to what and how many parameters are passed the plugin function AddUserPinCode. It would seem that this information should be contained in the plugin's user manual. If there is no answer from Blade in his forum then it is not very likely that somebody on another forum will have insight into his code.

    As you indicated one that uses this plugin can be some reasonable guess as to what each of the parameters mean. The first being the Device/Feature Ref. The third is the pin code being added. The fourth is the code's name. All just guessed.

    Comment


      #3
      Thanks Michael. The only reason I posted here is because I think Blade is on vaca and Sparkman, who did a lot of work on this, has not been active here for almost a year.

      It almost looks like all references to this plugin function have been deleted from the forum for some reason.

      Since no-one answered in Blade's forum, I figured I'd try it in a forum more users read, hoping someone used it. I'll wait a couple of days, and if no answer, I suppose I'll be like Blinkin in Robin Hood: Men in Tights...

      Click image for larger version  Name:	Blinkin Guessing.jpg Views:	0 Size:	49.4 KB ID:	1534488

      Comment


        #4
        I'm not a BLLock user, but the plugin seems to have a help page built in: http://HSIP/BLHelp/BLLock/BLLock_Help.asp

        That says:

        AddUserCodePin Method
        Parameter Type Description
        Lock Device Ref Integer The lock device reference.
        Pin Location Integer The pin location for the lock.
        Pin Code Integer The pin code for the lock location.
        Name String The name of the user.
        Return Values Type Description
        None
        Description
        This method adds a pin code to a specific pin location for a lock.
        VB.Net Scripting Example
        hs.PluginFunction("BLLock", "", "AddUserCodePin", New Object(){660,1,1234,"Bob"})
        Plugins I developed for HS4: Somfy Local, MiLight (LimitlessLED), Updates, Volvo (VoC), OpenTherm Gateway (OTGW)
        Running HS4 Pro on Windows 10 Pro on a Synology VM, with Node-RED running as a container.

        Comment


          #5
          Thank you for that Bernold!!!

          The answer was right in front of me!

          Getting old... it's not for the weak, grrr.

          Comment


            #6
            Interesting, that the code Sparkman posted had a location of 80. Just how many codes in a lock can you have?

            Comment


              #7
              Originally posted by George View Post
              Interesting, that the code Sparkman posted had a location of 80. Just how many codes in a lock can you have?
              I would imagine that depends on which lock you have - I believe my Schlage Connect will hold up to 19 users. 80 sure does seem like a lot - that's like the whole population of Rhode Island!

              FWIW, I finally figured out that while Blade's help screen says the user code should be an integer, only a string will be accepted.

              I'll submit a help desk ticket so he can change it.

              Comment

              Working...
              X