Button Variable from device response help.

A plugin that allows for end user development of multiple RS232 device control systems.
tmax
Member
Member
Posts: 91
Joined: Fri Jun 24, 2005 4:36 pm
Contact:

Button Variable from device response help.

Postby tmax » Sat Oct 11, 2008 7:17 am

I would like to change the colour of a button based on a response into MLGD

For example
response >w/1/1/0=1 button green
Response >w/1/1/0=0 button grey

I can use the above response to trigger a main lobby command and it works great

I just don’t know how to set up the variable on the button and the command in the MLGD plug-in?

Any help would be great, I have looked at the Wiki, but I still can’t figure it out.

tmax
Member
Member
Posts: 91
Joined: Fri Jun 24, 2005 4:36 pm
Contact:

Postby tmax » Tue Feb 17, 2009 1:51 pm

I would be really really grateful if somebody could give me some advice as I’m really stuck and have already spent houres trying to get this working.

I have a button that I need to display as on or off colours depending on the response from MLGD

In the button I have placed {{counter_lights}}
I have set up the states with the different colours green/on and red/off and have the local off state value as off

In MLGC I have the command name as counter_lights
The MLS variables is off
The device response is >00/0/025=0, which is the response I get when I switch the lights off.

This is the details from the events tab:
Processing - eib~kitchen_counterlights_off from Kitchen
CMD: eib~kitchen_counterlights_off FROM: Kitchen
Processing GC Command
Socket State - 7
Sending command for EIB - w0/0/25=0 via GC: 192.168.1.70:1
Processing Return String - >00/0/025=0

The lights turn off fine, but the button will not change colour. It remains green??

User avatar
Fonceur
Expert
Expert
Posts: 583
Joined: Sun Sep 09, 2007 10:18 am
Contact:

Postby Fonceur » Tue Feb 17, 2009 2:01 pm

The first thing is to make sure that {{counter_lights}} is really changing with those events... So from MLServer/View/Server variables, monitor your {{counter_lights}} variable when you switch the light(s) on and off... You can also consult the MLServer events log to make sure that everything is processed correctly (Verbose + Trace).
MLComDevice: Control serial/TCP device (ASCII/hex) - MLSchedule: Alternative to MLScheduler
MLBeyondTV and MLSageTV: PVR support - TChanger: Sony BDP-CX7000ES 400 disc Bluray changer
TRadio: Sirius/HD/XM radio - TChart: Chart from variable Wiki

tmax
Member
Member
Posts: 91
Joined: Fri Jun 24, 2005 4:36 pm
Contact:

Postby tmax » Tue Feb 17, 2009 2:35 pm

Thanks,
I see the counter_lights variable, but no value beside it?

on the events log it shows the system setting the variable, but the response is counter_lights=

I guess the problem is still in the details I have filled into MLGD?

I also tried to run a command SetVariable~counter_lights~{{off}}
but still will not set a value in the variable

User avatar
Fonceur
Expert
Expert
Posts: 583
Joined: Sun Sep 09, 2007 10:18 am
Contact:

Postby Fonceur » Tue Feb 17, 2009 2:59 pm

tmax wrote:I see the counter_lights variable, but no value beside it?

Then that explains why your button isn't working...

I also tried to run a command SetVariable~counter_lights~{{off}}
but still will not set a value in the variable

First you have the wrong syntax, second your trying to set it to the value of the "off" variable which probably doesn't exist in the first place... You want something like:

SetVariable|counter_lights~off
MLComDevice: Control serial/TCP device (ASCII/hex) - MLSchedule: Alternative to MLScheduler
MLBeyondTV and MLSageTV: PVR support - TChanger: Sony BDP-CX7000ES 400 disc Bluray changer
TRadio: Sirius/HD/XM radio - TChart: Chart from variable Wiki

tmax
Member
Member
Posts: 91
Joined: Fri Jun 24, 2005 4:36 pm
Contact:

Postby tmax » Tue Feb 17, 2009 3:27 pm

Great.
It works now by sending the correct command. Thank you for your help!


Return to “MLGenericDevice”

Who is online

Users browsing this forum: No registered users and 1 guest