ezeio2:apiref:control

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ezeio2:apiref:control [2019-07-10 17:16] andrehezeio2:apiref:control [2023-08-08 23:26] (current) andreh
Line 1: Line 1:
-===== API reference ====== 
- 
 ==== control ==== ==== control ====
  
Line 9: Line 7:
 <code>https://api.eze.io/v1/control/{serial}/{command}/[additional commands]</code> <code>https://api.eze.io/v1/control/{serial}/{command}/[additional commands]</code>
  
-Directly control a field value or output status of a controller. Note that this command will generate traffic to the controller, and is therefore rate limited to avoid excessive traffic.+Directly control a field value or output status of a controller. Note that this command will generate traffic to the controller, and is therefore rate limited to avoid excessive traffic. The field has to be set as "Writable".
  
 The immediate return data is a confirmation from the servers that the command was accepted. It is not an acknowledgement that the command(s) were actually received or executed on the controller. The immediate return data is a confirmation from the servers that the command was accepted. It is not an acknowledgement that the command(s) were actually received or executed on the controller.
Line 20: Line 18:
 | ''command'' | Command. See below | | ''command'' | Command. See below |
  
-== Possible commands: ==+=== Possible commands: ===
  
 To set the value of a field: ''field[FIELDNO]=value'' To set the value of a field: ''field[FIELDNO]=value''
Line 30: Line 28:
 To set the state of an output, bypassing logic: ''output[OUTPUTNO]=value'' To set the state of an output, bypassing logic: ''output[OUTPUTNO]=value''
 <code>https://api.eze.io/v1/control/XYZ987/output[2]=100</code> <code>https://api.eze.io/v1/control/XYZ987/output[2]=100</code>
 +
 +Multiple commands can be used in the same call.
  
 === Example usage === === Example usage ===
Line 35: Line 35:
 Set the value of two fields: Set the value of two fields:
 <code>https://api.eze.io/v1/control/XYZ987/field[12]=888/field[5]=999</code> <code>https://api.eze.io/v1/control/XYZ987/field[12]=888/field[5]=999</code>
 +
 +== Log flush ==
 +Setting the value of a field will also cause any pending buffered log samples to be sent to the servers. This only applies to the control field command. Setting register or output value does not cause a log flush.
 +
 +Tip: To force a log flush without making any changes to field values, write value 0 to field[0]. This has no effect on any valid field, but will still cause a log flush.
  
 === Return value === === Return value ===
  • ezeio2/apiref/control.1562779016.txt.gz
  • Last modified: 2019-07-10 17:16
  • by andreh