I think Charts v3 might be a valid platform to show the data:
https://www.amcharts.com/demos/date-based-data/
Something like this works but it seems to be lot of work to program for every value of every sensor...
- Code: Select all
<?php
$db = new SQLite3('test.sqlite');
$db->busyTimeout(5000);
$kitchen= ($db->querySingle('SELECT value FROM variable_history_4923453425 ORDER BY id DESC LIMIT 1'));
$sleep = ($db->querySingle('SELECT value FROM variable_history_1564776538 ORDER BY id DESC LIMIT 1'));
echo '
var chartData = [
{
"raum": "sleep",
"temperatur": ' . $sleep . ',
"color": "#B0DE09"
},
{
"raum": "kitchen",
"temperatur": ' . $kitchen . ',
"color": "#BF3EFF"
}];
';
$db->close();
unset($db);
?>
Is there anything done already where I can build upon?
Or are there other ideas?