Page 1 of 1

API Run/Stop Function

Posted: Sat Oct 13, 2018 8:56 am
by markp
I know I can query for a list of functions (scenes, EFX, etc) and their respective statuses, but how do I get one to run/stop without using a VC widget?
I can't find any method to directly "set" a function's status in the test api example page.

Re: API Run/Stop Function

Posted: Sat Oct 13, 2018 4:07 pm
by mcallegari
Web APIs have been written for the web interface, not quite to "do everything you want with QLC+".
Perhaps you can explain your usage case and why you need such APIs ?

Re: API Run/Stop Function

Posted: Tue Oct 16, 2018 1:52 pm
by markp
Ah, OK. I have an external application which I'd like to trigger lighting scenes/efx when certain events occur - it's for an interactive game, and I'd like the moving heads to run some pre-defined routines.

Alternatively I'm not sure if OSC can provide this functionality? The app is mostly written in Python so there is probably a library for this.

Re: API Run/Stop Function

Posted: Tue Oct 16, 2018 3:58 pm
by mcallegari
Just create some functions and assign each one of them to a dedicated button in the Virtual console.
The you can trigger buttons on/off via web API.

Re: API Run/Stop Function

Posted: Tue Oct 16, 2018 8:39 pm
by markp
OK, will do. Didn't realise the API was geared around the VC - the methods to "getFunctions" had me thinking there must be a way to launch them too.