From 87522ab29575c142a5428d81a505a19dbcd2548c Mon Sep 17 00:00:00 2001 From: madejackson Date: Thu, 18 Jul 2024 22:02:34 +0200 Subject: [PATCH] test --- servapps/mbusd/cosmos-compose.json | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/servapps/mbusd/cosmos-compose.json b/servapps/mbusd/cosmos-compose.json index 47760327..1a48d5bb 100644 --- a/servapps/mbusd/cosmos-compose.json +++ b/servapps/mbusd/cosmos-compose.json @@ -1,7 +1,19 @@ { "cosmos-installer": { - "form": [ - { + "form": [ + { + "name": "serialPort", + "label": "serial Port", + "initialValue": "/dev/ttyACM2", + "type": "select", + "options": [ + ["/dev/ttyACM0", "/dev/ttyACM0 -> Serialport 0 -> Coprocessor"], + ["/dev/ttyACM1", "/dev/ttyACM1 -> Serialport 1 -> KNX, RS485 or RS232"], + ["/dev/ttyACM2", "/dev/ttyACM2 -> Serialport 2 -> RS485 or RS232"], + ["/dev/ttyACM3", "/dev/ttyACM3 -> Serialport 3 -> RS485 or RS232"] + ] + }, + { "name": "baudrate", "label": "Baudrate", "initialValue": "9600", @@ -35,8 +47,15 @@ ["8N1", "8N1: 8 Datenbits, keine Parität, 1 Stoppbit"], ["8E1", "8E1: 8 Datenbits, gerade Parität, 1 Stoppbit"], ["8O1", "8O1: 8 Datenbits, ungerade Parität, 1 Stoppbit"], - ["8N2", "8N2: 8 Datenbits, eine Parität, 2 Stoppbit"] - ] + ["8N2", "8N2: 8 Datenbits, keine Parität, 2 Stoppbit"] + ], + "form.serialPort.label": "serieller Anschluss", + "form.serialPort.options": [ + ["/dev/ttyACM0", "/dev/ttyACM0 -> Serieller Anschluss 0 -> Koprocessor"], + ["/dev/ttyACM1", "/dev/ttyACM1 -> Serieller Anschluss 1 -> KNX, RS485 oder RS232"], + ["/dev/ttyACM2", "/dev/ttyACM2 -> Serieller Anschluss 2 -> RS485 oder RS232"], + ["/dev/ttyACM3", "/dev/ttyACM3 -> Serieller Anschluss 3 -> RS485 oder RS232"] + ] } } }, @@ -58,7 +77,7 @@ }, "entrypoint": "/usr/bin/mbusd -S -d -L - -p /dev/ttyS0 -s {Context.baudrate} -m {Context.mode}", "devices": [ - "/dev/ttyACM0:/dev/ttyS0:rwm" + "{Context.serialPort}:/dev/ttyS0:rwm" ], "volumes": [ {