Remote Writing IoT Data to Influx-DB over HTTP-API.
Fork of AvnetATT_shape_hackathon by
Revision 7:489835c87d95, committed 2016-07-11
- Comitter:
- stefanrousseau
- Date:
- Mon Jul 11 22:07:19 2016 +0000
- Parent:
- 5:3417b6a84ee3
- Commit message:
- Changed device ID to serial
Changed in this revision
Flow_parameters.h | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Flow_parameters.h Mon Jul 11 21:34:31 2016 +0000 +++ b/Flow_parameters.h Mon Jul 11 22:07:19 2016 +0000 @@ -2,11 +2,9 @@ * Constants ******************************************************/ - -//sockwrite_mdm("GET /f653d97537235/a31c2684a02c/d35e42196968fd6/in/flow/climate?deviceID=e5ee19804bd500c8fe69a809342384c2&temp=41.0&humidity=87.33 HTTP/1.1 Host: run-east.att.io:80 Accept: */*\r\n\r\n"); -#define FLOW_CALLBACK_URL_START "GET /f653d97537235/a31c2684a02c/d35e42196968fd6/in/flow/climate" -#define FLOW_DEVICE_ID "e5ee19804bd500c8fe69a809342384c2" -#define FLOW_CALLBACK_URL_END "HTTP/1.1 Host: run-east.att.io:80 Accept: */*\r\n\r\n" +//sockwrite_mdm("GET \r\n/f653d97537235/a31c2684a02c/d35e42196968fd6/in/flow/climate?deviceID=foo&temp=41.0&humidity=87.33\r\n HTTP/1.1\r\nHost: run-east.att.io:80\r\nAccept: */*\r\n\r\n"); +#define FLOW_CALLBACK_URL_START "GET \r\n/f653d97537235/a31c2684a02c/d35e42196968fd6/in/flow/climate" +#define FLOW_CALLBACK_URL_END "\r\n HTTP/1.1 Host: run-east.att.io:80 Accept: */*\r\n\r\n" /****************************************************** * Type Definitions
--- a/main.cpp Mon Jul 11 21:34:31 2016 +0000 +++ b/main.cpp Mon Jul 11 22:07:19 2016 +0000 @@ -240,12 +240,13 @@ static Flow_datapoint_t FLOW_DATAPOINT = { .URL_start = FLOW_CALLBACK_URL_START, - .URL_end = FLOW_CALLBACK_URL_END, - .Device_ID = FLOW_DEVICE_ID + .URL_end = FLOW_CALLBACK_URL_END + //.Device_ID = FLOW_DEVICE_ID }; void GenerateModemString(char * modem_string) { - sprintf(modem_string, "%s?deviceID=%s&temp=%s&humidity=%s %s", FLOW_DATAPOINT.URL_start, FLOW_DATAPOINT.Device_ID, SENSOR_DATA.Temperature, SENSOR_DATA.Humidity, FLOW_DATAPOINT.URL_end); + //sprintf(modem_string, "%s?deviceID=%s&temp=%s&humidity=%s %s", FLOW_DATAPOINT.URL_start, FLOW_DATAPOINT.Device_ID, SENSOR_DATA.Temperature, SENSOR_DATA.Humidity, FLOW_DATAPOINT.URL_end); + sprintf(modem_string, "%s?serial=vstarterkit001&temp=%s&humidity=%s %s", FLOW_DATAPOINT.URL_start, SENSOR_DATA.Temperature, SENSOR_DATA.Humidity, FLOW_DATAPOINT.URL_end); } //GenerateModemString