Commit ed3df3e9 by Martin Kotula

Adjusted to sensor contract

parent 14eab3de
......@@ -18,14 +18,14 @@ define(["app/config", "app/events", "mqtt", "lodash", "knockout", "knockout-post
console.debug("Mqtt message received: " + message.toString());
var messageBody = JSON.parse(message.toString());
if(messageBody.object === undefined ||
messageBody.object.sensorid === undefined ||
messageBody.object.isbusy === undefined ){
messageBody.object.sensorId === undefined ||
messageBody.object.isBusy === undefined ){
throw "InvalidMessageFormat";
}
var model = {
id: messageBody.object.sensorid,
isOccupied: messaegeBody.object.isbusy,
id: messageBody.object.sensorId,
isOccupied: messaegeBody.object.isBusy,
timestamp: new Date()
};
......
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