Announcement

Collapse
No announcement yet.

Device variable not working from script..

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

    Device variable not working from script..

    This is a weird issue , normal iT always work, when i use the variable in my url to push to my Sattelite iT don't work

    But if i make an virtual device and set the string with easytrigger ($time) iT works when iT reads the code...

    Why does that happen?

    This is a part of the script (the action url)

    hs.urlaction("http://192.168.0.35/web/message?text= $time "&Volumestring &tester, "POST", "", "")


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




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

    #2
    Anyone?



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




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

    Comment


      #3
      Device variable not working from script..

      Typically HomeSeer's replacement variables don't work in scripts. You'd have to use vb functions to retrieve the time and convert to a string.



      Cheers

      Al
      Last edited by sparkman; July 15, 2016, 08:20 PM.
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        #4
        Device variable not working from script..

        Hi Al,

        I did already try this:

        dim timer as string = hs.replacevariables ("$time")

        When i use iT in the url as &timer , the url works but no time in there

        I also want iT to use to read the $$Dsa:001: but don't know how to do that


        Regards


        Originally posted by sparkman View Post
        Typically HomeSeer's replacement variables don't work in scripts. You'd have to use vb functions to retrieve the time and convert to a string.



        Cheers

        Al





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




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

        Comment


          #5
          What format does the time need to be in? To retrieve a device status in a script, use CAPIGetStatus: http://homeseer.com/support/homeseer...igetstatus.htm.

          Cheers
          Al
          HS 4.2.8.0: 2134 Devices 1252 Events
          Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

          Comment

          Working...
          X