Hi, at the moment I’m trying to publish a payload as a downlink to my Dragino LT-22222-l.
As mentioned I’m using an Dragino LT-22222-l as a relais for a water pump.
The problem I’m having at the moment is that I’m a little bit confused by the process of publishing downlinks via Node-Red through MQTT.
I made a flow as mentioned in the TTS documentary and its working “fine” as far as I can publish something to the Dragino.
But I’m having some trouble sending the payload I want. In the Manual from the relais they say I can change the status from the relais by sending “03 01 01”. This message is working if I’m publishing it via the messaging tab on the “TTN end device” tab.
This is my Node red Flow:
[
{
"id": "858e654ae4aa234b",
"type": "tab",
"label": "Test Flow",
"disabled": false,
"info": "",
"env": []
},
{
"id": "28c608ba60d7370c",
"type": "inject",
"z": "858e654ae4aa234b",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "[48,120,48,51,48,49,48,49]",
"payloadType": "bin",
"x": 390,
"y": 340,
"wires": [
[
"4cbc50294e15182b"
]
]
},
{
"id": "38efb5acf61103d1",
"type": "mqtt out",
"z": "858e654ae4aa234b",
"name": "Relai downlink",
"topic": "v3/{application id}@{tenant id}/devices/{device id}/down/push",
"qos": "1",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "f2478b293863041b",
"x": 860,
"y": 340,
"wires": []
},
{
"id": "60dfb9b9d462d7cf",
"type": "debug",
"z": "858e654ae4aa234b",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 850,
"y": 300,
"wires": []
},
{
"id": "4cbc50294e15182b",
"type": "function",
"z": "858e654ae4aa234b",
"name": "",
"func": "return {\n \"payload\": {\n \"downlinks\": [{\n \"f_port\": 15,\n \"frm_payload\": msg.payload.toString(\"base64\"),\n \"priority\": \"NORMAL\"\n }]\n }\n}",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 340,
"wires": [
[
"60dfb9b9d462d7cf",
"38efb5acf61103d1"
]
]
},
{
"id": "f2478b293863041b",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.1.73",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": "",
"credentials": {}
}
]
This flow is taking the payload (I assume in hexadecimal) and is converting it to (Base64) before publishing it in the right format to TTN.
But I don’t know which format I need to input the “030101” ( to activate the relais.
Is there anyone who can help me a little bit?
Im sorry if there are missing some information but I’m not sure which informations you exactly need.
Thank you very much in advance!