Stagelinq protocol API availability? (Part 1)

It looks really awesome, but I am not sure what the added value would be when we are talking on reverse engineering the stagelinq protocol.

Another programming language. Maybe we can also port the go scripts also to this. Or any other do nice things in this script-language. So more people can write tools, so better our hardware can be.

In wich language it is coded is not the case … but for me … I will try AHK now, to write my tools for my denon toys :wink:

Yo @DJRobF sounds like the 2.0 update may be causing issues with current implementations of the StageLinQ protocol, have you seen any issues with your code on 2.0?

Hi Erik,

I’m still on 1.6, but when I have the time later this week, I’ll take a look at what it is they changed and will update the code!

1 Like

Hi all,

Just to add to this, depending on the solution you are using (I am using SC6000’s with an X1800 mixer on latest firmware versions) it may be that Engine Connect has not properly started. Also noted issues with Wifi and Ethernet enabled at the same time which causes some connectivity problems but the same was true with very early POC code in GoLang.

As an order of play, I start the mixer first, ensure it is booted up and then boot deck one, wait for engine connect to start, and then boot deck 2. This appears to resolve any connectivity issues I have.

I have also noted that running soundswitch embedded from the decks directly, rather than from the laptop works really well…there are no issues with port sharing in this configuration.

I am still using the GoLang POC code (included in this thread) and it does appear to work fine with both the SC5000’s and SC6000’s on v2.0 (mixer firmware v1.6).

Hope this helps,

Simon

2 Likes

Hi @erikrichardlarson I took a look at 2.0, and as far as I can see is the only problem that it tried to connect to a new service called “OfflineAnalyzer”. I skipped that service during discovery and all seems to work fine again. I pushed the fix. Can you update the code and see if it all works?

1 Like

@icedream , or anyone else here: I’m trying to decode the FileTransfer protocol. Would it be possible to send a network trace for fetching a simple image (album art for instance)? Ideally a trace of both the client and the server (Denon device)

Unfortunately I don’t have any devices here other than the Denon Prime Go, so it’s impossible for me to make such a trace myself.

1 Like

Hi @erikrichardlarson

With the help of @icedream s captures, I was able to more or less reverse engineer the filetransfer protocol. Meaning that I’m able to get files from my Prime Go. I pushed a simple example on Github where I connect to my Prime Go and get its databases from all the sources and store them locally in the ‘downloaded’ folder. Next I open each db using SqLite and simply output the number of Album Arts present in each database. Then it continues to function as it did before (outputting the statemap states).

Can you test whether or not this works with your unbox implementation? If it does, my next step would be to provide you with the album art of the songs that are currently playing.

[EDIT]

I just added album art support to the StageLinq nodejs implementation. This is the latest commit:

ADD: support for album art downloading
ADD: when loading a new track onto a deck, a newly created TrackLocalAlbumArtPath now indicates where the album art can be found. E.g.,:

/Engine/Deck2/Track/TrackLocalAlbumArtPath => {"string": "./localdb/MUSICA BIG/Album Art/10.jpg", "type":0}

or

/Engine/Deck2/Track/TrackLocalAlbumArtPath => {"string": null, "type":-1}

when no album art is present

CHG: downloaded folder renamed to localdb
CHG: replaced sqlite with better-sqlite, to get rid of asynchronous calls (which didn't work well with the message handler)
ADD: --skipsync commandline option, to skip the syncing of databases and downloaded album art

@erikrichardlarson would that TrackLocalAlbumArtPath hack help you with displaying album art directly in unbox?

4 Likes

Awesome work! I actually don’t have any gear to test this on, but I’d say if you can save / render the image in node then it should work fine with unbox since it’s just an electron app. I’d definitely try to get the album art of the songs currently playing, would be great to have that available as a denon overlay in unbox.

1 Like

Excellent! I currently store all images in ./localdb/<sourcename>/Album Art/ and a url to a specific image is outputted when loading a song on the deck, using the TrackLocalAlbumArtPath tag. It should be enough info for that overlay. But if you need anything else, just let me know.

Been away for a while, where can I download the latest version for mac?

But if you are on Mac and don’t have a newer version of MacOS it won’t open. I think @erikrichardlarson was going to upload a version compatible with Catalina etc at some point. You’ll need a version up to V8.0 if you have an older Mac.

Hey all sorry haven’t had much time to work on this, but I’ll be working on this soon!

1 Like

What a fantastic, massive thread. I’m super excited by all the collaboration and activity happening here!

@DJRobF - any chance you’ve documented the file transfer protocol? curious from a high level how this works and what can be accomplished with it.

Also, just thinking of the art of the possible (unrelated to file transfer) … it would be so slick to have an image/video rendered that animated the actual device itself. IE. Given all the possible states I see in values_names.go, a virtual controller image.

3 Likes

Hi there! I haven’t documented it but what I’ve deciphered should be available here:

Hope this helps in any way?

1 Like

@DJRobF - thanks for the link. I hope to dive in once I’ve wrapped my head around the StateMap stuff!

I wanted to understand all the type hints provided in StateMap updates so I attempted to catalog them in the following gist:

One thing I did notice is that I never received initial state or updates for:

  • /Engine/Deck*/PlayStatePath
  • /GUI/Decks/Deck/ActiveDeck
  • /GUI/ViewLayer/LayerB

… even though they were documented in the values_names.go file from @icedream

Actually, I found this where PlayStatePath looks like they show up for this user (just judging by presence in some debug output they pasted). This user in on a Prime Go I think.

Another thing I’m perplexed about… are Play and PlayState ever different? I think the only case is when a track is not loaded but Play is pressed.

Yeah looking over some logs that @DJRobF sent, it seems that Play follows PlayState, so it’s possible that Play doesn’t follow PlayState on an empty deck since there isn’t anything to play out.

Just updated the Denon mode in Unbox to use @DJRobF’s StageLinq library, I don’t have any Denon gear to fully test the update, could y’all give it a try and let me know if it works for you? Here are the download links:

1 Like

@erikrichardlarson - the new version crashed right away. My setup is 2x SC5000 + X1800 mixer.

I was toying around with @DJRobF library yesterday for a few hours and I observed following behavior:

  1. When the library starts listening for UDP broadcasts
  2. In case it receives a “DISCOVERER_HOWDY_” message from X1800 mixer, it tries to connect to it’s port 50010 (as that port is in always in broadcast message content) → X1800 refuses the connection and the library crashes.
  3. SC5000 players send “DISCOVERER_HOWDY_” messages with different ports, and when connecting to those ports the SC5000 first accepts the incoming connection but then closes it right away.

Here are the relevant log entries (I added more logging in order to get the full details of the DISCOVERER_HOWDY_ msgs):

[00:57:08] [INFO] Found ‘sc5000’ Controller at ‘192.168.1.101:37503’ with following software: { name: ‘JP07’, version: ‘2.1.1’ }

[00:57:08] [LOG] controller: {“token”:{“0”:15,“1”:90,“2”:144,“3”:1,“4”:237,“5”:133,“6”:65,“7”:63,“8”:140,“9”:191,“10”:248,“11”:104,“12”:6,“13”:105,“14”:98,“15”:113},“source”:“sc5000”,“action”:“DISCOVERER_HOWDY_”,“software”:{“name”:“JP07”,“version”:“2.1.1”},“port”:37503,“address”:“192.168.1.101”}

[00:57:08] [INFO] Found ‘DN-X1800Prime’ Controller at ‘192.168.1.100:50010’ with following software: { name: ‘JM08’, version: ‘1.00’ }

[00:57:08] [LOG] controller: {“token”:{“0”:0,“1”:0,“2”:0,“3”:0,“4”:0,“5”:0,“6”:0,“7”:0,“8”:128,“9”:0,“10”:0,“11”:5,“12”:149,“13”:0,“14”:235,“15”:108},“source”:“DN-X1800Prime”,“action”:“DISCOVERER_HOWDY_”,“software”:{“name”:“JM08”,“version”:“1.00”},“port”:50010,“address”:“192.168.1.100”}

…and when trying to telnet:

kalle@Kalle-Air ~ % telnet 192.168.1.101 37503 Trying 192.168.1.101… Connected to 192.168.1.101. Escape character is ‘^]’. Connection closed by foreign host.

kkirjala@Kalle-Air ~ % telnet 192.168.1.100 50010 Trying 192.168.1.100… telnet: connect to address 192.168.1.100: Connection refused telnet: Unable to connect to remote host kkirjala@Kalle-Air ~ %

I am a NodeJS developer by profession, so I’d be very happy to participate in reverse engineering the protocol :slight_smile:

This topic was automatically closed after reaching the maximum limit of 500 replies. Continue discussion at Stagelinq protocol API availability? (Part 2).