3
votes

I have IoT sensor Data in IoT Hub connected I can see Azure Time Series Insights where i can Query Data by DeviceId and avg and sum . How can i make it available in my HTML website show data in as web-socket continuously.

I have designed the chart in D3 and Angular . How can i feed this data into App. any examples if you have .

I see it has very limited documentation

var aggregateExpressions4 = [];
var startDate = new Date('2017-04-19T13:00:00Z');
var endDate = new Date(startDate.valueOf() + 1000*60*60*1);
aggregateExpressions4.push(new 
tsiClient.ux.AggregateExpression({predicateString: "Factory = 'Factory3'"}, 
{property: 'Temperature', type: "Double"}, ['avg', 'min', 'max'],
{ from: startDate, to: endDate, bucketSize: '2m' }, {property: 'Station', type: 'String'}, 'green', 'Factory3Temperature'));

https://docs.microsoft.com/en-us/azure/time-series-insights/tutorial-explore-js-client-lib

If I could get this as results of dat i can push them to my D3 charts . but it tries to push its own charts by its own bar and pie charts .

var barChart =  new 
tsiClient.ux.BarChart(document.getElementById('chart4'));
barChart.render(transformedResult, {grid: true, timestamp: '2017-04-19T13:00:00Z', legend: 'compact'}, aggregateExpressions4);
1
If you want total control over the presentation of your data and are willing to write your own client app (as it seems with you using your own d3 charts), it might be best to not use Time Series Insights at all, but directly query from the Azure IoT Hub. Here is an example of this, where you could expand on: docs.microsoft.com/en-us/azure/iot-hub/…Marcel

1 Answers