Open jalucardo opened 3 months ago
you can use node switch do send mesages based on your msg.upsert command...
like this
[ { "id": "252e99d0ac56f186", "type": "switch", "z": "5dedb1d3ce0d5e38", "name": "", "property": "payload.evento", "propertyType": "msg", "rules": [ { "t": "eq", "v": "entrada", "vt": "str" }, { "t": "eq", "v": "saida", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 310, "y": 560, "wires": [ [ "b2c6669a2ce3bf74" ], [ "a47b1b00cde259c6" ] ] } ]
link the examples/
Need solution about this, i need a comand to say to whatsapp,But I don't want messages in a row, I want to give him orders and have him respond to me, I haven't found my fault yet. // Obtener datos globales var amperaje = global.get("/amperaje"); var capacidad = global.get("/capacidad"); var psuccion = global.get("/psuccion"); var pdescarga = global.get("/pdescarga"); var paceite = global.get("/paceite"); var pdesfiltro = global.get("/pdesfiltro"); var tsuccion = global.get("/tsuccion"); var tdescarga = global.get("/tdescarga"); var taceite = global.get("/taceite"); if(msg.messsage=="status"){ msg.payload = "Estos son los datos:\n"; msg.payload += "- Amperaje: " + amperaje + " A\n"; msg.payload += "- Capacidad: " + capacidad + "%\n"; msg.payload += "- Presión de succión: " + psuccion + " PSI\n"; msg.payload += "- Presión de descarga: " + pdescarga + " PSI\n"; msg.payload += "- Presión de aceite: " + paceite + " PSI\n"; msg.payload += "- Presión de filtro: " + pdesfiltro + " PSI\n"; msg.payload += "- Temperatura de succión: " + tsuccion + " °C\n"; msg.payload += "- Temperatura de descarga: " + tdescarga + " °C\n"; msg.payload += "- Temperatura de aceite: " + taceite +" °C"; } return msg;