Announcement

Collapse
No announcement yet.

HS3 Script Syntax to copy one virtual device status string to another virtual device

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

    HS3 Script Syntax to copy one virtual device status string to another virtual device

    Been pouring over the forum and the HS3 Help Files the past couple days looking for HS3 script command examples for "&hs.SetDeviceString" but I haven't found my answer yet so now I'm stuck.

    If someone could give me a little nudge and show me what the HS3 syntax would be using "&hs.SetDeviceString" to copy one Virtual Device status string to another Virtual Device I would be very grateful!

    #2
    It would be something like this but changing the references &hs.setdevicestring(5678, hs.devicestring(1234), True)

    however do be aware that something may look like a device string in HS3 may not be a string and may instead be a value pair with text on the prefix/suffix - try it and see how you get on.

    Comment


      #3
      Yep.. I got my nudge! This works on the virtual devices I made myself with no problem.
      But your tip about the "value pair with text on the prefix/suffix with text" seems to be in play now. I see the references to "device value pairs" in the help files but not sure what to do with it.

      So basically I have a device created by the UltraCID3 plugin, called "Last Caller Name", I now believe I need the "prefix/suffix with text" from it and then copy that to my Virtual Device.

      Here's my current command: &hs.SetDeviceString(60, hs.DeviceString(29), True)

      hs.DeviceString(29) is the RefID for the "Last Caller Name" but it only gives me a 0 when I want the actual name of the caller, "PAUL CELL PHONE".

      I've attached the screen shot of the properties for the UltraCID3 "Last Caller Name" device in case that helps.
      Attached Files

      Comment


        #4
        Hmm...I would've thought that would have worked (the value status pairs are useful for things like temperature like they can be picked from a fixed list), can you try

        hs.writelog("", hs.devicestring(29))

        and see what gets put into the HS log? I would have thought this would put PAUL CELL PHONE in the log considering what is in the string table row suggesting that is the string. If it puts 'Off' into the log I am going to end up a little confused.

        Comment


          #5
          It's not you that's confused, it's me.. after paying attention this time, I see that your command works perfectly and gives me the actual "PAUL CELL PHONE" that I wanted!

          Thank you so very much for your nudge in the right direction!!!

          Comment


            #6
            May I ask what you're doing with this?
            Originally posted by rprade
            There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

            Comment


              #7
              Heck ya you can ask!! : )

              I'm using the UltraCID3 plugin in HS3 to handle my CID for the house. It appears the plugin only shows the "Last Caller" information and I need a way at a glance to see the last 10 callers on an HSTouch screen. So being a total beginner with scripting and with the help of my new best friend, MrHappy, I set out to make my own Last 10 Callers List using an event to populate 10 virtual devices.

              So far it looks like this...still testing..
              Attached Files
              Last edited by pjohnson; December 31, 2014, 12:17 PM. Reason: corrections

              Comment


                #8
                Oh yeah! That's what I thought. I remembered a thread about this in the UltraCID forum but didn't remember if it were you. Please keep us updated on your progress. I would very much like to copy your successful plan!
                Originally posted by rprade
                There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                Comment


                  #9
                  ok so here is where I'm at now.. it's all good! I'll let this settle in, wait for some calls and perhaps make some minor tweaks along the way. Any and all comments, improvements, etc. are welcome!

                  My "Last 10 Callers List" Event is now working and populating the 10 Virtual Devices I created to store the last 10 callers information with useful data for use with my HSTouch screens!

                  I now get this stored in the Virtual Devices every time a call comes in from someone that I want to know called. PAUL CELL PHONE (234) 380-XXXX 12/31/2014 1:28:10 PM
                  Attached Files

                  Comment

                  Working...
                  X