Announcement

Collapse
No announcement yet.

Trying to setup notification from Sensor Message Panel

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

  • Trying to setup notification from Sensor Message Panel

    I am trying to setup notifications for the sensor message panel, and I am not having any luck. I am using the example sensor.vb script from the user manual, and am having no luck.

    Code:
    Sub Main(Optional ByVal pParms As String = "") 
    	Dim rfxcom As Object         
        message = hs.PluginFunction("RFXCOM", "", "GetLastSensorMessage", nothing)
    	hs.SendEmail("xxxx@yahoo.com", "xxxx@gmail.com", nothing, nothing, "RFXcom Sensor Alert", "message", nothing) 
        hs.PluginFunction("Pushalot", "", "SendPushalot", New Object() {"RFXcom Sensor Alert", "message", True, False, "Homeseer", "http://homeseer.com/updates3/icons/Plug-In.gif", 1440, "", ""})
    End Sub
    I have been testing the script in an event as shown in the attached photo. E-mail is configured to send correctly and has been confirmed. And below warnings in the log.

    Code:
    Mar-01 12:59:37 PM         Error    Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\RFXCOM_sensor_pushalot_e-mail.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   
    
     Mar-01 12:59:37 PM         Error    Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\RFXCOM_sensor_pushalot_e-mail.vb: 'message' is not declared. It may be inaccessible due to its protection level.   
    
     Mar-01 12:59:37 PM         Error    Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\RFXCOM_sensor_pushalot_e-mail.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.   
    
     Mar-01 12:59:37 PM         Error   Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\RFXCOM_sensor_pushalot_e-mail.vb: 'message' is not declared. It may be inaccessible due to its protection level.  
    
    Also, there is currently a sensor message panel message.

    Any idea what I am doing wrong?
    Attached Files
    Last edited by jlrichar; March 1st, 2015, 04:02 PM. Reason: updated with SendEmail fix, and added correct spaces in message def.
    _______________________________________________

    HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
    Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
    Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

  • #2
    This test script works:

    Code:
    Sub Main(parms As Object)
        hs.SendEmail("xxx@yahoo.com", "xxx@gmail.com", nothing, nothing, "RFXcom Sensor Alert", "message", nothing) 
        hs.PluginFunction("Pushalot", "", "SendPushalot", New Object() {"RFXcom Sensor Alert", "message", True, False, "Homeseer", "http://homeseer.com/updates3/icons/Plug-In.gif", 1440, "", ""})
    End Sub
    According to the scripting documentation SendEmail has 7 parameters.

    My guess is the example in the RFXcom manual was from an early version of the scripting engine. At any rate, any help on the message variable and call is appreciated.
    _______________________________________________

    HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
    Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
    Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

    Comment


    • #3
      Fixed

      It is working with the following script:

      Code:
      Sub Main(Optional ByVal pParms As String = "")
              Dim message As String        
          message = hs.PluginFunction("RFXCOM", "", "GetLastSensorMessage", nothing)
      	hs.SendEmail("xxxxx@yahoo.com", "xxxxx@gmail.com", nothing, nothing, "RFXcom Sensor Alert", message, nothing) 
          hs.PluginFunction("Pushalot", "", "SendPushalot", New Object() {"RFXcom Sensor Alert", message, True, False, "Homeseer", "http://homeseer.com/updates3/icons/Plug-In.gif", 1440, "", ""})
      End Sub
      _______________________________________________

      HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
      Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
      Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

      Comment


      • #4
        See chapter 11 in the RFXCOM HS3 User Guide (in the HS3 Docs directory)
        Script examples are for HS3

        Comment


        • #5
          That is what I started with. The example seems to have errors.
          _______________________________________________

          HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
          Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
          Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

          Comment

          Working...
          X