aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/maweb.c7
-rw-r--r--backends/maweb.md81
2 files changed, 20 insertions, 68 deletions
diff --git a/backends/maweb.c b/backends/maweb.c
index b708015..07fce12 100644
--- a/backends/maweb.c
+++ b/backends/maweb.c
@@ -303,6 +303,12 @@ static int maweb_handle_message(instance* inst, char* payload, size_t payload_le
if(json_obj(payload, "status") && json_obj(payload, "appType")){
fprintf(stderr, "maweb connection established\n");
+ field = json_obj_str(payload, "appType", NULL);
+ if(!strncmp(field, "dot2", 4)){
+ fprintf(stderr, "maweb peer detected as dot2, forcing user name 'remote'\n");
+ free(data->user);
+ data->user = strdup("remote");
+ }
maweb_send_frame(inst, ws_text, (uint8_t*) "{\"session\":0}", 13);
}
@@ -535,6 +541,7 @@ static int maweb_set(instance* inst, size_t num, channel** c, channel_value* v){
if(num && !data->login){
fprintf(stderr, "maweb instance %s can not send output, not logged in\n", inst->name);
+ return 0;
}
for(n = 0; n < num; n++){
diff --git a/backends/maweb.md b/backends/maweb.md
index b54f1c3..dd13db9 100644
--- a/backends/maweb.md
+++ b/backends/maweb.md
@@ -15,10 +15,10 @@ The `maweb` backend does not take any global configuration.
#### Instance configuration
-| Option | Example value | Default value | Description |
+| Option | Example value | Default value | Description |
|---------------|-----------------------|-----------------------|---------------------------------------------------------------|
-| `host` | `10.23.42.21 80` | none | Host address (and optional port) of the MA Web Remote |
-| `user` | `midimonster` | none | User for the remote session |
+| `host` | `10.23.42.21 80` | none | Host address (and optional port) of the MA Web Remote |
+| `user` | `midimonster` | none | User for the remote session (GrandMA2) |
| `password` | `midimonster` | `midimonster` | Password for the remote session |
#### Channel specification
@@ -58,71 +58,16 @@ mw1.<button-name>
The following button names are recognized by the backend:
-* `SET`
-* `PREV`
-* `NEXT`
-* `CLEAR`
-* `FIXTURE_CHANNEL`
-* `FIXTURE_GROUP_PRESET`
-* `EXEC_CUE`
-* `STORE_UPDATE`
-* `OOPS`
-* `ESC`
-* `0`
-* `1`
-* `2`
-* `3`
-* `4`
-* `5`
-* `6`
-* `7`
-* `8`
-* `9`
-* `PUNKT`
-* `PLUS`
-* `MINUS`
-* `THRU`
-* `IF`
-* `AT`
-* `FULL`
-* `HIGH`
-* `ENTER`
-* `OFF`
-* `ON`
-* `ASSIGN`
-* `LABEL`
-* `COPY`
-* `TIME`
-* `PAGE`
-* `MACRO`
-* `DELETE`
-* `GOTO`
-* `GO_PLUS`
-* `GO_MINUS`
-* `PAUSE`
-* `SELECT`
-* `FIXTURE`
-* `SEQU`
-* `CUE`
-* `PRESET`
-* `EDIT`
-* `UPDATE`
-* `EXEC`
-* `STORE`
-* `GROUP`
-* `PROG_ONLY`
-* `SPECIAL_DIALOGUE`
-* `SOLO`
-* `ODD`
-* `EVEN`
-* `WINGS`
-* `RESET`
-* `MA`
-* `layerMode`
-* `featureSort`
-* `fixtureSort`
-* `channelSort`
-* `hideName`
+| `SET` | `PREV` | `NEXT` | `CLEAR` | `FIXTURE_CHANNEL` | `FIXTURE_GROUP_PRESET` | `EXEC_CUE` |
+| `STORE_UPDATE`| `OOPS` | `ESC` | `OFF` | `ON` | `MA` | `STORE` |
+| `0` | `1` | `2` | `3` | `4` | `5` | `6` |
+| `7` | `8` | `9` | `PUNKT` | `PLUS` | `MINUS` | `THRU` |
+| `IF` | `AT` | `FULL` | `HIGH` | `ENTER` | `ASSIGN` | `LABEL` |
+| `COPY` | `TIME` | `PAGE` | `MACRO` | `DELETE` | `GOTO` | `GO_PLUS` |
+| `GO_MINUS` | `PAUSE` | `SELECT` | `FIXTURE` | `SEQU` | `CUE` | `PRESET` |
+| `EDIT` | `UPDATE` | `EXEC` | `GROUP` | `PROG_ONLY` | `SPECIAL_DIALOGUE` | `SOLO` |
+| `ODD` | `EVEN` | `WINGS` | `RESET` | `layerMode` | `featureSort` | `fixtureSort` |
+| `channelSort` | `hideName` | | | | | |
Note that each Web Remote connection has it's own command line, as such commands entered using this backend will not affect
the command line on the main console. To do that, you will need to use another backend to feed input to the MA, such as