GrowFlux API - v1

APs 8

Description

This request returns all the APs for the account.

Response
Get APs | Code: 200
{ "message": { "aps": { "48b0802e061b0960": { "lights": null, "co2_sensors": null, "id": "b8b7e3fd-6bcd-48bc-a7cd-68463ed63fc5", "name": "My First AP", "eui": "02124b0011919103", "platform": "growflux-ap", "state": "Active", "xid": "48b0802e061b0960", "zone_id": null } } }, "status": "success", "session_cookie": "s%3A3pGfViYQN6xFCYuqQ9vKK0vAHaUJ2ZAZ.XSRA%2FjMzoird3stjeXUB1qjYl81qQdv1nm3%2B0NeNsNw" }
Description

This request sets the timezone for the access point with will then propagate to all of the devices on the network. Devices on the network are aware of time down to the millisecond which is importantfor light scheduling and data collection.

Supported timezones can be found in moment-timezone, https://momentjs.com/timezone/

Body
KeyValueDescription
timezone_idUS/Eastern
Response
AP Timezone | Code: 200
{ "status": "success" }
Description

This request enables the naming of the access point for helpful identification.

Body
KeyValueDescription
nameHQ

String

Response
Name | Code: 200
{ "status": "success" }
Description

This request will blink the LED on the access point.

Response
Identify | Code: 200
{ "status": "success" }
Description

This request will send an invitation code to the new devices that have not been associated to the network. It takes approximately 30 seconds for every unassociated device to join the network.

Response
Invite - Success | Code: 200
{ "status": "success" }
Description

This request will list all of the lights associated to the access point.

Response
List Lights | Code: 200
{ "message": { "lights": { "e0da349f-8ea4-4e26-a1ac-5432b7a97f6c": { "day_profile_id": null, "day_profile_name": null, "current_schedule_settings": [], "actual_channel_settings": [], "current_power": 0, "id": "e0da349f-8ea4-4e26-a1ac-5432b7a97f6c", "name": "FXS-600TL-VF-SV - 16", "eui": "02124b0017e6b08a", "platform": "FXS-600TL-VF-SV", "state": "Disconnected", "xid": "48b0802e061b0960", "zone_id": null }, "b8970d12-a547-40d0-aa51-757d484ebcdb": { "day_profile_id": 41, "day_profile_name": "Red", "current_schedule_settings": [ 0, 0, 255, 0 ], "actual_channel_settings": [ 14, 0, 0, 0 ], "current_power": 174, "id": "b8970d12-a547-40d0-aa51-757d484ebcdb", "name": "FXS-600TL-VF-SV 15", "eui": "02124b000afd4670", "platform": "FXS-600TL-VF-SV", "state": "Active", "xid": "48b0802e061b0960", "zone_id": 3 } } }, "status": "success", "session_cookie": "s%3An0iIM_uAuajoaiP5M3nwELVMYgq4tTBu.u5RNy7zYLab5AgAgKolOb5ROtKQjf8wuKOfIje5sets" }
Description

This request will list all CO2 sensors associated to the AP.

Response
List CO2 Sensors | Code: 200
{ "message": { "co2_sensors": { "3208c698-11c4-42fa-bc33-1f53f9346358": { "last_ppm": { "value": "341", "time": 1546280252000 }, "id": "3208c698-11c4-42fa-bc33-1f53f9346358", "name": "my first name", "eui": "02124b000afd4878", "platform": "GFX-SEN-CO2", "state": "Idle", "xid": "48b0802e061b0960", "zone_id": null } } }, "status": "success", "session_cookie": "s%3APxa_ATakVpdk86TqYmk-H--U-IS4Zgj0.xR0L%2FvTRn4QtN6m7krKwzDAJ%2BAT8Fcr63IIAXJY9zyE" }
Description

This request will list all zones associated to the AP.

Response
List Zones | Code: 200
{ "message": { "zones": [ { "zone_id": 6, "zone_name": "2.2k test", "zone_index": 5, "ap_xid": "48b0802e061b0960", "formula_id": "38" }, { "zone_id": 7, "zone_name": "50kbps", "zone_index": 6, "ap_xid": "48b0802e061b0960", "formula_id": "38" }, { "zone_id": 2, "zone_name": "25kbps", "zone_index": 1, "ap_xid": "48b0802e061b0960", "formula_id": "38" }, { "zone_id": 3, "zone_name": "api named 2", "zone_index": 2, "ap_xid": "48b0802e061b0960", "formula_id": "41" }, { "zone_id": 5, "zone_name": "my new zone", "zone_index": 4, "ap_xid": "48b0802e061b0960", "formula_id": null } ] }, "status": "success", "session_cookie": "s%3ADyVIFEyJTXHk-pUNIcVnIcEN5GkS6Ygl.XdK7sRvktmIZL3kkXDNl30v8de9YApVowf6Lt%2FVAMMo" }

Zones 5

Description

The request will return zone information and state of zone.

Response
Index - Success | Code: 200
{ "message": { "zone_id": 3, "zone_name": "My First Zone", "zone_index": 2, "ap_xid": "48b0802e061b0960", "formula_id": null }, "status": "success", "session_cookie": "s%3AuRFfXDyLMzHKKR1gPgDSwdB_1yvW70CB.a5JP%2BU4jBKtlG0hd211phZV3i86IFq7z6RnqkYsuO6o" }
Body
KeyValueDescription
zone_nameMy First Zone

String

Response
Save - Success | Code: 200
{ "status": "success", "message": { "zone_name": "My First Zone", "zone_id": 3 } }
Description

Associate a light formula to a zone. Lights associated to a zone will receive the light formula. It is advised to have all lights connected to the mains before applying the command. Internally, commands flowing through an AP are performed synchronously with a 5 second timeout between each command. Therefore if a light is not found, it will wait 5 seconds before going to the next light. Lights that are not on will ultimately receive the command once they do turn on and connect back to the cloud.

Not setting a day profile id will remove a light formula from a zone. This takes upwards of 5 seconds per light as confirmation from the light back to the cloud is required.

Body
KeyValueDescription
day_profile_id41

Integer

Response
Set Day Profile - Success | Code: 200
{ "status": "success" }
Body
KeyValueDescription
zone_nameMy First Zone

String

Response
New | Code: 200
{ "message": { "zone_name": "My First Zone", "zone_id": 3 }, "status": "success" }
Description

Remove a zone by ID. Lights associated to the zone will have their day profiles removed as well.

Response
Delete | Code: 200
{ "status": "success" }

Lighting 9

Response
Index - Success | Code: 200
{ "message": { "day_profile_id": null, "day_profile_name": null, "current_schedule_settings": [], "actual_channel_settings": [ 0, 0, 139, 0 ], "current_power": 0, "schedule_data": null, "id": "e63d0b54-5d88-446a-8595-69b679e9b700", "name": "My First Light", "eui": "02124b000b01fa00", "platform": "FXS-600TL-VF-SV", "state": "Idle", "xid": "48b0802e061b0960", "zone_id": 3, "last_activity": 1546403950136 }, "status": "success", "session_cookie": "s%3Awp4qRropyJJZS4gGyw2ZhtQ2CydniTlv.Qm%2FgtKxUzKq4KoJxxgVD%2B4ldv7QlMNxFgEVcCK32oVg" }
Response
Get Channels - Success | Code: 200
{ "message": [ 200, 0, 0, 0 ], "status": "success", "session_cookie": "s%3A1lFNX2_K5dK0_MIURcwKorWr9-XZHz8Z.dR9d8Q9J9hIL39nTct1uQYRDLSnxql8Pfyo%2Fbk3KgVs" }
Body
KeyValueDescription
ch10

Integer 0-255

ch2100

Integer 0-255

ch30

Integer 0-255

ch40

Integer 0-255

ch50

Integer 0-255

ch60

Integer 0-255

Response
Save Channels - Success | Code: 200
{ "status": "success", "session_cookie": "s%3A9kYbyZ-ZnE-mWN8knJgBRsmyF6jts7f2.oUT%2B9btbaBo5OGre6xC2WVSckHVWAcdgZ8LMDqxbX24" }
Response
Get Channels - Success | Code: 200
{ "message": [ 200, 0, 0, 0 ], "status": "success", "session_cookie": "s%3A1lFNX2_K5dK0_MIURcwKorWr9-XZHz8Z.dR9d8Q9J9hIL39nTct1uQYRDLSnxql8Pfyo%2Fbk3KgVs" }
Response
Identify - Success | Code: 200
{ "status": "success" }
Description

Unbond the light from the AP so it can be moved to another network. It will need to be invited again to connect back to the cloud.

Response
Unbond - Success | Code: 200
{ "status": "success" }
Description

Give an identifable to help indicate where its located it the facility such as row, rack or bay.

Body
KeyValueDescription
nameMy First Light

String

Response
Name - Success | Code: 200
{ "status": "success" }

CO2 8

Response
Get Latest Value - Success | Code: 200
{ "message2": "3208c698-11c4-42fa-bc33-1f53f9346358", "message": { "last_ppm": { "value": "345", "time": 1546403533000 }, "id": "3208c698-11c4-42fa-bc33-1f53f9346358", "name": "my first name", "eui": "02124b000afd4878", "platform": "GFX-SEN-CO2", "state": "Idle", "xid": "48b0802e061b0960", "zone_id": null, "last_activity": 1546403654519 }, "status": "success", "session_cookie": "s%3AbINfbEiovxDmQ5zRolcR6Vd7hCUNH_Gc.yhEMmQGb%2FsONFwq%2FKedFSVjHqc%2BALrBg70oG3jCbUJk" }
Body
KeyValueDescription
nameMy First CO2 Sensor

String

Description

Calling this function will force the CO2 sensor to start a measurement. Note, it may take up to 60 seconds for the measurement to be sent back to the cloud.

Body
KeyValueDescription
nameMy First CO2 Sensor

String

Response
Instant Sample - Success | Code: 200
{ "status": "success" }
Description

This feature is in beta status.

Body
KeyValueDescription
co2_threshold2200

Integer

Description

Setting the period controls how often the CO2 is sampled. The unit is in seconds and must be 60 or greater. Please keep in mind a lower sampling rate will impact time between battery changes.

Body
KeyValueDescription
time300

Integer in seconds

Response
Set Period - Success | Code: 200
{ "status": "success" }
Description

This function unbonds the CO2 sensor from the AP so it can be moved to another network. It will need to be invited again to connect back to the cloud.

Default 2

Headers
KeyValueDescription
Content-Typeapplication/x-www-form-urlencoded
Body
KeyValueDescription
grant_typepassword
client_secret
client_id
username
password
scope*