bitfocus / companion-module-thelightingcontroller

MIT License
4 stars 1 forks source link

Button press/release/toggle, by name or position #1

Closed tacvideo closed 4 years ago

tacvideo commented 4 years ago

Companion (Logs report "API Connected" and Status) shows it’s talking to TheLightingController, but when selecting “Button press/release/toggle, by name” or “…by position” I get “No results found”, I guess it's supposed to have retrieved available options...

On their forum https://thelightingcontroller.com/viewtopic.php?f=78&t=6614&p=27701&hilit=companion#p27701 another user reported the same problem but there's no response.

Looks like a BUG but ?!?!? Any suggestions?

tacvideo commented 4 years ago

I am using the latest versions of TheLightingController (9.2.10) and Companion (2.1.0)

thargy commented 4 years ago

Hi @tacvideo,

I've been using this project all year without issues, so I haven't touched this codebase in some time, so nothing immediately springs to mind. There isn't really enough detail in your description for me to diagnose the problem, and I don't currently have the dev environment set up to debug. The code was developed against 9.2.10 of TheLightingController, so that shouldn't be an issue.

One potential, off the top of my head, is to check you have enabled external control in QuickDMX, you can find this under "Live Settings", which can be accessed from the Live Control. Also, do you have buttons setup in the live view?

If you have some technical ability using a tool such as Fiddler can allow you to intercept the communications between Companion and the API, that might give us a hint as to what is going on.

tacvideo commented 4 years ago

Sorry for the lack of detail, just not sure what else would be relevant, as a tech person I hate it when people throw up all kinds of useless information:)

Yes, external control is enabled , otherwise I see errors in Companion’s log, and yes I have buttons setup (hopefully you can see the attached/below image) in Live view.

I tried Fiddler (on both machines) but it’s only showing HTTP browser traffic, nothing between the machines running Companion and LightingController. Are there other logs I kind find (other than the log in Companion)?

On Oct 29, 2020, at 5:42 AM, Craig Dean notifications@github.com wrote:

Hi @tacvideo https://github.com/tacvideo,

I've been using this project all year without issues, so I haven't touched this codebase in some time, so nothing immediately springs to mind. There isn't really enough detail in your description for me to diagnose the problem, and I don't currently have the dev environment set up to debug. The code was developed against 9.2.10 of TheLightingController, so that shouldn't be an issue.

One potential, off the top of my head, is to check you have enabled external control in QuickDMX, you can find this under "Live Settings", which can be accessed from the Live Control. Also, do you have buttons setup in the live view?

If you have some technical ability using a tool such as Fiddler can allow you to intercept the communications between Companion and the API, that might give us a hint as to what is going on.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitfocus/companion-module-thelightingcontroller/issues/1#issuecomment-718699128, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARRV2G4USH4KHWAOTMIDCOLSNFIL7ANCNFSM4TDA7ALA.

thargy commented 4 years ago

Sorry, @tacvideo!

Yes, external control is enabled

There are 3 places to enable external control:

  1. File -> Preferences -> Network - External App, ensure 'Enable' checkbox is ticked and port is correct (7348). 1 Preferences-Live Settings

  2. Live Settings (Right-click on the hamburger menu on the Live tab)->Network - External Control, ensure 'Enable' checkbox and password is correct 2 LiveSettings-Network

  3. Visible in external application (right-click on page dropdown) - Ensure you have marked every page you want to control as visible in the external application. 3 Visible in External Application

You have almost certainly done the first 2, otherwise you wouldn't get an 'API connected' message in the Companion Log. However, it is easy to miss the 3rd step (TLC/QuickDMX is not the easiest program to use, it's crazy there are 3 places to setup). Please can you confirm that is done?

I tried Fiddler (on both machines)

Sorry for being so dumb, in my defence the world has moved a lot since February. The protocol is TCP, not HTTP, so of course, Fidder wouldn't work! I meant use Wireshark to monitor the socket. The default port is 7348. Now that I remember it, that was the main way I debugged/reverse-engineered the API as the 'documentation' wasn't 100%.

The TCP connection initially sends a HELLO message and receives a HELLO response - this is what you are getting before an 'API Connected' log. Following that a BUTTON_LIST command is sent, and the response should be an XML document listing the visible pages, and their buttons. Any problem would probably be in the parsing of that response.

(hopefully you can see the attached/below image)

Github doesn't include attachments when you respond via email if you want to add an image, you can do that through the web interface, by viewing the issue in Github (at https://github.com/bitfocus/companion-module-thelightingcontroller/issues/1).

thargy commented 4 years ago

I have updated the Readme to include more detailed setup instructions. That prompted me to recall that you should check if you can control the software using one of the Live Mobile applications.

tacvideo commented 4 years ago

Solved!