Announcement

Collapse
No announcement yet.

IP and Serial Plugin

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

  • #31
    Originally posted by ivanhoek View Post
    Just got back home and tried the code. It works! The logs look a little weird, but the events DO trigger properly now. See below for a sample (Connection is serial, I just didn't change the name to remove IP):
    There's still some glitches. I can get events to trigger properly if I do a direct query of a status value. However, when I change inputs or status and perform no direct query, I get the following in the log:

    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=134021ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 1, containing: @
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=1
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 6, containing: @MAIN:
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=6
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=13ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 7, containing: @MAIN:I
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=7
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 21, containing: @MAIN:INP=AV5@MAIN:
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=21
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=11ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 22, containing: @MAIN:INP=AV5@MAIN:A
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=22
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 35, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavail
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=35
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=13ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 36, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavaila
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=36
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 50, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINEC
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=50
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=15ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 51, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECO
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=51
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 65, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=65
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=10ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 66, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@M
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=66
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 79, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=79
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=12ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 80, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=O
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=80
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 94, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=On@MAIN:STRAI
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=94
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=10ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 95, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=On@MAIN:STRAIG
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=95
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 108, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=On@MAIN:STRAIGHT=Off@MAIN
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=108
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=12ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 109, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=On@MAIN:STRAIGHT=Off@MAIN:
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=109
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 123, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=On@MAIN:STRAIGHT=Off@MAIN:SOUND PRG=Spect
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=123
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=14ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 124, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=On@MAIN:STRAIGHT=Off@MAIN:SOUND PRG=Specta
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=124
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - elapsed time=0ms
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn YAMAHA RXA3000 - received serial data from: COM4, length: 129, containing: @MAIN:INP=AV5@MAIN:AUDSEL=Unavailable@MAINECODERSEL=Auto@MAIN:ENHANCER=On@MAIN:STRAIGHT=Off@MAIN:SOUND PRG=Spectacle
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=127
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=127
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=17, Data.Length=127
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=16, Data.Length=127
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=127
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=127
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=12, Data.Length=127
    12/16/2012 9:35:19 PM DR IP/Serial PlugIn CompareArray.Length=13, Data.Length=127

    I should really only see the last output, all the preceding ones are incomplete and won't trigger an event. Even the last output doesn't cause an event to trigger if I try to make an event match on that string. I've tried all formats and the same result.. no trigger.

    However, if I directly query a value it works.

    Regards,

    Comment


    • #32
      Ideally, I would see this:

      @MAIN:INP=AV5
      @MAIN:AUDSEL=Unavailable
      @MAINECODERSEL=Auto
      @MAIN:ENHANCER=On
      @MAIN:STRAIGHT=Off
      @MAIN:SOUNDPRG=Spectacle

      With each message response code as its own unit of output. This is how the output looks on the serial console when using Putty. Each response code is terminated by [CR/LF].

      Regards,

      Comment


      • #33
        Thanks for the logs. I'll take a look and see what I can do...

        Comment


        • #34
          Apologies for the confusing logs, think of them more as debugging traces for me. I'll tidy them up a bit in a future release. Here's what I think is happening:

          The plugin doesn't control when data is received from the serial port. Each time it receives *something* it compares it to each Event Trigger defined for the connector the data is received on. In this log, you appear to have 8 potential triggers defined for "YAMAHA RXA3000," which is why you see 8x "CompareArray.Length..." entries following a "YAMAHA RXA3000 - received serial data..." entry. If no match is found, the data received is buffered. Provided that the next chunk of data is received within the timeout period, that data is appended to the buffer and the whole thing is compared to each Event Trigger again.

          In this instance, the plugin first receives "@" and there is no match for this. Then it receives "MAIN:" which is appended to "@" and "@MAIN:" is checked for matches. Then it receives "I", again no match but then it receives "NP=AV5@MAIN:" which contains both the end of the first string we are trying to match and the start of the second string. The plugin therefore is trying to match "@MAIN:INP=AV5@MAIN:" which fails.

          I'm not sure of the best way to work around this and I'm open to suggestions from anybody that has an idea. I could parse the buffer looking for a delimiter but where and how should that delimiter be defined? I'd like to keep the plugin as generic as possible.

          I could trigger an event if a substring is matched. My concern here is that if there were 2 triggers, say "A" and "AA", when receiving "AA", the plugin would trigger both events.

          What I'm thinking might work best, albeit it would involve more work for you, is to suggest that you define a pass-thru script and have that do the work of parsing the received string. That way it doesn't matter to the plugin what the delimiter is. If you were to do that with the plugin as it stands, the pass-thru script would get called 20 times (in the example from your log) which might not be ideal. I could modify the behaviour so that the pass-thru script is only called after the buffer times out.

          The pass-thru script could look something like:
          Code:
          Public Sub Main(ByVal Params As Object)
              Dim p1() As String = Split(Params.ToString, vbCrLf)
              For n As Int16 = 0 To p1.Count - 1
                  hs.WriteLog("Test.vb", p1(n))
                  Select Case p1(n)
                      Case "A"
                          hs.TriggerEvent("Event_A")
                      Case "B"
                          hs.TriggerEvent("Event_B")
                  End Select
              Next
          End Sub
          Any thoughts?

          -David

          Comment


          • #35
            Originally posted by drule View Post
            Apologies for the confusing logs, think of them more as debugging traces for me. I'll tidy them up a bit in a future release. Here's what I think is happening:

            The plugin doesn't control when data is received from the serial port. Each time it receives *something* it compares it to each Event Trigger defined for the connector the data is received on. In this log, you appear to have 8 potential triggers defined for "YAMAHA RXA3000," which is why you see 8x "CompareArray.Length..." entries following a "YAMAHA RXA3000 - received serial data..." entry. If no match is found, the data received is buffered. Provided that the next chunk of data is received within the timeout period, that data is appended to the buffer and the whole thing is compared to each Event Trigger again.

            In this instance, the plugin first receives "@" and there is no match for this. Then it receives "MAIN:" which is appended to "@" and "@MAIN:" is checked for matches. Then it receives "I", again no match but then it receives "NP=AV5@MAIN:" which contains both the end of the first string we are trying to match and the start of the second string. The plugin therefore is trying to match "@MAIN:INP=AV5@MAIN:" which fails.

            I'm not sure of the best way to work around this and I'm open to suggestions from anybody that has an idea. I could parse the buffer looking for a delimiter but where and how should that delimiter be defined? I'd like to keep the plugin as generic as possible.

            I could trigger an event if a substring is matched. My concern here is that if there were 2 triggers, say "A" and "AA", when receiving "AA", the plugin would trigger both events.

            What I'm thinking might work best, albeit it would involve more work for you, is to suggest that you define a pass-thru script and have that do the work of parsing the received string. That way it doesn't matter to the plugin what the delimiter is. If you were to do that with the plugin as it stands, the pass-thru script would get called 20 times (in the example from your log) which might not be ideal. I could modify the behaviour so that the pass-thru script is only called after the buffer times out.

            The pass-thru script could look something like:
            Code:
            Public Sub Main(ByVal Params As Object)
                Dim p1() As String = Split(Params.ToString, vbCrLf)
                For n As Int16 = 0 To p1.Count - 1
                    hs.WriteLog("Test.vb", p1(n))
                    Select Case p1(n)
                        Case "A"
                            hs.TriggerEvent("Event_A")
                        Case "B"
                            hs.TriggerEvent("Event_B")
                    End Select
                Next
            End Sub
            Any thoughts?

            -David
            I think you're correct, and trying to fix this may break other, more common use cases. I'll try this on a physical box at some point and see if the behavior changes.

            I like the idea of the script, but I'm not sure how to implement. Maybe the simplest way is to read the HS log and use something like grep to match the strings I want and trigger the events.

            Also, everything was working perfectly using an ip connection, but it seems to be broken now. Not sure if it's something in my setup, but now over IP I get no responses from the receiver. It executes commands, but there's no feedback now.

            Comment


            • #36
              Originally posted by ivanhoek View Post
              Also, everything was working perfectly using an ip connection, but it seems to be broken now. Not sure if it's something in my setup, but now over IP I get no responses from the receiver. It executes commands, but there's no feedback now.
              I don't think I've inadvertently broken it. I'm assuming you are using a TCP Client connection? Have you checked the "persistent" box?

              -David

              Comment


              • #37
                Originally posted by drule View Post
                I don't think I've inadvertently broken it. I'm assuming you are using a TCP Client connection? Have you checked the "persistent" box?

                -David
                It's probably the receiver. I'll get around to fixing that.. btw, I had some trouble with the persistent box itself, it would generate connections way too frequently and sometimes would result in a bad connection state. The receiver protocol manual has a recommended keepalive mechanism, and I set that up as a recurring event instead. Worked perfect at that point.

                How often does the "persistent" code send a keepalive to the device? The interval doesn't seem to be configurable.. my particular receiver kills TCP connections after 40 seconds of inactivity, so I setup the keepalive for every 35 seconds.

                Comment


                • #38
                  I got this as a pop-up box today. Not sure what prompted it as I am not at home:

                  12/26/2012 7:45:34 AM
                  Cannot access a disposed object.
                  Object name: 'System.Net.Sockets.Socket'.
                  HomeSeer version: 2.5.0.60
                  Source: System
                  Target: System.Net.EndPoint get_RemoteEndPoint()
                  Stack trace:
                  at System.Net.Sockets.Socket.get_RemoteEndPoint()
                  at HSPI_DRHSIPPLUGIN.NetworkStreamClass.ReceiveTcpMessages_Inst ance()
                  at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
                  at System.Threading.ExecutionContext.runTryCode(Object userData)
                  at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWi thGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
                  at System.Threading.ExecutionContext.RunInternal(ExecutionConte xt executionContext, ContextCallback callback, Object state)
                  at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
                  at System.Threading.ThreadHelper.ThreadStart()

                  Please specify what you were doing at the time of this error:

                  Comment


                  • #39
                    I just wanted to thank you for this plug-in.

                    I needed a method to trigger some events and device status changes from a perl script on a Linux box. This made it extremely easy.

                    I really appreciate you taking the time to write this and make is available.

                    Lou

                    Comment


                    • #40
                      Controlling Media Center PC

                      First, I want to say thank you for what looks like a great plug-in, this plug-in should help control a lot of AV equipment.

                      I am trying to control a windows media center system using MCE Controller (found here: mcec.codeplex.com) this program runs in the background on the Media Center system and listens for commands over TCP and then sends the command to media center.

                      I can control the Media center via a telnet client all I do is type in the command in text hit enter and it executes the command.

                      I have setup the connection in DR IP/Serial as a TCP, Client, at the correct address and port, and select Persist. The software on the media center PC shows that it has connected to it so I think that part is ok.

                      I have created a command called MCPCUp as Raw Text (actually I have tried it as all the types available) with the data of vk_up which is what I would type in to the telnet client then hit enter, then I created and event that sends the action DR IP/Serial Plugin: Send MCPCUp to MCPC.

                      When I run the event the log shows Event Trigger "Up" and DR IP/Serial messages that there are 2 TCPIP clients for MCPC but nothing happens, the client does not receive any data.

                      I'm not sure where to go from here, from what I can see it should just work, or maybe I need to send a carriage return but I'm not sure how to add that in.

                      Thanks in advance for your help

                      Comment


                      • #41
                        Originally posted by neutron View Post
                        First, I want to say thank you for what looks like a great plug-in, this plug-in should help control a lot of AV equipment.

                        I am trying to control a windows media center system using MCE Controller (found here: mcec.codeplex.com) this program runs in the background on the Media Center system and listens for commands over TCP and then sends the command to media center.

                        I can control the Media center via a telnet client all I do is type in the command in text hit enter and it executes the command.

                        I have setup the connection in DR IP/Serial as a TCP, Client, at the correct address and port, and select Persist. The software on the media center PC shows that it has connected to it so I think that part is ok.

                        I have created a command called MCPCUp as Raw Text (actually I have tried it as all the types available) with the data of vk_up which is what I would type in to the telnet client then hit enter, then I created and event that sends the action DR IP/Serial Plugin: Send MCPCUp to MCPC.

                        When I run the event the log shows Event Trigger "Up" and DR IP/Serial messages that there are 2 TCPIP clients for MCPC but nothing happens, the client does not receive any data.

                        I'm not sure where to go from here, from what I can see it should just work, or maybe I need to send a carriage return but I'm not sure how to add that in.

                        Thanks in advance for your help
                        Ok, with a bit more trial & error I converted the text vk_up to hex characters 0x76 0x6b 0x5f 0x75 0x70 0x0d (with 0x0d as the carriage return), sent it as binary, and it works, while I don't mind converting the characters to hex it would be easier to work with keeping them as regular text, is there a way to do that?

                        Comment


                        • #42
                          Originally posted by neutron View Post
                          Ok, with a bit more trial & error I converted the text vk_up to hex characters 0x76 0x6b 0x5f 0x75 0x70 0x0d (with 0x0d as the carriage return), sent it as binary, and it works, while I don't mind converting the characters to hex it would be easier to work with keeping them as regular text, is there a way to do that?

                          Hi Neutron
                          Try C-Escaped with a \r at the end. With your example the command would be:
                          MCPCUp\r

                          Best Regards
                          James
                          cheeryfool

                          Comment


                          • #43
                            ROOMIE two way light feedback

                            Hi, I am trying to use ROOMIE remote to control and show the status of my homeseer lights. I have setup your plugin and am able to send cammands from roomie to trigger events. I am not sure how to send the device status back to ROOMIE to display if the light is on or off. Any thoughts?

                            Thanks,
                            Emmett

                            Comment


                            • #44
                              Originally posted by cheeryfool View Post
                              Hi Neutron
                              Try C-Escaped with a \r at the end. With your example the command would be:
                              MCPCUp\r

                              Best Regards
                              James
                              Thanks James, that worked!

                              Comment


                              • #45
                                Hello
                                I'm new
                                How to install this plugin ?
                                thank you
                                <!-- / message -->

                                Comment

                                Working...
                                X