help me!!

Questions and comments specific to a particular plugin should go here.
Post Reply
petertohen
Posts: 1
Joined: Wed Aug 23, 2017 1:47 am

help me!!

Post by petertohen » Wed Aug 23, 2017 1:51 am

Hi,

I am using VoxCommando to send events to EG and this works really well. This way i control my LG TV with specific serial commands such as:

ka 0 1\r (serial write command to turn on the TV from standby)

The question i have is how to pass variables from VoxCommando to EG. I would like to use this to set the volume to a specific level. I can generate an event in EG such as:

Broadcast.tv-setvol '10'

I just don't know how to pass the variable "10" to the serial command:

kf 0 {eg.event.payload}\r

What do i need to replace {eg.event.payload} with to have the variable "10" passed on to this serial command so it reads: kf 0 10\r ??

Thanks for your help!
http://voxcommando.com/home/features/

User avatar
kgschlosser
Site Admin
Posts: 3020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: help me!!

Post by kgschlosser » Wed Aug 23, 2017 11:44 pm

ok so the serial plugin is not set up to parse the information entered in the Write action.


so what you will have to do is instead of adding the Write action you will need to add the Python Command action. and in the Configuration dialog for the action you will enter

Code: Select all

eg.plugins.Serial.Write('kf 0 %s\r' % eg.event.payload)
click save.. add the event you want and away you will go.
If you like the work I have been doing then feel free to Image

Post Reply