Hakan
I don't know how well you know Node-Red, but with the iotopen-nodes you could do something simple as
"lynx-in-node -> change-node -> lynx-out-node".
Lynx-in needs to read the topic from your Smart switch, Change-node to modify the payload so it can be send through MQTT->LoRaManager/Chirpstack. Lynx-out needs to write to the topic for payload downlink on the UC-300.
Import the example below in Node-Red and do the setup on Lynx-in and Lynx-out, modify the change node payload JSON, "value" is the LoRa port and "msg" is the base64 encoded string you want to send.
Flow
[
{
"id": "dfa278caba6fd942",
"type": "change",
"z": "f91a2b68bb3ed9c7",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"value\":85,\"msg\":\"hello\"}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 460,
"y": 220,
"wires": [
[
"4a2b14f22786ef53",
"7110e25ea4dfd287"
]
]
},
{
"id": "4a2b14f22786ef53",
"type": "debug",
"z": "f91a2b68bb3ed9c7",
"name": "Debug output",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 700,
"y": 140,
"wires": []
},
{
"id": "a3489489ef05f317",
"type": "lynx-in",
"z": "f91a2b68bb3ed9c7",
"server": "",
"use_meta_filter": false,
"installation_id": 0,
"function_id": 0,
"function_name": "",
"filter": [],
"topic": "",
"client_id": 0,
"x": 270,
"y": 220,
"wires": [
[
"dfa278caba6fd942"
]
]
},
{
"id": "7110e25ea4dfd287",
"type": "lynx-out",
"z": "f91a2b68bb3ed9c7",
"server": "",
"installation_id": 0,
"function_id": 0,
"function_name": "",
"topic": "",
"client_id": 0,
"x": 680,
"y": 220,
"wires": []
}
]