Real-time Data Forwarding

You can use the OSBeehives App to set up real-time data forwarding between our cloud and your own server. This allows you to store the data on your own and process it however you like. We have created an Open Data Server template that you can clone for free in this address:

https://github.com/opensourcebeehives/OpenDataServer

The server is a Python-based API that exposes two endpoints: measurements and audioevents.
You can redefine the functions to process measurements and audioevents. By default, they will just write the data to a .csv file.

Once the server is set up and running, you can use the Data Server URL field in the Settings screen to enter your server's http(s)://URL:PORT or http(s)://IP:PORT. Don't add a slash (/) to the end of the URL. Once you tap "Submit Changes", all the following data will automatically be forwarded to your server.

1600

TESTING

You can test the server by using CURL, Postman, ARC or any other tool that allows you to perform HTTP POST requests:

curl -X POST http://URL:PORT/measurements < new_measurement.json

# new_measurement.json
{
		"measurement":{
    	"published_at": "2018-06-18 17:12:47.158",
      "device_id": "000000000000000000000000",
      "temp_c_in": 27.4,
      "temp_c_out": 18.05,
      "pressure_out": 762,
      "rhumidity_out": 72,
      "rhumidity_in": 27,
      "battery_charge": 100,
      "battery_health": 100,
      "solar_charge": 3,
      "rssi": -5,
      "wifi_packet_loss": 1,
      "audio_packet_loss": 1,
      "lat": 0,
      "lon": 0, 
      "weather_main": "Scattered Clouds",
      "wind_speed": 3,
      "wind_angle": 30
    }
}
curl -X POST http://URL:PORT/audioevents < new_audioevent.json

# new_measurement.json
{
	"audioevent":{
  	"published_at": "2018-06-18 17:12:47.158",
    "device_id": "000000000000000000000000",
    "event_type": "Active",
    "s3_url": "https://s3-us-west-2.amazonaws.com/osbhbuzzboxrecordings/0000.mp3" 	}
}