Transferring temperature readings from Tasmota to IHost Sonoff

I need to transfer the temperature value from ESP 32 Tasmota to IHost Sonoff.

For this I use Palette node-red-contrib-tasmota -nodeSensor.

At its output I get

25.03.2025, 09:56:16node: debug 10
msg.payload : Object
object
Time: "2025-03-25T08:56:15"
Switch1: "ON"
BMP180: object
Temperature: 23
Pressure: 977.1
INA219: object
Id: 40
Voltage: 1
Current: 0.001
Power: 0
PressureUnit: "hPa"
TempUnit: "C"

Further Function Node Temp On Message

let sensorData = msg.payload;
msg.payload = {
  deviceid: "60681044-bc85-45f2-a7d9-284c03d27b8c",
  params: {
    temperature: sensorData.BMP180 ? sensorData.BMP180.Temperature : null
  }
};

return msg;

On the way out

25.03.2025, 09:56:16node: debug 14
msg.payload : Object
object
deviceid: "60681044-bc85-45f2-a7d9-284c03d27b8c"
params: object
temperature: 23

Temp output connected to Palette EweLink Cube put-device-state.Output

25.03.2025, 09:56:16node: debug 17
msg.payload : Object
object
header: object
name: "ErrorResponse"
message_id: "7558dc77-cf4a-4459-b9d4-b81087025489"
version: "2"
payload: object
type: "INVALID_PARAMETERS"
description: "endpoint error!"

What's wrong?

Welcome to the forum :grinning:

Unfortunately I have no knowledge about IHost Sonoff, or the EweLink Cube nodes

A quick look seems to suggest that both are intended as an alternative to something like a raspberry Pi. Which device is running NODE RED ?

I couldn't find any documentation quickly that would help with your problem, but it seems evident that the put-device-state node is not happy with the payload you sent it., rather than a node red issue as such.

SONOFF iHost Smart Home Hub.eWeLink CUBE Open API V2 - eWeLink

@nroman60,

Sorry I don't have the time to digest all of that. I couldn't find any information about the nodes, which seem to be "under development".

Hopefully someone here is familiar with this kit.

As commented it looks like the temperature path parameters are not correct. I don´t use this Tasmota node so can´t be 100% sure, but using the standard MQTT node it doesn´t look so different (looking at your debug10) as in my case the function node would be

msg.payload = {
"temperature": {
"temperature": msg.payload.BME280.Temperature
}
}
return msg;

In this case it is a BME sensor, which I have in this flow, sending the value to an iHost virtual temperature sensor.

Flow

[
{
"id": "a71ab4ec0d6e9ded",
"type": "put-device-state",
"z": "bb5ad6bb5b4a6bde",
"name": "Virtual Temp Sensor iHost",
"server": "7645b9a88fbe034c",
"category": "temperatureSensor",
"device": "f116863a-959e-4e21-9b8a-a638a9b8e33d",
"state": "",
"number": "c9cd1a4e-fa9b-11ef-9cd2-0242ac120002",
"x": 950,
"y": 440,
"wires": [

]
},
{
"id": "3d624ea5fdd2377e",
"type": "function",
"z": "bb5ad6bb5b4a6bde",
"name": "function 10",
"func": "msg.payload = {\n "temperature": {\n "temperature": msg.payload.BME280.Temperature\n }\n}\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": ,
"x": 690,
"y": 440,
"wires": [
[
"a71ab4ec0d6e9ded"
]
]
},
{
"id": "1f9d2b1eb1ac73c8",
"type": "mqtt in",
"z": "bb5ad6bb5b4a6bde",
"name": "",
"topic": "tele/tasmota_352503/SENSOR",
"qos": "2",
"datatype": "auto-detect",
"broker": "3bcf20bbba8064e7",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 440,
"wires": [
[
"3d624ea5fdd2377e",
"d570b6cb4ecc55ac"
]
]
},
{
"id": "d570b6cb4ecc55ac",
"type": "debug",
"z": "bb5ad6bb5b4a6bde",
"name": "Temperature",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload.BME280.Temperature",
"targetType": "msg",
"statusVal": "payload.BME280.Temperature",
"statusType": "auto",
"x": 530,
"y": 520,
"wires":
},
{
"id": "7645b9a88fbe034c",
"type": "api-server",
"name": "Token",
"ip": "192.168.0.85:80",
"ipaddr": "",
"token": "70320e15-887e-4d48-ad3e-3d12061c6925"
},
{
"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": ""
}
]

Thanks. It seems to be working.