Good day.
so i have a esp8266 with a DS18B20 (temp sensor). the sensor is outside and it's set up to transmit the temp every 30 seconds. (side thing to trouble shoot the sensor, i'll deal with when more parts arrive)
it's transmitting the temp fine, but randomly it transmits a -127. and this is missing with graphana and my nice charts.
in node red when i take the mqtt message and before i send it to the database is there a way to compare the last number with the new number and if it's greater then 10% don't pass it.
or if input = "-127" do not transmit it?
[
{
"id": "6430e60673a0017d",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "812badc5d14cbe03",
"type": "mqtt in",
"z": "6430e60673a0017d",
"name": "",
"topic": "OUT",
"qos": "0",
"datatype": "json",
"broker": "a04cd6a0.80a1d8",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 510,
"y": 240,
"wires": [
[
"6e49b7a471bd51ba",
"e8130ce8519450cf",
"64101053f9ccb449"
]
]
},
{
"id": "6e49b7a471bd51ba",
"type": "debug",
"z": "6430e60673a0017d",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 730,
"y": 200,
"wires": []
},
{
"id": "e8130ce8519450cf",
"type": "influxdb out",
"z": "6430e60673a0017d",
"influxdb": "47ad9374b37cea08",
"name": "OutSide",
"measurement": "Outside",
"precision": "",
"retentionPolicy": "",
"database": "database",
"precisionV18FluxV20": "ms",
"retentionPolicyV18Flux": "",
"org": "organisation",
"bucket": "bucket",
"x": 720,
"y": 240,
"wires": []
},
{
"id": "64101053f9ccb449",
"type": "ui_gauge",
"z": "6430e60673a0017d",
"name": "",
"group": "732cf2d4.e7e11c",
"order": 1,
"width": 4,
"height": 4,
"gtype": "gage",
"title": "Out Side Temp",
"label": "C",
"format": "{{value}}",
"min": "-10",
"max": "50",
"colors": [
"#0065ff",
"#00ff0c",
"#ff0000"
],
"seg1": "17",
"seg2": "23",
"className": "",
"x": 740,
"y": 280,
"wires": []
},
{
"id": "a04cd6a0.80a1d8",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.1.15",
"port": "1883",
"clientid": "Server",
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
},
{
"id": "47ad9374b37cea08",
"type": "influxdb",
"hostname": "127.0.0.1",
"port": "8086",
"protocol": "http",
"database": "sensors",
"name": "Sensors",
"usetls": false,
"tls": "",
"influxdbVersion": "1.x",
"url": "http://localhost:8086",
"rejectUnauthorized": true
},
{
"id": "732cf2d4.e7e11c",
"type": "ui_group",
"name": "Home",
"tab": "bcc983c6.f12668",
"order": 1,
"disp": true,
"width": "8",
"collapse": true
},
{
"id": "bcc983c6.f12668",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]