Closed wvanmaris closed 1 year ago
Which version of Companion, which version of the LW3 module, which operating system, which firmware version of the matrix?
Good questions, sorry. V2.4.0. Have to see later which exact, but updated my custom pi few weeks ago. Matrix latest version / fw. Walter van MarisMobiel verstuurdOp 22 dec. 2022 om 16:55 heeft dnmeid @.***> het volgende geschreven: Which version of Companion, which version of the LW3 module, which operating system, which firmware version of the matrix?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Please try again with the latest beta v3.0.0+... of Companion. Actually there should not be an issue with MX2 devices but there also have been changes since v2.4.0
Hi Dorian,
while I do get to see the input names, the connection blinks every few seconds, loosing the input names. Presets are also all blank (undefined).
As far as I can see nothing to be set on the Lightware's side. I can disable LW2 protocol in ethernetsettings. And I can enable LW3 in RS232 settings, but both make no difference.
------ Oorspronkelijke bericht ------ Van "Dorian Meid" @.> Aan "bitfocus/companion-module-lightware-lw3" @.> CC "wvanmaris" @.>; "Author" @.> Datum 17-3-2023 16:08:33 Onderwerp Re: [bitfocus/companion-module-lightware-lw3] MX2-8X8-HDMI20 doesnt work (Issue #6)
Please try again with the latest beta v3.0.0+... of Companion. Actually there should not be an issue with MX2 devices but there also have been changes since v2.4.0
— Reply to this email directly, view it on GitHub https://github.com/bitfocus/companion-module-lightware-lw3/issues/6#issuecomment-1473987095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHQ63BBVYYQQZQRCVWJP7DW4R47DANCNFSM6AAAAAATFO5IKA. You are receiving this because you authored the thread.Message ID: @.***>
@dnmeid GET /MEDIA/PRESET/*.Name
does not seem to get any results and ends up in errors processing. Could not find the command in documentation. Working to get everything refactored for v3. Was this a special command for one device?
Getting names in Companion v3 now, able to switch sources. Working on feedback and variable
The module now has been updated for v3 and has a few improvements. Can you please retry and report here if there are still some problems with MX2.
I am having similar issues with getting an MX2-48x48-HDMI20-A-R to connect using companion v3. Looking at the companion debug, there is a very long error being recorded every time it attempts to connect. It was originally working- albeit without input/output names- on Companion v2.4.2 and LW3 v1.0.3
I'd be happy to debug this module for MX2, but it is nearly impossible without connection to a real device. If someone wants to provide a remote connection, feel free to tell me.
After making the javascript readable, I found the error occurring on line 614. The error is basically that "e is null" and therefore not iterable. I commented out that section of code and was able to get it working. I have almost zero experience with javascript so I dont really know what negative effects will result from it being removed. I'll just post the section of code that I removed and someone much smarter than me can hopefully create an actual solution:
this.sendCommand('GET /MEDIA/PRESET/*.Name', e => { let t = e.split(/\r\n/) ;(this.CHOICES_PRESETS = t .filter( e => void 0 !== e.match(/\/MEDIA\/PRESET\/(.+?).Name=(.+)$/) ) .map(e => { let [t, n, s] = e.match( /\/MEDIA\/PRESET\/(.+?).Name=(.+)$/ ) return { id: n, label: s } })), this.initActions() }),
Perhaps if a user doesn't have any presets saved in the MX2 then the code breaks. Maybe the solution is a simple error exception that can handle this.
@johnny4x4 I've had the same problem when in quick need of the module. I've converted it to v3 and stripped some stuff. That made the module work but not usable on other models. @dnmeid fixed this, but it seems its broken again for this model. We might be able to do a simple check in the middle, but my guess is there is more broken. I'll see if I can filter this error
@johnny4x4 just to be sure;
this.sendCommand('GET /MEDIA/PRESET/*.Name', e => {
is in the current version;
this.sendCommand('GET /MEDIA/PRESET/*.Name', (result) => {
notice the result. Are you using the latest version?
the 'e' instead of 'result' is from the webpack module minification. Don't worry about it.
Strange thing is that this code actually should not be a problem for MX2.
It reads the available presets from the matrix. MX2 is compatible to the LW3 protocol and this is a valid LW3 get command. Even if the MX2 wouldn't support presets, which it does, it should not respond with null
but with an error message. The response to any LW3 command should always be a string with either some useful information or an error message.
In the following lines I parse the response for the preset names. If there are no valid preset names or I got an error, it simply does not add the names to the preset choices and skips to the next function.
So I made an update which handles an invalid response here, but actually I'd like to make an update which also can handle presets for the MX2. Please check with the attached packaged module if it works. I made it fail more gracefully at this code and also added some more log messages, so please check the log. Please report back if you have a result.
Thanks @dnmeid I saw the same thing with the same matrix. In a week or to i might be able to put a matrix on the net, but i cannot promise yet
I checked again the documentation for the MX2 and as you say there is no command GET /MEDIA/PRESET/*.Name in MX2. The module should not have crashed by that actually. I made another version, which first checkes GET /PRESETS/AVC/*.Name and only checks /MEDIA/PRESET/.Name if that fails. This is the same command as for the general type of LW3 and it is documented in the MX2 manual. Maybe you have more luck with this command. I don't know where /MEDIA/PRESET/\.Name came from but it is there since preset recalling had been introduced and I guess it is there for a reason and there is some Lightware matrix which uses that path. I again attach a package (same name and version, so please tell me carefully which package you are refering to)
Thank you! Let me fire up the system and I will see what happens when I plug in your update.
@johnny4x4 You know how to deal with pkg.tgz?
I was able to extract it, I assume all I have to do is drop into the /bundled-modules/lightware-lw3/ folder.
Depending on your installation yes. Actually better way is to put it in the module-local-dev folder if you have a development environment. If you are running a binary, you have to designate a local folder to be the development modules folder and put it there. In both cases the development module will override the bundled module without touching it. You can see the override in the log.
Both updates are giving me a similar Error:
C:\Program Files\Companion\resources\bundled-modules\lightware-lw3\main.js:619 let [t, n, s] = e.match( ^
TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
at C:\Program Files\Companion\resources\bundled-modules\lightware-lw3\main.js:619:39
at Array.map (
Looks like that one did the trick, nice work! Here is the debug info it produced:
info: Response to 'GET /PRESETS/AVC/.Name' didn't have any presets. Response was:nE /PRESETS/AVC/ %E002: Not exists Now trying with /MEDIA/PRESET/.Name info: Response to 'GET /MEDIA/PRESET/.Name' didn't have any presets. Response was:pE /MEDIA/PRESET/*.Name %E002: Not exists
ok, so it doesn't crash but it can't read the presets either. Can you please run the lightware LDC and switch to advanced mode. Then you have a log of the communication with the device. If you now switch to the presets tab in the regular window it reads the presets from the device and you will see this in the log. Can you tell me what is written there?
Lets see if I did this correctly, is this what you are looking for?:
6B86#OPEN /MEDIA/PRESET
{6B85
n- /MEDIA/PRESET/Horizontal
}
6B87#GET /MEDIA/PRESET
{6B86
o- /MEDIA/PRESET
}
6B88#GET /MEDIA/PRESET.*
{6B87
n- /MEDIA/PRESET/Horizontal
}
Yes that looks good. So for the GET /MEDIA/PRESET/.*
is there more results than -n /MEDIA/PRESET/Horizontal
?
All the lines starting with -n are the available presets.
Later there shoud be a command like GET /MEDIA/PRESET/Horizontal.*
and some responses starting with 'pw'. Can you please give me them too.
And of course I assume that you have a preset called 'Horizontal'?
Yes, I believe there is a Preset called "horizontal". I've never used the built in presets though because I have been using companion for presets. There are no other presets listed in the device. Here is the rest of the response:
{6B88
pw /MEDIA/PRESET.Button1AssignedPreset=
pw /MEDIA/PRESET.Button2AssignedPreset=
pw /MEDIA/PRESET.Button3AssignedPreset=
pw /MEDIA/PRESET.Button4AssignedPreset=
pw /MEDIA/PRESET.Button5AssignedPreset=
pw /MEDIA/PRESET.Button6AssignedPreset=
pw /MEDIA/PRESET.Button7AssignedPreset=
pw /MEDIA/PRESET.Button8AssignedPreset=
pw /MEDIA/PRESET.Button9AssignedPreset=
pw /MEDIA/PRESET.Button10AssignedPreset=
pw /MEDIA/PRESET.Button11AssignedPreset=
pw /MEDIA/PRESET.Button12AssignedPreset=
pw /MEDIA/PRESET.Button13AssignedPreset=
pw /MEDIA/PRESET.Button14AssignedPreset=
pw /MEDIA/PRESET.Button15AssignedPreset=
pw /MEDIA/PRESET.Button16AssignedPreset=
pw /MEDIA/PRESET.Button17AssignedPreset=
pw /MEDIA/PRESET.Button18AssignedPreset=
pw /MEDIA/PRESET.Button19AssignedPreset=
pw /MEDIA/PRESET.Button20AssignedPreset=
pw /MEDIA/PRESET.Button21AssignedPreset=
pw /MEDIA/PRESET.Button22AssignedPreset=
pw /MEDIA/PRESET.Button23AssignedPreset=
pw /MEDIA/PRESET.Button24AssignedPreset=
pw /MEDIA/PRESET.Button25AssignedPreset=
pw /MEDIA/PRESET.Button26AssignedPreset=
pw /MEDIA/PRESET.Button27AssignedPreset=
pw /MEDIA/PRESET.Button28AssignedPreset=
pw /MEDIA/PRESET.Button29AssignedPreset=
pw /MEDIA/PRESET.Button30AssignedPreset=
pw /MEDIA/PRESET.Button31AssignedPreset=
pw /MEDIA/PRESET.Button32AssignedPreset=
pw /MEDIA/PRESET.Button33AssignedPreset=
pw /MEDIA/PRESET.Button34AssignedPreset=
pw /MEDIA/PRESET.Button35AssignedPreset=
pw /MEDIA/PRESET.Button36AssignedPreset=
pw /MEDIA/PRESET.Button37AssignedPreset=
pw /MEDIA/PRESET.Button38AssignedPreset=
pw /MEDIA/PRESET.Button39AssignedPreset=
pw /MEDIA/PRESET.Button40AssignedPreset=
pw /MEDIA/PRESET.Button41AssignedPreset=
pw /MEDIA/PRESET.Button42AssignedPreset=
pw /MEDIA/PRESET.Button43AssignedPreset=
pw /MEDIA/PRESET.Button44AssignedPreset=
pw /MEDIA/PRESET.Button45AssignedPreset=
pw /MEDIA/PRESET.Button46AssignedPreset=
pw /MEDIA/PRESET.Button47AssignedPreset=
pw /MEDIA/PRESET.Button48AssignedPreset=
m- /MEDIA/PRESET:createButtonAssignedPreset
m- /MEDIA/PRESET:rename
m- /MEDIA/PRESET:create
m- /MEDIA/PRESET:delete
m- /MEDIA/PRESET:copy
}
6B89#CLOSE /MEDIA/PRESET
6B8A#GET /MEDIA/PRESET/Horizontal.*
{6B89
c- /MEDIA/PRESET
}
And was there something else for the GET /MEDIA/PRESET/.*
besides -n /MEDIA/PRESET/Horizontal
?
I you have Anydesk (http://www.anydesk.com) on your control computer I can make a remote tunnel and do the debug directly.
No it looks like that was everything.
Unfortunately I am not in an environment where I can put this switch on the net.
OK, so there is an update where I hope you can get the preset names and also recall them. Can you please create a second preset at the matrix and check if this works. (Presets names are only retrieved from the matrix at module start, not dynamically) Can you please check if everything else is still working, like crosspoint and feedbacks.
Connection still works, but the presets are still broken. Here is the result of your changes:
info: Response to 'GET /MEDIA/PRESET.*' didn't have any presets. Response was:pw /MEDIA/PRESET.Button1AssignedPreset=
pw /MEDIA/PRESET.Button2AssignedPreset=
.
.
.
pw /MEDIA/PRESET.Button47AssignedPreset=
pw /MEDIA/PRESET.Button48AssignedPreset=
m- /MEDIA/PRESET:createButtonAssignedPreset
m- /MEDIA/PRESET:rename
m- /MEDIA/PRESET:create
m- /MEDIA/PRESET:delete
m- /MEDIA/PRESET:copy
(I shortened the response to reduce clutter) There are 2 presets. The first one called "Horizontal" and a second one named "TestPreset"
info: Response to 'OPEN /MEDIA/PRESET' didn't have any presets. Response was:o- /MEDIA/PRESET
Ah, I see the responses in the log you posted earlier had been of by one. I have a good feeling about this one now: pkg.tgz
Now there is no info showing up in the debug, but it looks like it still isn't pulling the presets correctly. I added a test button for "preset recall" and Companion is showing ??() in the 'Presets' box.
Did you delete that button and recreate it? It is normal if we solve problems with options, that it shows the ??() if a wrong value was stored previously. So please delete that button and create it new.
It is a new button- I normally dont use the LW presets, I've been using companion to route each source individually. I am only adding the button now to help try and debug.
Ok, thank you. You see how hard it is to debug some stuff if there is no device available. Can you go back to the Lightware LDC to the advanced view. There is a checkbox like "Enable editing". If you check it, you'll get a command line entry. Can you please enter the command "GET /MEDIA/PRESET" (without the quotes) and send it. What is the result? If there is no info in the log, it should have found at least one preset. Did you recreate the button AFTER you changed to the last version of the module?
I know how difficult it is to troubleshoot this sort of thing with no actual device to work on. I appreciate your time and patience working through this despite the hassle.
Here is the result:
> GET /MEDIA/PRESET
< n- /MEDIA/PRESET/Horizontal
< n- /MEDIA/PRESET/TestPreset
Ok, we are definitely at the right command. Only question now is why the presets are not parsed correctly. Here is a version with more verbose logging: pkg.tgz
debug: response from 'GET /MEDIA/PRESET' was: n- /MEDIA/PRESET/Horizontal n- /MEDIA/PRESET/TestPreset info: 'GET /MEDIA/PRESET' found 2 presets with the names: Horizontal, TestPreset
Ok, this part of the code is correct. You still don't see the presets in the action option, correct? Even if you delete that button and recreate it again?
Correct, presets are still empty in the actions section.
Not sure if this helps but when I select different presets, this is what shows up in the advanced view:
6BED#GET /MEDIA/PRESET/TestPreset.*
{6BEC
}
{6BED
pw /MEDIA/PRESET/TestPreset.VideoSource=u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;
pw /MEDIA/PRESET/TestPreset.VideoDestination=uI1;uI3;uI5;uI7;uI2;uI4;uI6;uI8;uI9;uI10;uI11;uI12;uI13;uI14;uI31;uI32;uI1;uI2;uI3;uI4;uI5;uI6;uI7;uI8;uI9;uI10;uI11;uI12;uI13;uI14;uI15;uI48;uI1;uI1;uI1;uI1;uI1;uI1;uI1;uI38;uI38;uI39;uI43;uI31;uI38;u0;uI31;uI39;
m- /MEDIA/PRESET/TestPreset:load
m- /MEDIA/PRESET/TestPreset:addLayer
m- /MEDIA/PRESET/TestPreset:deleteLayer
m- /MEDIA/PRESET/TestPreset:save
}
6BEE#CLOSE /MEDIA/PRESET/TestPreset
6BEF#OPEN /MEDIA/PRESET/Horizontal
{6BEE
c- /MEDIA/PRESET/TestPreset
}
6BF0#GET /MEDIA/PRESET/Horizontal
{6BEF
o- /MEDIA/PRESET/Horizontal
}
6BF1#GET /MEDIA/PRESET/Horizontal.*
{6BF0
}
{6BF1
pw /MEDIA/PRESET/Horizontal.VideoSource=u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;u;
pw /MEDIA/PRESET/Horizontal.VideoDestination=uI1;uI2;uI3;uI4;uI5;uI6;uI7;uI8;uI9;uI10;uI11;uI12;uI13;uI14;uI15;uI16;uI1;uI2;uI3;uI4;uI5;uI6;uI7;uI8;uI9;uI10;uI11;uI12;uI13;uI14;uI15;uI48;uI1;uI1;uI1;uI1;uI1;uI1;uI1;uI31;uI35;uI35;uI36;uI37;uI42;u0;uI35;uI31;
m- /MEDIA/PRESET/Horizontal:load
m- /MEDIA/PRESET/Horizontal:addLayer
m- /MEDIA/PRESET/Horizontal:deleteLayer
m- /MEDIA/PRESET/Horizontal:save
}
Thank you, but this seems now to be a problem somwhere else, the module gets the correct names from the matrix. Here is a version with even more logging: pkg.tgz
debug: Initializing Recall Preset, choices are: info: 'GET /MEDIA/PRESET' found 2 presets with the names: Horizontal, TestPreset debug: CHOICES_PRESETS are now: [object Object],[object Object] debug: Initializing Recall Preset, choices are: [object Object],[object Object]
Everything looks fine, the presets should show up in the option. Are we talking about the same thing? They should be here:
And once again: if there was a wrong value stored previously you have to delete that 'Recall Preset' action and add it again to see the correct list. You have to do this every time you try a new version.
Yes, we are talking about the same thing:
Is there anything else if you open the dropdown?
Using LW3 instance, no in- or outputs are appearing, only ??
Using LW2 the matrix was controllable. Even though the MX2 is mentioned as tested.