| METODO | URL |
|---|---|
| * | /verifyConnection |
| * | /getGateBeeInfo |
| * | /getBees |
| * | /getActuators |
| POST | /saveActuator |
| POST | /sendCommand |
{status:'5',response:'I\'m here!"'}{"status":0,"data":"{\"firmware_version\":\"Y2015M4D07\",\"bee_connected\":12,\"connected_to_cloud\":true,\"local_address\":\"192.168.1.2\",\"local_address\":\"2.68.521.6\",\"serial\":\"F8-77-EB-47-75-85\"}"}| firmware_version | (String) | Versione Firmware |
| bee_connected | (Integer) | Numero di Bee attualmente connesse |
| connected_to_cloud | (Boolean) | Flag di Connessione al Cloud microBees |
| local_address | (String) | IP Locale del gateBee |
| remote_address | (String) | IP Remoto del gateBee |
| serial | (String) | Seriale del gateBee |
getBees
Questo metodo permette di ricevere tutte le bees collegate al gateBee. Per ottenere l’elenco di tutte le Bees è sufficiente invocare /getBees, per richiedere una Bee in particolare /getBees/:ID della Bee.
Risposta esempio /getBees (JSONArray): [{"bee_id":3,"UUID":3225412315,"active":true,"bee_type":1,"lastUpdate":1430119912858,"actuators": []}]
Risposta esempio /getBees/3 (JSONObject): {"bee_id":3,"UUID":3225412315,"active":true,"bee_type":1,"lastUpdate":1430119912858,"actuators": []}
| bee_id | (Integer) | ID locale bee |
| UUID | (Long) | ID univoco bee |
| active | (Boolean) | connesso in questo momento al gateBee |
| bee_type | (Integer) | Tipo bee (vedi tabella tipi bee) |
| lastUpdate | (Long) | Ultimo aggiornamento in millisecondi (la differenza, in millisecondi dal momento dell’ultimo aggiornamento alla mezzanotte del 1 Gennaio 1970 UTC) |
| actuators | (JSONArray) | Elenco degli Attuatori associati |
[{"id":54603, "name":"wireBee Switch", "configuration":{"actuator_type":"0", "actuator_timing":"1"}, "deviceID":13, "smartbee_serial":3225412315, "smartgate_serial":"F8-77-EB-47-75-85", "smartgate_ip": "192.168.1.2", "status":0}]{"id":54603, "name":"wireBee Switch", "configuration":{"actuator_type":"0", "actuator_timing":"1"}, "deviceID":13, "smartbee_serial":3225412315, "smartgate_serial":"F8-77-EB-47-75-85", "smartgate_ip": "192.168.1.2", "status":0}
| id | (Long) | ID univoco dell’attuatore |
| name | (String) | Nome locale dell’attuatore |
| configuration | (JSONObject) | Configurazione dell’attuatore |
| deviceID | (Integer) | Tipo dell’attuatore (vedi tabella Tipi Attuatori) |
| smartbee_serial | (String) | Seriale del bee padre |
| smartgate_serial | (String) | Seriale del gateBee padre |
| smartgate_ip | (String) | IP locale del gateBee padre |
| status | (Boolean) | Stato dell’attuattore (acceso/spento) |
Questo metodo permette di salvare la configurazione locale di un attuatore. Con configurazione dell’attuatore si intende il tipo di interruttore ( Stato o Impulsivo – vedi Tabella Attuatori). Input Richiesto: JSONObject con i parametri di configurazione e l’identificativo locale dell’attuatore.
Input Esempio: {id:1451,name:"Nuovo Nome Attuatore",configuration:{"actuator_type":"0", "actuator_timing":"1"}}
Il metodo restituisce l’elenco degli attuatori aggiornato (vedi getActuators)