Announcement

Collapse
No announcement yet.

jrmc event handler issues

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

    jrmc event handler issues

    Hi

    First I'm a noob at programming

    I'm trying to modify the sample plugin and do a test of the JRMC handler event.

    I got my development systtem set up with jrmc17, homeseer pro, and visual studio 2003.net

    I'm able to modify the plugin and i followed a few examples but for some reason I can't get past a declaration error for BeginInvoke. Is it supported in vb2k3.net?

    Can anyone help it keeps telling me that the name BeginInvoke has not been declared so the build fails.

    Or did anyone get the jrmc events to fire homeseer events from a plugin and perhaps an example code!

    I would much appreciate any help as i have been pulling my hair out over the last couple of days.

    Right now I'm using EventGhost to fire track change, playstate, and volume change events in homeseer but want to turn it into a plugin instead of relying on other software...

    Thanks

    #2
    I made some progress tonight I found a piece of code that seems to work for a short duration of time and during this time I can receive events but is there a way to make it listen all the time?

    for now I'm using a timer to trigger the function but I'm pretty sure there is a better way to do it

    Imports System
    Imports System.Windows.Forms
    ' //css_reference System.dll;
    ' //css_reference System.Windows.Forms.dll;
    ' //css_reference Interop.MediaCenter.dll;
    Class Script
    Inherits MarshalByRefObject
    Sub Init( unusedRef as MediaCenter.MCAutomation)
    System.Console.WriteLine("Waiting on Events")
    Dim mediaCenterInterface as MediaCenter.MCAutomation
    mediaCenterInterface = System.Runtime.InteropServices.Marshal.GetActiveObject("Medi aJukebox Application")
    AddHandler mediaCenterInterface.FireMJEvent, AddressOf mediaCenter_FireMJEventHandler
    System.Threading.Thread.Sleep(30000)

    System.Console.WriteLine("Stopped Waiting on Events")

    End Sub

    Public Sub mediaCenter_FireMJEventHandler(ByVal bstrType As String, _
    ByVal bstrParam1 As String, _
    ByVal bstrParam2 As String) _

    System.Console.WriteLine(bstrType + " " + bstrParam1 + " " + bstrParam2)
    'MessageBox.Show(bstrType + " " + bstrParam1 + " " + bstrParam2)

    End Sub
    End Class

    Comment


      #3
      Well after a lot of reading and hair pulling I finally managed to get the sample plugin to work with jrmc17 and it now updates all of my virtual devices with the current info every time an event occurs in jrmc.

      Comment


        #4
        I'm considering moving to Jriver, but controlled by my URC system. I can use RS-232 or IR. I'm considering RS-232. How do you find non-IR control. Is it as responsive?
        ________________________

        Dell Zino HD - HSPRo 2.x
        HSTouch - iPhone 3GS, 4S, iPad2 and iPad 3, 3xKindle Fire (Wall mounted)
        2 x Brultech ECM1240 with UltraECM
        USB UIRT
        Cooper Aspire Z-Wave Switches
        WGL800 w ACRF2 and 3xDS10a (Sump Level/Activity sensing)
        HM ST812-2 Flood Sensor
        HSM100 - Motion Detector with Light and Temperature
        2GIG Thermostat
        BLDSC - Alarm Plug-in
        BLUPS
        UltraLog (SQL2008)
        Jon00 Plugins
        Host XR3 BT and Jon00 BT Proximity
        Global Cache IP2IR
        Foscam FI8918W

        Comment


          #5
          I was wondering how this worked out?.

          Comment

          Working...
          X