Announcement

Collapse
No announcement yet.

Arduino Script Testing. (Enigmatheatre)

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

  • It is making me feel a bit better that you're finding it strange too

    tab below:
    Attached Files

    Comment


    • Originally posted by dhalsall View Post
      It is making me feel a bit better that you're finding it strange too

      tab below:
      In the event do you have a space between the comma and the dim? If so try removing it as it had to be exactly like the status pair.

      Greig.

      Sent from my SM-G925F using Tapatalk
      Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
      X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
      Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
      Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
      Scripts =
      Various

      Comment


      • DOAH!

        That's it... as usual, couldn't see the forest for the trees.

        Works as expected now - lol.

        Thanks for all you help Greig!

        I'll quietly attempt to learn the rest on my own - of course, this performance hasn't filled me with self confidence... but I'll keep pluggin' away.

        dave

        Comment


        • Originally posted by dhalsall View Post
          DOAH!

          That's it... as usual, couldn't see the forest for the trees.

          Works as expected now - lol.

          Thanks for all you help Greig!

          I'll quietly attempt to learn the rest on my own - of course, this performance hasn't filled me with self confidence... but I'll keep pluggin' away.

          dave
          Good news. Glad we got there.
          I'm of to bed as it is 1.45am here and I am up at 7.[emoji17]

          Sent from my SM-G925F using Tapatalk
          Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
          X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
          Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
          Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
          Scripts =
          Various

          Comment


          • wow - thanks Greig.
            Hope you work well on 5hrs sleep (I'm the same).

            Comment


            • Hi Greig,

              FYI, I managed to muddle through and modify the code for my final application:

              Code:
              Sub Main(parms As Object)
                      Dim tempBOX As Integer
                      Dim speedPCT As Integer
                      Dim myDevCmd As String
                      tempBOX = hs.DeviceValue(45)
                      speedPCT = (tempBOX-25)*10
                      myDevCmd = "Dim " & speedPCT & "%"
                      hs.WriteLog("BOX Cool Down", " Box Temp: " & tempBOX &"C" & " Fan Percentage: " & speedPCT)
                      CallCAPI(37, myDevCmd)
              End Sub
              
                  Function CallCAPI(ByVal intDevRef As Integer, ByVal strDevCmd As String) As CAPIControlResponse
                      CallCAPI = CAPIControlResponse.Indeterminate
                      For Each objCAPIControl As CAPIControl In hs.CAPIGetControl(intDevRef)
                          If LCase(objCAPIControl.Label) = LCase(strDevCmd) Then
                              CallCAPI = hs.CAPIControlHandler(objCAPIControl)
                              Exit For
                          End If
                      Next
                  End Function
              However, I have read your function over and over, and just don't get how it works! Mostly I'm sure because I have to improve my VB / scripting skills, but also, I find the references to these functions and methods in the HS3 scripting doc to be fairly vague. Is there a more in-depth resource to educate myself? Or is it just a lot of trial and error?

              Comment

              Working...
              X