Skip to content

Commit

Permalink
Updated the entire Light section for a consistent layout and display …
Browse files Browse the repository at this point in the history
…of information, with links to data structures

Ensured that IDs were available on every structure
Ensured that UTC timestamps were returned with all sensor data
  • Loading branch information
jonginter committed Apr 25, 2018
1 parent 85b42dd commit 12f54b1
Showing 1 changed file with 166 additions and 76 deletions.
242 changes: 166 additions & 76 deletions versions/0.0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,35 +120,35 @@ The relationship between the common concepts (facilities, compartments, zones, e
```
GET http://[domain:port]/agroapi/[version]/plan/facilities
```
Returns a facility ID array
Returns an array of Facility IDs

### Single facility
```
GET http://[domain:port]/agroapi/[version]/plan/facilities/[facilityid]/compartments
```
Returns a compartment ID array
Returns an array of Compartment IDs

```
GET http://[domain:port]/agroapi/[version]/plan/facilities/[facilityid]/zones
```
Returns a zone ID array
Returns an array of Zone IDs

## Compartments
### All compartments
```
GET http://[domain:port]/agroapi/[version]/plan/compartments
```
Returns a compartment ID array
Returns an array of Compartment IDs

```
GET http://[domain:port]/agroapi/[version]/plan/compartments/info
```
Returns ![Compartment Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#compartment-info) array
Returns an array of [Compartment Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#compartment-info)

```
GET http://[domain:port]/agroapi/[version]/plan/compartments/location
```
Returns [Compartment Location] array
Returns an array of [Compartment Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#compartment-location)

### Single compartment
```
Expand All @@ -159,12 +159,12 @@ Returns [Compartment Info](https://github.com/open-ag-tech/api-spec/blob/master/
```
GET http://[domain:port]/agroapi/[version]/plan/compartments/[compartmentid]/location
```
Returns [Compartment Location]
Returns [Compartment Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#compartment-location)

```
GET http://[domain:port]/agroapi/[version]/plan/compartment/[compartmentid]/zones
```
Returns [Zone Info] array
Returns an array of [Zone Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#zone-info)

### Data Structures
#### Compartment Info
Expand All @@ -178,6 +178,7 @@ Returns [Zone Info] array
#### Compartment Location
| Name | Description | Unit |
| ----------- | ---------------------------------------------------- | ---- |
| id | Unique id of the compartment | uid |
| facility | ID of the facility that owns this compartment | uid |
| x | x coordinate of this compartment within the facility | cm |
| y | y coordinate of this compartment within the facility | cm |
Expand All @@ -188,36 +189,36 @@ Returns [Zone Info] array
```
GET http://[domain:port]/agroapi/[version]/plan/zones/info
```
Returns [Zone Info] array
Returns an array of [Zone Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#zone-info)

```
GET http://[domain:port]/agroapi/[version]/plan/zones/location
```
Returns [Zone Location] array
Returns an array of [Zone Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#zone-location)

### Single zone
```
GET http://[domain:port]/agroapi/[version]/plan/zones/[zoneid]/info
```
Returns [Zone Info]
Returns [Zone Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#zone-info)

```
GET http://[domain:port]/agroapi/[version]/plan/zones/[zoneid]/location
```
Returns [Zone Location]
Returns [Zone Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#zone-location)

```
GET http://[domain:port]/agroapi/[version]/plan/zones/[zoneid]/zones
```
Returns a zone ID array
Returns an array of Zone IDs

```
GET http://[domain:port]/agroapi/[version]/plan/zones/[zoneid]/crops
```
Returns a crop variety ID
Returns an array of Crop Variety IDs

### Data Structures
#### Compartment Info
#### Zone Info
| Name | Description | Unit |
| --------- | --------------------- | ---- |
| id | Unique id of the zone | uid |
Expand All @@ -228,8 +229,9 @@ Returns a crop variety ID
#### Zone Location
| Name | Description | Unit |
| ----------- | ----------------------------------------------------- | ---- |
| id | Unique id of the zone | uid |
| compartment | ID of the compartment that contains this zone | uid |
| zone | ID of the parent zone that contains this zone, if any | uid |
| parent | ID of the parent zone that contains this zone, if any | uid |
| x | x coordinate of this compartment within the facility | cm |
| y | y coordinate of this compartment within the facility | cm |
| z | z coordinate of this compartment within the facility | cm |
Expand All @@ -238,93 +240,180 @@ Returns a crop variety ID
## Sensors
### URLS
#### Talking to one sensor
http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/info
http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/location
http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/ppf
http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/ppfd
```
GET http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/info
```
Returns [Device Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-info)

```
GET http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/location
```
Returns [Device Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-location)

```
GET http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/ppf
```
Returns [Light PPF](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#light-ppf)

```
GET http://[domain:port]/agroapi/[version]/lights/sensors/[sensorid]/ppfd
```
Returns [Light PPFD](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#light-ppfd)

#### Talking to all sensors
http://[domain:port]/agroapi/[version]/lights/sensors/info
http://[domain:port]/agroapi/[version]/lights/sensors/location
http://[domain:port]/agroapi/[version]/lights/sensors/ppf
http://[domain:port]/agroapi/[version]/lights/sensors/ppfd
```
GET http://[domain:port]/agroapi/[version]/lights/sensors/info
```
Returns an array of [Device Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-info)

```
GET http://[domain:port]/agroapi/[version]/lights/sensors/location
```
Returns an array of [Device Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-location)

```
GET http://[domain:port]/agroapi/[version]/lights/sensors/ppf
```
Returns an array of [Light PPF](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#light-ppf)

```
GET http://[domain:port]/agroapi/[version]/lights/sensors/ppfd
```
Returns an array of [Light PPFD](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#light-ppfd)

#### Talking to all sensors in a zone
http://[domain:port]/agroapi/[version]/lights/sensors/zones/[zoneid]/info
http://[domain:port]/agroapi/[version]/lights/sensors/zones/[zoneid]/location
http://[domain:port]/agroapi/[version]/lights/sensors/zones/[zoneid]/ppf
http://[domain:port]/agroapi/[version]/lights/sensors/zones/[zoneid]/ppfd
```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/sensors/info
```
Returns an array of [Device Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-info)

```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/sensors/location
```
Returns an array of [Device Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-location)

```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/sensors/ppf
```
Returns an array of [Light PPF](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#light-ppf)

```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/sensors/ppfd
```
Returns an array of [Light PPFD](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#light-ppfd)

### Data structures
#### Light Sensor Info
#### Device Info
| Name | Description | Unit |
| ------- | ------------------------------------------ | ---- |
| id | unique id of the device | uid |
| make | Name of the company that makes this device | text |
| model | Model number of this device | text |
| version | Version number of this device | text |
#### Light Sensor Location
#### Device Location
| Name | Description | Unit |
| ---- | ------------------------------------------- | ---- |
| id | Unique id of the device | uid |
| zone | ID of the zone containing this device | uid |
| x | x coordinate of this device within the zone | cm |
| y | y coordinate of this device within the zone | cm |
| z | z coordinate of this device within the zone | cm |
#### Light PPF
| Name | Description | Unit |
| -------- | ------------------------------- | ----- |
| red | Level of red spectrum light | PPF |
| blue | Level of blue spectrum light | PPF |
| green | Level of green spectrum light | PPF |
| uv | Level of ultraviolet light | PPF |
| infrared | Level of infrared light | PPF |
| par | Level of absorbable light | PPF |
| light | Level of all spectrums of light | PPF |
| Name | Description | Unit |
| --------- | -------------------------------- | -------- |
| id | Unique id of the device | uid |
| timestamp | UTC timestamp of the measurement | datetime |
| red | Level of red spectrum light | PPF |
| blue | Level of blue spectrum light | PPF |
| green | Level of green spectrum light | PPF |
| uv | Level of ultraviolet light | PPF |
| infrared | Level of infrared light | PPF |
| par | Level of absorbable light | PPF |
| light | Level of all spectrums of light | PPF |

#### Light PPFD
| Name | Description | Unit |
| -------- | ------------------------------- | ----- |
| red | Level of red spectrum light | PPFD |
| blue | Level of blue spectrum light | PPFD |
| green | Level of green spectrum light | PPFD |
| uv | Level of ultraviolet light | PPFD |
| infrared | Level of infrared light | PPFD |
| par | Level of absorbable light | PPFD |
| light | Level of all spectrums of light | PPFD |
| Name | Description | Unit |
| --------- | -------------------------------- | -------- |
| id | Unique id of the device | uid |
| timestamp | UTC timestamp of the measurement | datetime |
| red | Level of red spectrum light | PPFD |
| blue | Level of blue spectrum light | PPFD |
| green | Level of green spectrum light | PPFD |
| uv | Level of ultraviolet light | PPFD |
| infrared | Level of infrared light | PPFD |
| par | Level of absorbable light | PPFD |
| light | Level of all spectrums of light | PPFD |

## Fixtures
### URLS
#### Talking to one fixture
http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/info
http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/location
http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/config
http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/power
```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/info
```
Returns [Device Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-info)

```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/location
```
Returns [Device Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-location)

```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/config
```
Returns [Fixture Configuration](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#fixture-configuration)

```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/[fixtureid]/power
```
Returns [Fixture Power](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#fixture-power)

#### Talking to all fixtures
http://[domain:port]/agroapi/[version]/lights/fixtures/info
http://[domain:port]/agroapi/[version]/lights/fixtures/location
http://[domain:port]/agroapi/[version]/lights/fixtures/config
http://[domain:port]/agroapi/[version]/lights/fixtures/power
```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/info
```
Returns an array of [Device Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-info)

```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/location
```
Returns an array of [Device Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-location)

```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/config
```
Returns an array of [Fixture Configuration](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#fixture-configuration)

```
GET http://[domain:port]/agroapi/[version]/lights/fixtures/power
```
Returns an array of [Fixture Power](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#fixture-power)

#### Talking to all fixtures in a zone
http://[domain:port]/agroapi/[version]/lights/fixtures/zones/[zoneid]/info
http://[domain:port]/agroapi/[version]/lights/fixtures/zones/[zoneid]/location
http://[domain:port]/agroapi/[version]/lights/fixtures/zones/[zoneid]/config
http://[domain:port]/agroapi/[version]/lights/fixtures/zones/[zoneid]/power
```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/fixtures/info
```
Returns an array of [Device Info](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-info)

```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/fixtures/location
```
Returns an array of [Device Location](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#device-location)

```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/fixtures/config
```
Returns an array of [Fixture Configuration](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#fixture-configuration)

```
GET http://[domain:port]/agroapi/[version]/zones/[zoneid]/lights/fixtures/power
```
Returns an array of [Fixture Power](https://github.com/open-ag-tech/api-spec/blob/master/versions/0.0.1.md#fixture-power)

### Data structures
#### Info
| Name | Description | Unit |
| ------- | ------------------------------------------ | ---- |
| id | unique id of the fixture | uid |
| make | Name of the company that makes this device | text |
| model | Model number of this device | text |
| version | Version number of this device | text |
#### Location
| Name | Description | Unit |
| ---- | ------------------------------------------- | ---- |
| zone | ID of the zone containing this device | uid |
| x | x coordinate of this device within the zone | cm |
| y | y coordinate of this device within the zone | cm |
| z | z coordinate of this device within the zone | cm |
#### Configuration
#### Fixture Configuration
| Name | Description | Unit |
| -------- | ------------------------------ | ----- |
| id | Unique id of the fixture | uid |
| channels | array of lighting channels | (see fixture channel configuration) |
### Channel Configuration
| Name | Description | Unit |
Expand All @@ -333,9 +422,10 @@ http://[domain:port]/agroapi/[version]/lights/fixtures/zones/[zoneid]/power
| lower | Lower boundary of the frequency range | nm |
| upper | Upper boundary of the frequency range | nm |
| intensity | Light intensity | % |
### Power
### Fixture Power
| Name | Description | Unit |
| ------ | ------------------------------ | ------------- |
| id | Unique id of the fixture | uid |
| status | The active state of the lights | "on" or "off" |

# Soil
Expand Down

0 comments on commit 12f54b1

Please sign in to comment.