Tasmota-Node Red-Ihost

How to transfer sensor readings (temperature, pressure, current, voltage, power) from Tasmota (ESP32, BPM180 via MQTT Broker NODE RED to IHost?


, INA219)

Without looking at your sensors , this is a BME tasmota sensor which gives Temperature, Dewpoint, Humidity to an iHost virtual sensor, and Atmospheric Pressure to a variable (with limiter on variation and update) .

Flow

[
{
“id”: “cc2b22392691edc1”,
“type”: “mqtt in”,
“z”: “37624d6d65db6299”,
“name”: “”,
“topic”: “tele/tasmota_352503/SENSOR”,
“qos”: “2”,
“datatype”: “auto-detect”,
“broker”: “3bcf20bbba8064e7”,
“nl”: false,
“rap”: true,
“rh”: 0,
“inputs”: 0,
“x”: 235,
“y”: 5580,
“wires”: [
[
“81f4cf9dbab012e3”,
“8ecd9e4c56598d7e”,
“95ca83f4fee2c707”,
“93ccc4b40588d85c”,
“aec029d6e992a7c1”
]
]
},
{
“id”: “81f4cf9dbab012e3”,
“type”: “function”,
“z”: “37624d6d65db6299”,
“name”: “1-BME”,
“func”: “// Get the current humidity reading from the BME sensor\nlet pressure = msg.payload.BME280.Pressure\nmsg.payload = parseFloat(pressure.toFixed(0))// or 1 decimal place\nflow.set(‘bme’, msg.payload);\nreturn msg;”,
“outputs”: 1,
“timeout”: 0,
“noerr”: 0,
“initialize”: “”,
“finalize”: “”,
“libs”: ,
“x”: 310,
“y”: 5720,
“wires”: [
[
“c8fe9858d1545d15”
]
]
},
{
“id”: “c8fe9858d1545d15”,
“type”: “rbe”,
“z”: “37624d6d65db6299”,
“name”: “<> 0.1”,
“func”: “rbe”,
“gap”: “0.2”,
“start”: “”,
“inout”: “in”,
“septopics”: false,
“property”: “payload”,
“topi”: “topic”,
“x”: 450,
“y”: 5720,
“wires”: [
[
“846cbb4c213af462”
]
]
},
{
“id”: “846cbb4c213af462”,
“type”: “delay”,
“z”: “37624d6d65db6299”,
“name”: “”,
“pauseType”: “rate”,
“timeout”: “5”,
“timeoutUnits”: “seconds”,
“rate”: “1”,
“nbRateUnits”: “1”,
“rateUnits”: “minute”,
“randomFirst”: “1”,
“randomLast”: “5”,
“randomUnits”: “seconds”,
“drop”: true,
“allowrate”: true,
“outputs”: 1,
“x”: 610,
“y”: 5720,
“wires”: [
[
“93ecf8791578c293”
]
]
},
{
“id”: “93ecf8791578c293”,
“type”: “debug”,
“z”: “37624d6d65db6299”,
“name”: “Barometer”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: true,
“complete”: “payload”,
“targetType”: “msg”,
“statusVal”: “payload”,
“statusType”: “auto”,
“x”: 790,
“y”: 5720,
“wires”:
},
{
“id”: “8ecd9e4c56598d7e”,
“type”: “debug”,
“z”: “37624d6d65db6299”,
“name”: “Temperature”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: true,
“complete”: “payload.BME280.Temperature”,
“targetType”: “msg”,
“statusVal”: “payload.BME280.Temperature”,
“statusType”: “auto”,
“x”: 790,
“y”: 5580,
“wires”:
},
{
“id”: “95ca83f4fee2c707”,
“type”: “debug”,
“z”: “37624d6d65db6299”,
“name”: “Humidity”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: true,
“complete”: “payload.BME280.Humidity”,
“targetType”: “msg”,
“statusVal”: “payload.BME280.Humidity”,
“statusType”: “auto”,
“x”: 780,
“y”: 5480,
“wires”:
},
{
“id”: “93ccc4b40588d85c”,
“type”: “debug”,
“z”: “37624d6d65db6299”,
“name”: “Dewpoint”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: true,
“complete”: “payload.BME280.DewPoint”,
“targetType”: “msg”,
“statusVal”: “payload”,
“statusType”: “auto”,
“x”: 780,
“y”: 5640,
“wires”:
},
{
“id”: “61b597a8e47fe5d7”,
“type”: “put-device-state”,
“z”: “37624d6d65db6299”,
“name”: “Set Outside Humidity”,
“server”: “7645b9a88fbe034c”,
“category”: “temperatureAndHumiditySensor”,
“device”: “eec5988f-3d49-404c-9a7d-ee0b2a5683f3”,
“state”: “”,
“number”: “5fb4dda9-e7dd-4887-9919-b0a60d48ae52”,
“x”: 820,
“y”: 5440,
“wires”: [

]
},
{
“id”: “aec029d6e992a7c1”,
“type”: “change”,
“z”: “37624d6d65db6299”,
“name”: “Humidity”,
“rules”: [
{
“t”: “set”,
“p”: “payload”,
“pt”: “msg”,
“to”: “{\t "humidity": {\t "humidity": msg.payload.BME280.Humidity\t }\t}”,
“tot”: “jsonata”
}
],
“action”: “”,
“property”: “”,
“from”: “”,
“to”: “”,
“reg”: false,
“x”: 520,
“y”: 5440,
“wires”: [
[
“61b597a8e47fe5d7”
]
]
},
{
“id”: “3bcf20bbba8064e7”,
“type”: “mqtt-broker”,
“name”: “Mosquitto mqtt 8883”,
“broker”: “192.168.0.85”,
“port”: “8883”,
“clientid”: “”,
“autoConnect”: true,
“usetls”: false,
“protocolVersion”: “4”,
“keepalive”: “60”,
“cleansession”: true,
“autoUnsubscribe”: true,
“birthTopic”: “”,
“birthQos”: “0”,
“birthRetain”: “false”,
“birthPayload”: “”,
“birthMsg”: {},
“closeTopic”: “”,
“closeQos”: “0”,
“closeRetain”: “false”,
“closePayload”: “”,
“closeMsg”: {},
“willTopic”: “”,
“willQos”: “0”,
“willRetain”: “false”,
“willPayload”: “”,
“willMsg”: {},
“userProps”: “”,
“sessionExpiry”: “”
},
{
“id”: “7645b9a88fbe034c”,
“type”: “api-server”,
“name”: “Token”,
“ip”: “192.168.0.85:80”,
“ipaddr”: “”,
“token”: “70320e15-887e-4d48-ad3e-3d12061c6925”
}
]

Hope that helps.

1 Like

Thank you. I hope so.