Announcement

Collapse
No announcement yet.

Scripting Question

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

    Scripting Question

    Anybody please show where to find documentation on scripting syntax, variables and such.

    For example: Let's say I want to create an event (or script) to capture the user code that was used to unlock the door in a variable and translate it in a table to come up with the name of the user. I found a way to do the closest thing but it is only possible kind of backwards as in [if this used code is used, do that..]. The problem with this is if you have fifteen user codes, then you need to create fifteen different events.. this beats the purpose of automation and computers.

    So far, I was able to figure out only the two variables below:

    $$time
    $$date

    Please publish variables you know of along with their description/definition. Thanks.

    Regards,
    a.

    #2
    Originally posted by hs@home View Post
    Anybody please show where to find documentation on scripting syntax, variables and such.

    For example: Let's say I want to create an event (or script) to capture the user code that was used to unlock the door in a variable and translate it in a table to come up with the name of the user. I found a way to do the closest thing but it is only possible kind of backwards as in [if this used code is used, do that..]. The problem with this is if you have fifteen user codes, then you need to create fifteen different events.. this beats the purpose of automation and computers.

    So far, I was able to figure out only the two variables below:

    $$time
    $$date

    Please publish variables you know of along with their description/definition. Thanks.

    Regards,
    a.
    The HomeSeer scripting definitions are in the HomeSeer help files. If you need to dig deeper then you would need to load the HomeSeer SDK.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      For functions related to a an alarm system, the specifics will depend on the plug-in you are using. If you ask your question on the forum for the alarm plug-in you have you are more likely to get a useful response.
      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 hs@home View Post
        Anybody please show where to find documentation on scripting syntax, variables and such.

        For example: Let's say I want to create an event (or script) to capture the user code that was used to unlock the door in a variable and translate it in a table to come up with the name of the user. I found a way to do the closest thing but it is only possible kind of backwards as in [if this used code is used, do that..]. The problem with this is if you have fifteen user codes, then you need to create fifteen different events.. this beats the purpose of automation and computers.

        So far, I was able to figure out only the two variables below:

        $$time
        $$date

        Please publish variables you know of along with their description/definition. Thanks.

        Regards,
        a.
        Those are replacement variables and their use is just in emails and text to speech (sending a speak command to say "The time is $$time" would tell you the time). Scripting commands are somewhat different, they are all documented here http://homeseer.com/support/homeseer.../scripting.htm and they can get more complex than you need quickly.

        I don't honestly know how locks are represented in HomeSeer, I imagine by device and there are values set up for each user. I take it says 'Unlocked by user 5' or something similar and you want to translate that into 'Unlocked by <<Name>>'? If you have the option to trigger an event on it just being unlocked then you can use something like hs.devicevalue to get the value from the lock and then a select...case type statement to run through the values and give those values a name.

        Comment

        Working...
        X