'Called on the client side to initiade a control command.
Composes a message with the set commandand sends it to the device(s).
Does not block. Device(s) will not respond, regardless of result.
Arguments:
from_jid        -- The jid of the requester
to_jid          -- The jid of the device(s)
fields          -- Fields to set. List of tuple format: (name, typename, value).
nodeIds         -- [optional] Limits the request to the node Ids in this list.'

def set_command(self, from_jid, to_jid, fields, nodeIds=None):

    msg = self.xmpp.Message()
    msg['from'] = from_jid
    msg['to'] = to_jid
    msg['type'] = 'set'
    if (nodeIds is not None):
        for nodeId in nodeIds:
            msg['set'].add_node(nodeId)
    if (fields is not None):
        for (name, typename, value) in fields:
            msg['set'].add_data(name, typename, value)
    msg.send()
