aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-08-15 10:55:23 +0200
committercbdev <cb@cbcdn.com>2019-08-15 10:55:23 +0200
commitc2bf894835d01c648e3f64826e69944a2a27373f (patch)
tree64796d6bf317ac128d27a1c830a949c8c199317f /backends
parent047c76b48d4dd72b68ffaf99a210f9a3d5460f71 (diff)
downloadmidimonster-c2bf894835d01c648e3f64826e69944a2a27373f.tar.gz
midimonster-c2bf894835d01c648e3f64826e69944a2a27373f.tar.bz2
midimonster-c2bf894835d01c648e3f64826e69944a2a27373f.zip
Fix CI, add dot2 detection to maweb
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