Commit 6b0f3413 by Martin Kotula

Sensor config adjustments

parent 3daa756b
......@@ -6,7 +6,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using uPLibrary.Networking.M2Mqtt;
using uPLibrary.Networking.M2Mqtt.Messages;
namespace Pi.Hub.Api.Controllers
{
......@@ -38,7 +37,7 @@ namespace Pi.Hub.Api.Controllers
// client.Connect(Guid.NewGuid().ToString());
Client.Publish(topic, Encoding.UTF8.GetBytes(serialized));
// client.Disconnect();
Console.WriteLine(serialized);
return new
{
Echo = obj
......
define({
"Sensor 1": {
"5C:CF:7F:AE:14:03": {
name: "Chill room"
},
__default__: {
minReadingsCount: 3,
minReadingsCount: 1,
readingExpiry: 3 * 60, //in seconds
lastReadings: 10 //number of last readings taken into account when calculating isOccupied
lastReadings: 1 //number of last readings taken into account when calculating isOccupied
}
});
\ No newline at end of file
......@@ -24,7 +24,7 @@ define(["app/config", "app/events", "mqtt", "lodash", "knockout", "knockout-post
var model = {
id: messageBody.sensorId,
isOccupied: messageBody.isBusy,
isOccupied: messageBody.isBusy === "1",
timestamp: new Date()
};
......
......@@ -4,9 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>OccupancySensorDashboard</title>
<link rel="stylesheet" href="css.css?1499344294490">
<link rel="stylesheet" href="css.css?1499432824415">
<script src="scripts.js?1499344294491"></script>
<script src="scripts.js?1499432824415"></script>
</head>
<body>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment