-
Notifications
You must be signed in to change notification settings - Fork 23
Logic Plugin Functions (en)
Thomas Kluge edited this page Mar 10, 2018
·
2 revisions
- link(Source,Destination) Create a link between two datapoints.
- subscribe(Source, callback) Subscribe to change Event of a datapoint. The callback function will be executed with parameters (source,value).
- getValue(Datapoint).then(function (value) {}) will fetch a value for the datapoint an call the function later.(last known Value)
- getState(Datapoint).then(function (value) {}) will fetch a value for the datapoint an call the function later. Fetches value direct from the interface.
- setValue(Datapoint,newValue) will set a new Value to the given Datapoint.
- getVariables([Name1,Name2,Namen]).then(function (variables) {}) will fetch the values for given variables from CCU and call the function later its done.
- executeCCUProgram(program).then(function () {}) will launch the named programm at your ccu
- setVariables({"Name1":Value1,"Name2":value2,"NameN":vnalue}) will set new Variable Values
- schedule('m h d M Y', {"name":"SchedulerName"}, function () {}) will schedule a function for the given time. Syntax is like unix cron
- fetchMessages().then(function (messages) {}) will fetch all CCU system messages into the array messages.
- confirmMessages(messages) will confirm all ccu system messages from messages array.
- httpCall(method,url,parameters).then(function (result,error){} Will perform a http Call (parameters are {key:value,key2:value2})