I have a tunnel connection setup to an old laptop that has been configured like a server. The data connection is only mobile internet from a very remote location and it will be very slow. Spaces can be insert into parameters that accept strings by using "%20". Using the special access_token=TOKEN will provide read access to 3 different Topics to create Candlestick charts. The data goes back to 2014 if I remember correct, but there are many spots where the data from the broker gets rough (missing or bad observations). The data seems to be getting worse as time goes on, maybe some maintenance is needed on the IoT device.

The 3 Candlestick object ids available shown first followed by there originating data URL are shown below.

  1. 58a85f5c9b20b239b3378e7d        http://api.thingspeak.com/channels/12397/fields/3.json
  2. 58a860759b20b239b3378e7e        http://api.thingspeak.com/channels/12397/fields/4.json
  3. 58a861009b20b239b3378e7f        http://api.thingspeak.com/channels/12397/fields/6.json

The service uses many different VM containers and it would not be worth it to move everything onto a big server somewhere just for this small proof of concept demo, but I'm sure the rendered images would be much much faster. Locally on the laptop HD SVG images are rendered in about 150ms, other vector formats take about the same time. Raster formats (PNG, JPG, etc) take about 3 times as long as they are currently trans-coded from an SVG. These times are measured at the last stage entering and leaving the laptop and include verifying the token, gathering all the data, etc. The code that renders the images is currently all synchronous and single threaded. It is better to first get things implemented and running correctly before working on speed optimizations.

The data for the Topics are requested from the broker once about every 5 minutes, so there will be no new data to render any sooner than that. Historic data can be requested by using the startingDate parameter using just a date (startingDate=2015-03-23) or a fuller more precise format down to seconds (startingDate=2015-03-23T07:23:09). Different image formats can be returned by using the imageFormat parameter and the types currently supported should be bitmap, gif, jpeg, pdf, png, ps, svg, tiff and webp. I have limited the size of mostly the raster formats as they use a lot of the limited data currently available when they get large.

*** Update *** I have slowed down the interval for requesting new Topic data from the broker from every 5 minutes to about 20 minutes. This was done because the behavior of the broker seems different after the horizon has been reached in requesting Topic data. I am now busy with the Final Report and do not have time to look into it.

There is probably much I haven't mentioned, so if there are any questions just ask in the replies of any of the posts.