We use this feature her to bring our pages to life. If you hit a button to, say, turn on a light, we have an LED control turn green at the same time (which by the way is driven by the server, so there is feedback!). We have asked one of our customers to build a video showing this feature at work.
The feature works like this:
1) Hit the button on the page 2) The button is posted to the server 3) all the other controls tied to the control (through the customize feature in the button) are asked for a refresh also 4) All the refresh information comes back to the server and all the controls specified and the button is refreshed.
For the example you were asking for, here is a code snipped from a Local.py file.
# FB-12 - turn on GPIO 18 (fan) if (objectServerID == "FB-12"):
#check for validate request # validate allows RasPiConnect to verify this object is here if (validate == "YES"): outgoingXMLData += Validate.buildValidateResponse("YES") outgoingXMLData += BuildResponse.buildFooter() return outgoingXMLData
# not validate request, so execute
responseData = "XXX" if (objectName is None): objectName = "XXX"