Hi, I must take the values and make the average of their, every 900 seconds. So a unique value every 15 minutes, how can I do?.
This is my begin code:
Misurazioni Potenza
Sensori Web Server
Misurazioni Potenza
<select id="foo">
<option value="">Scegli una misurazione</option>
<option value="http://localhost/plotquery1.php">Misurazione Potenza</option>
<option value="http://localhost/plotquery2.php">Misurazione Temperatura e Umidita'</option>
</select>
<script>
document.getElementById("foo").onchange = function() {
if (this.selectedIndex!==0) {
window.location.href = this.value;
}
};
</script>
<div id="graph"></div>
<script>
var layout =
{
xaxis:
{
range: ['2017-11-01 08:30:00','2017-11-31 23:00:00' ]
},
yaxis:
{
title: 'kWh',
titlefont:
{
family: 'Courier New, monospace',
size: 18,
color: '#7f7f7f'
},
range: [0, 2]
},
title:'Power'
};
Plotly.plot('graph',[{"x":["2017-11-12 13:10:33.669715","2017-11-12 13:10:39.162448","2017-11-12 13:10:44.077944",...],y":["1.386","1.386","1.386","1.188","1.188","1.386","1.188","1.188,...]}, layout);
So I haven’t put all values (they are too many), but the format timestamp is this years-month-day hh:mm:ss:… Suggests?