Hi !
First sorry for my bad english
I'm trying to make a node-red function to send two msg.
One of these message contain a variable.
The messages must be like this:
- msg1: NEXTION,conschauf.txt="19"
- msg2: NEXTION,p1.pic=8
The value "19" of msg1 is stored in node-red by an other node ( flow.set('consigneconfort', msg.payload.result[0].SetPoint); )
I have write this function:
msg.topic = "ECRAN-ENTREE/cmd";
if (flow.get('modeconfort') === "On") {
var consigne = flow.get('consigneconfort');
var msg1 = { payload: 'NEXTION,conschauf.txt="consigne"'};
var msg2 = { payload: 'NEXTION,p1.pic=8' };
}
return [msg1, msg2];
but the result is:
- an "Invalid topic specified" error
- the first message is like this: "NEXTION,conschauf.txt="consigne""
Someone can help me to find the problem, please ?
Regards,