Announcement

Collapse
No announcement yet.

Send serial commands with GC100 plugin

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

    Send serial commands with GC100 plugin

    I am trying to send/get rs-232 signals with HS2 and the GC plugin, no luck so far.
    I am using the example codes from the help file, and have set the following script up in "events" in HS:

    sub main()
    Dim GC As Object = hs.Plugin("Global Cache Plugin")
    GC.SendSerialData(1,1,"V")
    End Sub

    I am new to scripting in HS, any ideas how to get this working?
    (I have GC-100-12, HS version 2.5.0.52, GC plugin 4.0.0.6)

    #2
    Are you receiving an error?
    -Rupp
    sigpic

    Comment


      #3
      Yes, I get the following error: "script.vb :method not found".

      Should the script contain anything more than the lines from the first post?
      I have not added other scripts with the functions etc., I guess this already is set up in the GC plugin. But it seems my script is not able to find these definitions.

      Comment


        #4
        Same error here. Can someone help ?
        Very thanks

        Comment


          #5
          Its very confuse for me use .vb and .vbs, i am starting on HomeSeer and i only know a little about JavaScript, but finally its working :
          Sub Main(param As Object)
          Dim pObj As Object = hs.Plugin ("Global Cache")
          pObj.SendSerialData (1, 1, "PWSTANDBY")
          End Sub
          JavaScript its more easy for me, and works too:
          function Main(param) {
          var pObj = hs.Plugin("Global Cache")
          pObj.SendSerialData (1, 1, "PWSTANDBY")
          hs.WriteLog ("Send","javadscript")
          }

          Comment

          Working...
          X