Announcement

Collapse
No announcement yet.

vb script runs locally but not in event

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    vb script runs locally but not in event

    Ok so I was going to put this in my setting up email thread but this is a different issue now..


    Ok so here is the deal... I subbed all the email addys out....

    drop this in notepad and call it say email.vbs

    Code:
    set msg = WScript.CreateObject("CDO.Message")
    msg.From = "MyServer@MyDomain.org"
    msg.To = "Thanks@comcast.net"
    msg.Subject = "Security Alert"
    msg.TextBody = "Alarm Tripped - expect call from ADT"
    msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.comcast.net"
    msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    msg.Configuration.Fields.Update
    msg.Send
    simple and easy

    now run this locally and it works.. sends an email from my machine through comcast.net as a smtp server...

    all is good..
    however here is my issue..

    rename file to email.vb and drop in scripts folder
    create a event to run manually and reference this script.

    I get an error like I was in my previous topic...

    11/15/2007 1:06:12 PM Error Script compile error: Syntax error.on line 14

    I dont have 14 lines of code but I am noticing HS is compiling to do the script and erroring out... here is what the log also says...

    11/15/2007 1:06:12 PM SCR Option Strict Offimports Schedulerimports SystemPublic Module scriptcode8#Region "Automatically generated code, do not modify"'Automatically generated code, do not modify'Event Sources Begin Public WithEvents hs As Scheduler.hsapplication Public WithEvents hsp As scheduler.hsp Public WithEvents hssystem As scheduler.phone0'Event Sources End'End of automatically generated code#End Regionset msg = WScript.CreateObject("CDO.Message")msg.From = "Homeseer@RiggsClan.dyndns.org"msg.To = "JeffreyJRiggs@comcast.net"msg.Subject = "RiggsClan Security Alert"msg.TextBody = "Alarm Tripped - expect call from ADT"msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.comcast.net"msg.Configuration.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2msg.Configuration.Fields.Updatemsg.SendEnd Module
    HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

    HS - HS3 Pro Edition 3.0.0.435

    Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

    Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

    #2
    Ok so this runs on my XP machine..

    but HS is installed on a server 2003 box...
    just tried running the .vbs file on server 2003 and get an error on line 9 which is the

    msg.send

    so I wonder what is different between the two!!!!

    rest of the error is
    The message could not be sent to the SMTP server. The transport error code was 0x80040217. The server response was not available
    HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

    HS - HS3 Pro Edition 3.0.0.435

    Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

    Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

    Comment


      #3
      CDO is a CDONTS object that comes with Active Server Pages. Your Win2K3 box probably doesn't have asp installed.
      💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

      Comment


        #4
        Originally posted by Rupp View Post
        CDO is a CDONTS object that comes with Active Server Pages. Your Win2K3 box probably doesn't have asp installed.
        I have asp installed and allowed in iis

        any other ideas?
        appreciate it...
        Jeff
        HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

        HS - HS3 Pro Edition 3.0.0.435

        Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

        Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

        Comment


          #5
          guess another question then is can I have HS
          1. fire off an event...based off of alarm trip (I know you can do this)
          2. Runs vbs file on my xp machine
          HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

          HS - HS3 Pro Edition 3.0.0.435

          Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

          Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

          Comment


            #6
            Ok I tried something..


            I created a .asp file (found one on the web)

            opened it with IE on my server 2003 server. File is on my desktop.. all that was shown in IE was the code

            dropped that file in my wwwroot folder and in IE now it shows up as a web form asp file...


            so here is a question... could it be that HS needs to be setup in iis as a website?
            I tried but it couldnt start it and I think that is because HS is controlling it as a website.....


            I have port 80 for my website and port 81 for HS

            there has to be something to do.....
            HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

            HS - HS3 Pro Edition 3.0.0.435

            Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

            Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

            Comment


              #7
              Do you have SNTP installed?
              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

              Comment


                #8
                Originally posted by Rupp View Post
                Do you have SNTP installed?
                I do have smtp installed.. however uninstalling now.... same as pop3 mail

                trying that as I dont need it and didnt realize it was installed.... then I saw your message...
                HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

                HS - HS3 Pro Edition 3.0.0.435

                Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

                Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

                Comment


                  #9
                  well I guess this is the crappy way to do it... but how I will have to ...


                  put vb on the xp machine
                  setup a scheduled task
                  have HS run the scheduled task on the XP machine..


                  sucks but I dont know how else to run it....
                  HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

                  HS - HS3 Pro Edition 3.0.0.435

                  Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

                  Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

                  Comment


                    #10
                    well this was weird... seems server 2003 talking to comcast I had to add my user name and password sections of the cdo.message part and now server 2003 can send the emails...


                    HS still gives me errors so I found a different work around...
                    I didnt do it yet but I can...

                    run the vbs within HS to create a vbs with my data then run it..
                    what I mean is HS will run the vbs as a program but not as a script.. so have it run a static file to create a vbs that has my values then run that new file and I will get an email..

                    that is a crappy way to do it but it would work... I guess
                    HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

                    HS - HS3 Pro Edition 3.0.0.435

                    Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

                    Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

                    Comment

                    Working...
                    X