Announcement

Collapse
No announcement yet.

Script not working on fresh HS4 install

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

    Script not working on fresh HS4 install

    macromark

    This script below is running successful in HS4 on an updated install of HS4. However on a fresh install of HS4 this script is nor running and I will get the following error message:

    Running script Windkracht.vb :Exception has been thrown by the target of an invocation.Conversion from string "" to type 'Integer' is not valid.



    sub Main(ByVal strDevRef As String)

    Dim windkracht As Integer
    Dim WindkrachtString As String

    WindkrachtString = hs.DeviceString(1526)

    windkracht = Left(Windkrachtstring, 1)

    hs.SetDeviceValueByRef( 1526, windkracht, TRUE )
    end sub


    ---
    John

    #2
    I cant get any scripts to run. Posted about it already but doesnt look like they have gotten to it.

    Comment


      #3
      Originally posted by ajachierno View Post
      I cant get any scripts to run. Posted about it already but doesnt look like they have gotten to it.
      Can you make a reference to that post. I will send Rich an e-mail about it.

      ---
      John

      Comment


        #4
        Originally posted by John245 View Post
        macromark

        This script below is running successful in HS4 on an updated install of HS4. However on a fresh install of HS4 this script is nor running and I will get the following error message:

        Running script Windkracht.vb :Exception has been thrown by the target of an invocation.Conversion from string "" to type 'Integer' is not valid.



        sub Main(ByVal strDevRef As String)

        Dim windkracht As Integer
        Dim WindkrachtString As String

        WindkrachtString = hs.DeviceString(1526)

        windkracht = Left(Windkrachtstring, 1)

        hs.SetDeviceValueByRef( 1526, windkracht, TRUE )
        end sub


        ---
        John
        That error message would imply that windkracht has no contents. You would need to use a couple of hs.writelog statements to display the contents of WindkrachtString and windkracht
        Jon

        Comment


          #5
          Originally posted by John245 View Post

          Can you make a reference to that post. I will send Rich an e-mail about it.

          ---
          John
          I have multiple scripts all worked in HS3 but none working in HS4

          https://forums.homeseer.com/forum/de...nt-run-scripts

          Comment

          Working...
          X