Posts: 14
Threads: 3
Joined: Nov 2013
Hi All,
I am stuck at the moment with an evenghost issue.
I have installed the plugin and trying to identify how to send the current state of power.
I have setup a macro to read current power state and placed a python command to print the state to verify. This all works.
I then added a CQC action to send power state and put on value 1 to send to CQC.
However this doesnt work as it always sends the on command. How do i send a value to CQC based on the current state? I.e. 1 for on and 0 for off.
Thanks
Dale
Posts: 3,415
Threads: 158
Joined: Jan 2006
If you are using a User Action event, you would just select SendEvent in EventGhost and fill in something like:
Event Type: Power
Event Data: 1
Then you would create a Triggered Event in CQC use the statement below to pull the data:
Code:
Is User Action Event From <Driver Moniker Name>
Code:
TrigEvent::GetUserActionVals(LVar:EventType, LVar:EventData)
System::LogMsg(Test Action, 0, EventType: %(LVar:EventType) EventData: %(LVar:EventData), Status)
Posts: 14
Threads: 3
Joined: Nov 2013
wuench Wrote:If you are using a User Action event, you would just select SendEvent in EventGhost and fill in something like:
Event Type: Power
Event Data: 1
Then you would create a Triggered Event in CQC use the statement below to pull the data:
Code:
Is User Action Event From <Driver Moniker Name>
Code:
TrigEvent::GetUserActionVals(LVar:EventType, LVar:EventData)
System::LogMsg(Test Action, 0, EventType: %(LVar:EventType) EventData: %(LVar:EventData), Status)
Thanks Wuench, just want to confirm, how do i setup the above code in a triggered event?
Posts: 3,415
Threads: 158
Joined: Jan 2006
Open the CQC Admin Interface
Select Managed Scheduled/Triggered Events
Select the Triggered Events Tab
Click Add New
For first trigger select Is User Action From
Right Click on Device: Field and Select your EventGhost Driver
Fill the in Title (anything you want)
Click Edit Action
Enter the commands
Code:
TrigEvent::GetUserActionVals(LVar:EventType, LVar:EventData)
System::LogMsg(Test Action, 0, EventType: %(LVar:EventType) EventData: %(LVar:EventData), Status)
Click Save
Click Save
That code just pastes the data into the CQC log, you will need to add whatever commands you want to do something more useful.