Announcement

Collapse
No announcement yet.

need some help with hs.SetDeviceString

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

    need some help with hs.SetDeviceString

    hi all ,

    im building a script but i always get an error

    Code:
    Exception has been thrown by the target of an invocation.Conversion from string "Test-CUrrent" to type 'Integer' is not valid.
    Last edited by Malosa; July 25, 2016, 08:05 AM. Reason: solved
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

    #2
    Jon

    Comment


      #3
      thanks jon ,

      yes ofcourse i forget the ByName hehe..

      i have quickly another last question , if i create a device by script , what do i need to put in there so that it wil be a status only device ?
      if i auto create now by script it stands on/of next to it

      like dvp.status_only device or something like that , i cant figure out if its possible

      regards and many thanks for the reply !

      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




      HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

      Comment


        #4
        i found it already , many thanks ,
        Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
        Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




        HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

        Comment


          #5
          but jon there is actually an issue
          when an other plugin contains the same name it enters the string there

          my T.A is Test-CUrrent

          why does this work ?
          hs.setdevicevalue("Test-CUrrent",temperature) <--- works



          Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
          Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




          HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

          Comment


            #6
            Because hs.setdevicevalue uses the name! To use a reference number, you need to use hs.setdevicevaluebyref.

            I agree this is wrong, however that's the way HST decided it should work.
            Jon

            Comment


              #7
              hi jon thanks for the reply ,

              i understand now how it all works , i got it working now ,
              so i created a script i wil post it soon

              regards


              Originally posted by jon00 View Post
              Because hs.setdevicevalue uses the name! To use a reference number, you need to use hs.setdevicevaluebyref.

              I agree this is wrong, however that's the way HST decided it should work.
              Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
              Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




              HS3Pro 4.0.8.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

              Comment

              Working...
              X