Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Scitz0

Pages: [1]
1
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 11:47:32 AM »
Ok thanks, I will give your different options a try and report back.

Thanks for all the help so far.

2
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 10:42:15 AM »
I was able to get feedback on all my repetitive executes using this:
I then waited 20min or so and tried again, first I received and exception och the first couple of tries, then I got the feedback RESTRICTED, after this hitting execute return the correct feedback every time. So i tried again, waited a couple of minutes or so and again got exception on first couple of tries and then I got the correct feedback. Maybe the receiver force close the connection but the TCP plugin still tries to keep it open and then it takes a while for it to reestablish the connection correctly?
Made a third test and waited about 3m after last successful feedback and this time I was able to continue without any issues, strange.

Code: [Select]
<commandGroup open="True" name="Yamaha (Test)" enabled="True" prefix="" priority="0" requiredProcess="" description="">
        <command id="581" name="test" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>Tcp.Client.Connect</cmdType>
                <cmdString>test&amp;&amp;192.168.0.4&amp;&amp;50000&amp;&amp;\x0D\x0A&amp;&amp;testEvent</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Tcp.Client.Write</cmdType>
                <cmdString>test&amp;&amp;@MAIN:VOL=?\x0D\x0A</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
        </command>
        <command id="575" name="testOSD" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>OSD.ShowText</cmdType>
                <cmdString>Payload: {1}</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <event>testEvent</event>
        </command>
    </commandGroup>

Though I get an exception on repeated executions for client.connect
Code: [Select]
2013-11-22 14:47:05 889 doCommand:test
2013-11-22 14:47:05 889 action repeat set to: 1
2013-11-22 14:47:05 889 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&\x0D\x0A&&testEvent
2013-11-22 14:47:05 889 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&\x0D\x0A&&testEvent

Exceptions I receive sometimes(different it seems):
[code]2013-11-22 15:35:28 632 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&\x0D\x0A&&testEvent

2013-11-22 15:35:28 632 [plugin] TcpMic: TCP.ClientError: System.InvalidOperationException: The stream does not support reading.
Code: [Select]
2013-11-22 15:36:35 712 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 15:36:35 712 [plugin] TcpMic: TCP.ClientError: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at vcPlugin.tcpClient.listenToServerLoop()
Code: [Select]
2013-11-22 15:35:28 632 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 15:35:28 632 [plugin] TcpMic: TCP.ClientError: System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at vcPlugin.tcpClient.listenToServerLoop()
Code: [Select]
2013-11-22 15:33:11 164 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&\x0D\x0A&&testEvent

2013-11-22 15:33:11 164 [plugin] TcpMic: TCP.ClientError: System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at vcPlugin.tcpClient.listenToServerLoop()

The thing you mentioned about possibly getting feedback directly in a call to tcp.single actions sounds nice, hopefully you will get some spare time not to far in the future.[/code]

3
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 08:59:45 AM »
Hitting execute with a few seconds delay give me client reconnect errors every time but this my be correct as I dont close the connection?

Code: [Select]
2013-11-22 13:57:29 953 doCommand:test
2013-11-22 13:57:29 953 action repeat set to: 1
2013-11-22 13:57:29 953 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&\x0D\x0A&&testEvent
2013-11-22 13:57:29 953 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&\x0D\x0A&&testEvent

2013-11-22 13:57:29 953 [plugin] TcpMic: TCP.ClientError: System.IO.IOException: Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A blocking operation was interrupted by a call to WSACancelBlockingCall
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at vcPlugin.tcpClient.listenToServerLoop()
2013-11-22 13:57:29 953 [vcevent] TCP.ClientError.test

2013-11-22 13:57:29 953 [vcevent] TCP.StartListen.test

2013-11-22 13:57:29 953 action repeat set to: 1
2013-11-22 13:57:29 953 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?
2013-11-22 13:57:29 953 [action] Tcp.Client.Write:test&&@MAIN:VOL=?

4
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 08:56:54 AM »
I could never figure out how to process feedback event in the same command as the one sending the write so this is how I did it:

Notice that I have now changed and readded terminator to connect and removed it from the write itself.

Sending iTach workes without any issues, though I dont use feedback with iTach.

Code: [Select]
<command id="570" name="test" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>Tcp.Client.Connect</cmdType>
                <cmdString>test&amp;&amp;192.168.0.4&amp;&amp;50000&amp;&amp;\x0D\x0A&amp;&amp;testEvent</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Tcp.Client.Write</cmdType>
                <cmdString>test&amp;&amp;@MAIN:VOL=?</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
        </command>
        <command id="571" name="testOSD" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>OSD.ShowText</cmdType>
                <cmdString>Payload: {1}</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <event>testEvent</event>
        </command>

5
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 08:50:17 AM »
Removed terminate code from connect just for test and got this.
Tried two times, the first time I got two exceptions and second time only the last exception.

Code: [Select]
2013-11-22 13:46:08 56 doCommand:test
2013-11-22 13:46:08 56 action repeat set to: 1
2013-11-22 13:46:08 56 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 13:46:08 56 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 13:46:08 56 [plugin] TcpMic: TCP.ClientError: System.InvalidOperationException: The stream does not support reading.
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at vcPlugin.tcpClient.listenToServerLoop()
2013-11-22 13:46:08 56 [vcevent] TCP.ClientError.test

2013-11-22 13:46:08 56 [vcevent] TCP.StartListen.test

2013-11-22 13:46:08 56 action repeat set to: 1
2013-11-22 13:46:08 56 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A
2013-11-22 13:46:08 56 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 13:46:08 56 [plugin] TcpMic: TCP.ClientError: System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at vcPlugin.tcpClient.listenToServerLoop()
2013-11-22 13:46:08 56 [vcevent] TCP.ClientError.test

2013-11-22 13:46:08 56 [vcevent] TCP.EndListenLoop.test

2013-11-22 13:46:48 882 doCommand:test
2013-11-22 13:46:48 882 action repeat set to: 1
2013-11-22 13:46:48 882 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 13:46:48 882 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 13:46:48 882 [vcevent] TCP.StartListen.test

2013-11-22 13:46:48 882 action repeat set to: 1
2013-11-22 13:46:48 882 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A
2013-11-22 13:46:48 882 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 13:46:48 882 [plugin] TcpMic: TCP.ClientError: System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at vcPlugin.tcpClient.listenToServerLoop()
2013-11-22 13:46:48 882 [vcevent] TCP.ClientError.test

2013-11-22 13:46:48 882 [vcevent] TCP.EndListenLoop.test

6
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 08:33:42 AM »
Ok I added \x0D\x0A to the terminator field and removed the disconnect action
I left the command as @MAIN:VOL=?\x0D\x0A and no delays.

I then ran the command but I dont get any respons, waited five minutes.

According to iRule support forum Yamaha receivers automatically drop the connection after 45s if you dont keep sending keep alive messages.
I cant see any event in history log that it terminates the tcp connection though.
I dont get anything after sending write action that relates to the tcp plugin now checking 10min later.

7
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 07:15:35 AM »
iRule on ipad closed and I can successfully telnet to receiver without any problem now whenever I want so I dont think this is the problem.

8
Other Plugins / Re: TCP Plugin
« on: November 22, 2013, 04:57:18 AM »
Because of the "Maximum Number of Simultaneous TCP Connection: 1" I would like to close the connection after sending the command so I can use both iRule and voxcommando to control my receiver.

Sending single tcp writes to irule to control my ir lights and so on works every time.

Quote
In order to get feedback reliably using tcp.client you must specify the correct terminator when creating the client.
Would that be \x0D\x0A in my case?
Because I have tried that, made no difference.

I also tried client.connect -> client.write -> vc.pause for 10s -> client.disconnect
Made no difference compared to closing the connection directly after sending command using default 10ms delay.

Another thing I noticed is that the feedback event from the receiver is received when closing the connection.
If I add delays like you can see below the feedback event is received first when delays are done and its about to disconnect.

Also after full restart of voxcommando the first command to receiver ALWAYS(even feedback) works.
Quick restart does not guarantee this.

A couple of different logs:

After full restart with a delay of 5s on the command it self.
Two feedback events from receiver as you can see, first one has a payload, second does not.
Code: [Select]
2013-11-22 09:37:00 27 doCommand:test
2013-11-22 09:37:00 27 action repeat set to: 1
2013-11-22 09:37:00 27 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 09:37:00 27 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 09:37:00 27 [plugin] TcpMic: Not using message termination byte!
2013-11-22 09:37:00 27 [plugin] TcpMic: New thread created for client: test
2013-11-22 09:37:00 27 [vcevent] TCP.StartListen.test

2013-11-22 09:37:00 27 action repeat set to: 1
2013-11-22 09:37:00 27 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A&&5000
2013-11-22 09:37:00 27 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A&&5000

2013-11-22 09:37:05 32 [vcevent] testEvent

2013-11-22 09:37:05 32 doCommand:testOSD
2013-11-22 09:37:05 32 action repeat set to: 1
2013-11-22 09:37:05 32 Action:  OSD.ShowText - Payload: @MAIN:VOL=-25.5\x0D\x0A
2013-11-22 09:37:05 32 [action] OSD.ShowText:Payload: @MAIN:VOL=-25.5\x0D\x0A

2013-11-22 09:37:05 32 action repeat set to: 1
2013-11-22 09:37:05 32 Action:  TCP.Client.Disconnect - test
2013-11-22 09:37:05 32 [action] TCP.Client.Disconnect:test

2013-11-22 09:37:05 32 [vcevent] testEvent

2013-11-22 09:37:05 32 doCommand:testOSD
2013-11-22 09:37:05 32 action repeat set to: 1
2013-11-22 09:37:05 32 Action:  OSD.ShowText - Payload:
2013-11-22 09:37:05 32 [action] OSD.ShowText:Payload:

2013-11-22 09:37:05 32 [vcevent] TCP.EndListenLoop.test

Same as above but without full restart of voxcommando.
Two events received again but this time both were empty.
Code: [Select]
2013-11-22 09:43:04 553 doCommand:test
2013-11-22 09:43:04 553 action repeat set to: 1
2013-11-22 09:43:04 553 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 09:43:04 553 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 09:43:04 553 [plugin] TcpMic: Not using message termination byte!
2013-11-22 09:43:04 553 [plugin] TcpMic: New thread created for client: test
2013-11-22 09:43:04 553 [vcevent] TCP.StartListen.test

2013-11-22 09:43:04 553 action repeat set to: 1
2013-11-22 09:43:04 553 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A&&5000
2013-11-22 09:43:04 553 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A&&5000

2013-11-22 09:43:09 545 [vcevent] testEvent

2013-11-22 09:43:09 545 doCommand:testOSD
2013-11-22 09:43:09 545 action repeat set to: 1
2013-11-22 09:43:09 545 Action:  OSD.ShowText - Payload:
2013-11-22 09:43:09 545 [action] OSD.ShowText:Payload:

2013-11-22 09:43:09 545 action repeat set to: 1
2013-11-22 09:43:09 545 Action:  TCP.Client.Disconnect - test
2013-11-22 09:43:09 545 [action] TCP.Client.Disconnect:test

2013-11-22 09:43:09 545 focused: VoxCommando
2013-11-22 09:43:09 545 [vcevent] unFocused.chrome

2013-11-22 09:43:09 545 [vcevent] focused.VoxCommando

2013-11-22 09:43:09 545 [vcevent] testEvent

2013-11-22 09:43:09 545 doCommand:testOSD
2013-11-22 09:43:09 545 action repeat set to: 1
2013-11-22 09:43:09 545 Action:  OSD.ShowText - Payload:
2013-11-22 09:43:09 545 [action] OSD.ShowText:Payload:

2013-11-22 09:43:09 545 [vcevent] TCP.EndListenLoop.test

Removed all added delays(full restart)
As you can see only one event received and it contains correct payload
Code: [Select]
2013-11-22 09:45:22 755 doCommand:test
2013-11-22 09:45:22 755 action repeat set to: 1
2013-11-22 09:45:22 755 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 09:45:22 755 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 09:45:22 755 [plugin] TcpMic: Not using message termination byte!
2013-11-22 09:45:22 755 [plugin] TcpMic: New thread created for client: test
2013-11-22 09:45:22 755 [vcevent] TCP.StartListen.test

2013-11-22 09:45:22 755 action repeat set to: 1
2013-11-22 09:45:22 755 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A
2013-11-22 09:45:22 755 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 09:45:22 755 action repeat set to: 1
2013-11-22 09:45:22 755 Action:  TCP.Client.Disconnect - test
2013-11-22 09:45:22 755 [action] TCP.Client.Disconnect:test

2013-11-22 09:45:22 755 [vcevent] testEvent

2013-11-22 09:45:22 755 doCommand:testOSD
2013-11-22 09:45:22 755 action repeat set to: 1
2013-11-22 09:45:22 755 Action:  OSD.ShowText - Payload: @MAIN:VOL=-25.5\x0D\x0A
2013-11-22 09:45:22 755 [action] OSD.ShowText:Payload: @MAIN:VOL=-25.5\x0D\x0A

2013-11-22 09:45:22 755 [vcevent] TCP.EndListenLoop.test

Second time without full restart
This time feedback empty
Code: [Select]
2013-11-22 09:46:40 413 doCommand:test
2013-11-22 09:46:40 413 action repeat set to: 1
2013-11-22 09:46:40 413 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 09:46:40 413 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 09:46:40 413 [plugin] TcpMic: Not using message termination byte!
2013-11-22 09:46:40 413 [plugin] TcpMic: New thread created for client: test
2013-11-22 09:46:40 413 [vcevent] TCP.StartListen.test

2013-11-22 09:46:40 413 action repeat set to: 1
2013-11-22 09:46:40 413 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A
2013-11-22 09:46:40 413 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 09:46:40 413 action repeat set to: 1
2013-11-22 09:46:40 413 Action:  TCP.Client.Disconnect - test
2013-11-22 09:46:40 413 [action] TCP.Client.Disconnect:test

2013-11-22 09:46:40 413 [vcevent] testEvent

2013-11-22 09:46:40 413 doCommand:testOSD
2013-11-22 09:46:40 413 action repeat set to: 1
2013-11-22 09:46:40 413 Action:  OSD.ShowText - Payload:
2013-11-22 09:46:40 413 [action] OSD.ShowText:Payload:

2013-11-22 09:46:40 413 [vcevent] TCP.EndListenLoop.test

Here is a log with the use of vc.pause after write instead of built in delay in write action.
sent command twise, first time I got feedback correctly, second time I did not.
Only quick restart this time, quick restart does not guarantee correct result on first try as full restart does, just "luck" I guess.
Code: [Select]
2013-11-22 09:49:21 874 doCommand:test
2013-11-22 09:49:21 874 action repeat set to: 1
2013-11-22 09:49:21 874 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 09:49:21 874 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 09:49:21 874 [plugin] TcpMic: Not using message termination byte!
2013-11-22 09:49:21 874 [plugin] TcpMic: New thread created for client: test
2013-11-22 09:49:21 874 [vcevent] TCP.StartListen.test

2013-11-22 09:49:21 874 action repeat set to: 1
2013-11-22 09:49:21 874 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A
2013-11-22 09:49:21 874 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 09:49:21 874 [action] 09:49 VC.Pause: 5000

2013-11-22 09:49:26 896 [vcevent] testEvent

2013-11-22 09:49:26 896 doCommand:testOSD
2013-11-22 09:49:26 896 action repeat set to: 1
2013-11-22 09:49:26 896 Action:  TCP.Client.Disconnect - test
2013-11-22 09:49:26 896 [action] TCP.Client.Disconnect:test

2013-11-22 09:49:26 896 action repeat set to: 1
2013-11-22 09:49:26 896 Action:  OSD.ShowText - Payload: @MAIN:VOL=-25.5\x0D\x0A
2013-11-22 09:49:26 896 [action] OSD.ShowText:Payload: @MAIN:VOL=-25.5\x0D\x0A

2013-11-22 09:49:26 896 [vcevent] TCP.EndListenLoop.test

2013-11-22 09:49:38 706 doCommand:test
2013-11-22 09:49:38 706 action repeat set to: 1
2013-11-22 09:49:38 706 Action:  Tcp.Client.Connect - test&&192.168.0.4&&50000&&&&testEvent
2013-11-22 09:49:38 706 [action] Tcp.Client.Connect:test&&192.168.0.4&&50000&&&&testEvent

2013-11-22 09:49:38 706 [plugin] TcpMic: Not using message termination byte!
2013-11-22 09:49:38 706 [plugin] TcpMic: New thread created for client: test
2013-11-22 09:49:38 706 [vcevent] TCP.StartListen.test

2013-11-22 09:49:38 706 action repeat set to: 1
2013-11-22 09:49:38 706 Action:  Tcp.Client.Write - test&&@MAIN:VOL=?\x0D\x0A
2013-11-22 09:49:38 706 [action] Tcp.Client.Write:test&&@MAIN:VOL=?\x0D\x0A

2013-11-22 09:49:38 706 [action] 09:49 VC.Pause: 5000

2013-11-22 09:49:43 744 [vcevent] testEvent

2013-11-22 09:49:43 744 doCommand:testOSD
2013-11-22 09:49:43 744 action repeat set to: 1
2013-11-22 09:49:43 744 Action:  TCP.Client.Disconnect - test
2013-11-22 09:49:43 744 [action] TCP.Client.Disconnect:test

2013-11-22 09:49:43 744 action repeat set to: 1
2013-11-22 09:49:43 744 Action:  OSD.ShowText - Payload:
2013-11-22 09:49:43 744 [action] OSD.ShowText:Payload:

2013-11-22 09:49:43 744 [vcevent] TCP.EndListenLoop.test

9
Other Plugins / Re: TCP Plugin
« on: November 21, 2013, 06:38:16 PM »
I have played around with this plugin alot the last couple of days.
Sending both single commands to iTach, Yamaha receiver and trying out tcp.client for feedback from the receiver.

It seems quite unstable to be honest. Sending for example TCP.Single.Write with @MAIN:MUTE=Off\x0D\x0A only works about one of five tries. If I just keep sending the command eventually the receiver will respond to the command.
The same goes for feedback calls with tcp.client. Tried sending @MAIN:VOL=?\x0D\x0A, I got a feedback event every time but most of the time its empty but now and again I receive the payload correctly.
Its just not reliable enough to be useful, at least communicating with my Yamaha A2010. PDF with API for receiver can be found here if interested, http://goo.gl/gJdQAC

For the tcp.client calls I have tried with different delays, after connection is made and before sending command, delay after command, no delay. Doesn't make a difference.
iRule does not have any problem speaking with the receiver, works flawlessly. I also tried telnet to the receiver and sending commands, works without any issues what so ever.

Really need to get this working so I can attenuate the receiver about -40db when voxcommando is activated to be able to send commands reliably.

Just now trying to put receiver in standby using TCP.Single.Write in command editor hitting the "play" button for the command after the fourth try it worked.
Not sure how to proceed, can I active some sort of debug to see where it goes wrong?
In history log everything seems fine, command is sent without any errors.

10
General Discussion / Re: Exception when loading my commands
« on: November 20, 2013, 04:46:39 PM »
That did it, thanks!

11
General Discussion / Exception when loading my commands
« on: November 20, 2013, 12:14:17 PM »
Hi,

I am quite new to voxcommando but I have got most to work as I would like, controlling XBMC, Zoom Player, iTach, and different TCP devices.
Today I made several changes in the command editor but when saving and closing it threw an exception for one command tree(TCP Yamaha receiver) that I cant figure out the cause for.

If someone could point me in the right direction I would be very thankful.

Exception:
Code: [Select]
2013-11-20 16:11:58 249 Error creating grammar: Yamaha
2013-11-20 16:11:58 249 Error text: System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.__Error.EndOfFile()
   at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   at System.IO.BinaryReader.ReadUInt32()
   at System.Speech.Internal.SrgsCompiler.CfgGrammar.CfgSerializedHeader.IsCfg(Stream stream, Int32& cfgLength)
   at System.Speech.Recognition.SrgsGrammar.SrgsGrammarCompiler.CheckIfCfg(Stream stream, Int32& cfgLength)
   at System.Speech.Recognition.SrgsGrammar.SrgsGrammarCompiler.CompileXmlOrCopyCfg(Stream inputStream, Stream outputStream, Uri orginalUri)
   at System.Speech.Recognition.Grammar.LoadCfg(Boolean isImportedGrammar, Boolean stgInit)
   at System.Speech.Recognition.Grammar.LoadAndCompileCfgData(Boolean isImportedGrammar, Boolean stgInit)
   at System.Speech.Recognition.Grammar.InitialGrammarLoad(String ruleName, Object[] parameters, Boolean isImportedGrammar)
   at System.Speech.Recognition.Grammar..ctor(String path, String ruleName, Object[] parameters)
   at System.Speech.Recognition.Grammar..ctor(String path)
   at l.a(XmlElement A_0, Boolean A_1, String A_2, CommandList& A_3)
   at l.a(String A_0, SpeechRecognitionEngine A_1, CommandList& A_2, TreeView& A_3)

The commands for Yamaha group:
Code: [Select]
<commandGroup open="False" name="Yamaha" enabled="True" prefix="" priority="0" requiredProcess="" description="">
        <command id="489" name="Power on" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Power ON}&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver power on</phrase>
        </command>
        <command id="490" name="Power off" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Standby}&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver power off</phrase>
        </command>
        <command id="600" name="Volume set" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>Map.Set</cmdType>
                <cmdString>Receiver_Yamaha&amp;&amp;Current VOL&amp;&amp;{1}</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver set volume</phrase>
            <payloadRange>15-70</payloadRange>
        </command>
        <command id="535" name="Mute" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Mute}&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver</phrase>
            <phrase>mute, unmute</phrase>
        </command>
        <command id="536" name="Scene XBMC" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Scene 2}&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver scene</phrase>
            <phrase>x b m c, media center</phrase>
        </command>
        <command id="546" name="Scene TV" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Scene 3}&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver scene</phrase>
            <phrase>t v, television</phrase>
        </command>
        <command id="547" name="Scene Music" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Scene 4}&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver scene music</phrase>
        </command>
        <command id="548" name="Scene XBOX" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Scene 1}&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver scene x box</phrase>
        </command>
        <command id="581" name="Get current volume" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>Tcp.Client.Connect</cmdType>
                <cmdString>Receiver&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>Tcp.Client.Write</cmdType>
                <cmdString>Receiver&amp;&amp;{M:Receiver_Yamaha.Get VOL}&amp;&amp;100</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <action>
                <cmdType>TCP.Client.Disconnect</cmdType>
                <cmdString>Receiver</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <phrase>receiver current volume</phrase>
        </command>
        <command id="602" name="Silent mode" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Set VOL}70\x0D\x0A&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <event>SilentMode</event>
        </command>
        <command id="612" name="Normal mode" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
            <action>
                <cmdType>TCP.Single.Write</cmdType>
                <cmdString>{M:Receiver_Yamaha.Set VOL}{M:Receiver_Yamaha.Current VOL}\x0D\x0A&amp;&amp;192.168.0.4&amp;&amp;50000</cmdString>
                <cmdRepeat>1</cmdRepeat>
            </action>
            <event>NormalMode</event>
        </command>
    </commandGroup>

Pages: [1]