Version to support the reading if the tank is full (BCM GPIO 20 used)
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<template name="sensorData">
|
||||
<li>{{owner}} / <strong>{{temperatureValue}}°C</strong> / <strong>{{humidityValue}}%</strong> / {{created_at_formatted}}</li>
|
||||
<li>{{owner}} / <strong>{{temperatureValue}}°C</strong> / <strong>{{humidityValue}}%</strong> / Bačva puna: <strong>{{tankFull}}</strong> / {{created_at_formatted}}</li>
|
||||
</template>
|
||||
|
||||
@@ -11,6 +11,7 @@ Api.addRoute('sensorData', {
|
||||
SensorData.insert({
|
||||
temperatureValue: parseFloat(this.bodyParams.temperatureValue),
|
||||
humidityValue: parseFloat(this.bodyParams.humidityValue),
|
||||
tankFull: this.bodyParams.tankFull,
|
||||
owner: this.bodyParams.owner,
|
||||
created_at: new Date()
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@ if (Meteor.isServer) {
|
||||
SensorData.insert({
|
||||
temperatureValue: parseFloat(this.bodyParams.temperatureValue),
|
||||
humidityValue: parseFloat(this.bodyParams.humidityValue),
|
||||
tankFull: this.bodyParams.tankFull,
|
||||
owner: this.bodyParams.owner,
|
||||
created_at: new Date()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user