Small change to Web API messages to aid robust usage
Posted: Sun Dec 11, 2022 4:13 pm
First of all, thank you for a very useful lighting controller. I don't use many of the advanced features for my home automation project, but that may well change as the build progresses.
I am using QLC+ 4.12.6 on an old laptop running a recent version of Ubuntu connected via a uDMX device to a number of 16 way 240v DMX interfaces that can controll all fixed lights in the house. (It needs to be supportable for 20+ years and decent open standards are one way to achieve this.) I have plans for doing more complex things, but for now my priority is to implement a means of controlling the lights via the Web API of QLC+ so I can use smart phones (and Pi Picos eventually) as light switches.
My request is as follows:
The API returns for things like "getWidgetType" a set of data something like: "QLC+API|getWidgetType|slider"
This is fine, but given the asynchronous nature of web communication there's nothing easy to link the request made on the web page to the return if automation is used. It knows the command, but doesn't know which widget the data applies to so can't write it down in a defined place - I would like to be able to have some way of knowing which request has been returned. QLC+ must know this in order to service the request!
Can the API return data with an ID field: "QLC+API|getWidgetType|Widget_ID|Widget_Type"?
And of course similar changes to getWidgetStatus, getFunctionType, getFunctionStatus.
I am using QLC+ 4.12.6 on an old laptop running a recent version of Ubuntu connected via a uDMX device to a number of 16 way 240v DMX interfaces that can controll all fixed lights in the house. (It needs to be supportable for 20+ years and decent open standards are one way to achieve this.) I have plans for doing more complex things, but for now my priority is to implement a means of controlling the lights via the Web API of QLC+ so I can use smart phones (and Pi Picos eventually) as light switches.
My request is as follows:
The API returns for things like "getWidgetType" a set of data something like: "QLC+API|getWidgetType|slider"
This is fine, but given the asynchronous nature of web communication there's nothing easy to link the request made on the web page to the return if automation is used. It knows the command, but doesn't know which widget the data applies to so can't write it down in a defined place - I would like to be able to have some way of knowing which request has been returned. QLC+ must know this in order to service the request!
Can the API return data with an ID field: "QLC+API|getWidgetType|Widget_ID|Widget_Type"?
And of course similar changes to getWidgetStatus, getFunctionType, getFunctionStatus.