Author Topic: TCP Plugin  (Read 33712 times)

0 Members and 2 Guests are viewing this topic.

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #45 on: September 19, 2013, 11:44:19 AM »
Thanks James,


the wheels are turning! The feed back logging AND Monitoring is going to open a lot of other possibilities. For example, they make a PICO control for the lighting system which is a very small RF control that you could clip to your shirt pocket, put in your pocket or purse or mount on a small table top "pedestal". It is a very economical device to give you remote control of lights or whole scenes on the system. Imagine now if you used one such device to send a command to the lighting system, which is monitored by VOX that then tells VOX to either Listen or not Listen. You could simplify a distributed Mic system for whole home control immensely with this method of toggling VOX to listen or not I would think with a manual "push to talk" approach. Working in VoX's soft mute feature could be activated as the VOX listen command is executed as well. This would ensure the commands spoken when loud media is playing are a non issue for the Start Listening command as well as the subsequent commands unitil the PICO control tell VOX to (or your voice command VOX) to stop listening.

Here is a link to a PICO control: http://www.lutron.com/en-US/Products/Pages/Components/PicoWirelessController/Models.aspx


Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: TCP Plugin
« Reply #46 on: September 19, 2013, 01:50:02 PM »
Yes the feedback from a device open a door to many other things. I use a "wristmic" (it looks like a watch) together with Eventghost to set Vox in standby or OFF mode with the buttons on it, but can also do this by voice.

http://voxcommando.com/forum/index.php?topic=1153.msg9783#msg9783

As next we test the Omate Truesmart http://www.kickstarter.com/projects/omate/omate-truesmart-water-resistant-standalone-smartwa with VoxWav, if this will work you have always your remote by your side  ;)  (okay, not the cheapest way)
We have also ideas to create a Wireless Mic, that we can wear as watch or such like as a StarTrek communicator.
***********  get excited and make things  **********

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #47 on: September 19, 2013, 02:39:05 PM »
Hi Kalle,

I did see your post about your wrist adaptation of a wifi headset: stellar Idea! After reading your post and a few others linked to the James Lipsit Website where he uses the HAL2000 controller with very expensive Shure microphone set up for whole home control. My idea lies somewhere inbetween wherein you have the permanently installed mics around the house (or at least in the areas of interest of having voice control) but instead of the expense of the intelligent Shure backend equipment and HAL2000, the mic circuits could be toggled on and off with a relay on the lighting system (in this case a Lutron RadioRa2 system) and the VOX could be active listening or ignoring on the same commands that toggle the mic relays. This could be achieved using the small RF pico controls mentioned. The come with a "car visor" kit to add a clip that could be for your pocket or belt, a table top pedestal mount and the option of mounting on a wall with or without a faceplate (with a face plate is appears as any other light switch, but without a faceplate it is easy to remove and replace on the wall so you could "grab" it on your way into a room and replace it on your way out, giving it a "place" when you are looking for it).

There is an out of the box relay solution called a VCRX that integrates wirelessly with the Lutron system that has 6 keypad pushbuttons, 3 CCI inputs and 4 CCO outputs that can be programmed in the Lutron Software. Not perfect for everyone I will admit as Lutron can be expensive in it's own right, but that is the business that I am in. One thing for sure is that the Lutron RF technology if within proper working ranges is one of the most stable and bullet proof systems.

here is a link to the VCRX: http://www.lutron.com/TechnicalDocumentLibrary/Visor%20Controls_369-224a.pdf

you will notice that one of the inputs is labelled as a security input. it is possible to wire one of it's outputs back to this input to achieve something like: Yell for HELP and have VOX activate the output, the output activates security mode and you could have all of the lights in the house flash off and on (including the outside) and send a contact closure the security system.....


Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #48 on: September 20, 2013, 06:09:10 AM »
Hello James and Kalle,

I am stumped on what facility to use to 'catch' and output from my lighting system to have VOX treat as an event.

When I have my telnet client connected to the lightng processor and send valid commands to it via VOX, there is clearly feedback of the subsequent action in the processor being reported in the telnet client coming back from the lighting processor, but I have no idea how to have VOX set to "listen" to this output and base an event on this.

for example, if i send a string using TCP.client.write such as #device,20,2,3\x0d\x0a, i get feed back in my telnet client that affirms the action as "~device,20,2,3". It is this output that i would like to turn into an event to then send a VC.on command.

Any hint in the right way to do this?

L.

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: TCP Plugin
« Reply #49 on: September 20, 2013, 06:30:07 AM »
 ::hmm, VC listen as default on port 33000 that you can change in the option menu, but I have really no plan if it can help you  ::)

English is not my native language and sometimes I misunderstand a question.  :bonk
***********  get excited and make things  **********

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #50 on: September 20, 2013, 06:53:42 AM »
Hi Kalle,

does the VC.Listen command keep the port open until it is closed otherwise?

I will try it and see what happens  ::zzz

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: TCP Plugin
« Reply #51 on: September 20, 2013, 06:58:37 AM »
the port is always open, so VC listen also on this port when it is in OFF mode
***********  get excited and make things  **********

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #52 on: September 20, 2013, 07:03:44 AM »
Ok I get it... i thought it was a command until i reread your message.  i have set it to the telnet port and will try a few things from there.

thanks for your help.

L.

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #53 on: September 20, 2013, 08:13:39 AM »
I feel like a one armed swimmer this morning...

I have looked through and through and see events being generated in the log such as VC.on or VC.standby, but I not seeing where this is triggered to be an event to show in the log in order for me to endeavor to dissect it and see how this could apply to what I am trying to do.

I have a feeling that somehow i need to have a running xml log that is being generated by the output of my lighting system and the command logic that i need to build the "event" that i am looking for must be based on this xml file and hone in on the string(s) that i am trying to monitor to drive the subsequent action... how to do this? I am also wondering if there is configuration that I need to do with the TCP web-server that is part of the TCP plugin..... I have activated it and see that it is started but when i try to browse to localhost or 127.0.0.1 I just get an error page... Do in need to set up the site under the windows management console somehow as well?

Kalle

  • $upporter
  • Hero Member
  • *****
  • Posts: 2320
  • Karma: 47
    • View Profile
Re: TCP Plugin
« Reply #54 on: September 20, 2013, 08:45:11 AM »
To give you a start point with the TCPwebserver, test following:

Start the webserver in the TCP plugin then type in a webbrowser: localhostIP/api/OSD.showText&&hello

if everthing works VC show you a OSD window with "hello"
« Last Edit: November 02, 2015, 02:26:10 PM by Kalle »
***********  get excited and make things  **********

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #55 on: September 20, 2013, 08:57:32 AM »
Hi Kalle,


this is what have been trying, I get "this link appears to be broken".

regards,

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TCP Plugin
« Reply #56 on: September 20, 2013, 09:05:57 AM »
33000 is a UDP port which is not related to this.  None of the things you are trying are going to work, but it may break something else, so I suggest you change it back.

You should be getting events generated automatically by the tcp client you have created and connected with.  If you are not, then you probably need to adjust your parameters for the connect action.  I suspect that your terminator is wrong.  Try it with this parameter blank.  Then look at what events get generated.
« Last Edit: September 20, 2013, 09:10:05 AM by nime5ter »

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #57 on: September 20, 2013, 09:59:01 AM »
Brilliant! = Success! Removing the terminator on my client connection was the key!

El Voxerino you have made my day!


Thanks!

Now I can start my ascent on the mountain of Conditional Logic!

L.

Crunchie

  • $upporter
  • Jr. Member
  • *****
  • Posts: 33
  • Karma: 0
    • View Profile
Re: TCP Plugin
« Reply #58 on: September 20, 2013, 10:03:07 AM »
I should also mention that this will now make it possible to have the RF Pico hand held control capable of "push to talk" on a single button as it reports one string for being depressed (command = VC.On) and another unique string for being released (command = VC.Standby). You can order these controls with two, three or five buttons, which would theoretically give them up to 10 different actions (5 for each button press and 5 for each button release). This could easily lend it to scrolling through plugin command sets for example to isolate your commands to a particular focus such as lighting, or XBMC or MediaMonkey for example.

« Last Edit: September 20, 2013, 10:05:40 AM by lootrondealer »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: TCP Plugin
« Reply #59 on: September 20, 2013, 12:16:14 PM »
Please show us some sample payloads attached to your events.  It may be that there is still a terminator that we should use, to prevent multiple messages sent together from being combined into a single event.

One way to get the payload easily is with this command (you may need to adjust the event name to match your client name) which will copy the payload to your clipboard.  You can then past it into notepad, or directly to the forum in a code block.

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<command id="1120" name="copy payload to clipboard" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>System.SetClipboardText</cmdType>
    <cmdString>{1}</cmdString>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>RR</event>
</command>