icedream / go-stagelinq Goto Github PK
View Code? Open in Web Editor NEWGolang library implementing the StagelinQ protocol to access live Denon device information.
License: MIT License
Golang library implementing the StagelinQ protocol to access live Denon device information.
License: MIT License
There is state for "Lead" track (ie: which one is currently playing / similar to ProDJ-Link "on-air" state).
I was wondering, is there any guidance (even if it's basic) on sniffing / wiresharking stagelinq to see if I can discover new state values? I'm hoping to uncover a the "lead" track state and contribute to this and other projects.
# git.icedream.tech/icedream/stagelinq-receiver
./listener.go:46:25: undefined: syscall.Handle
./listener.go:47:25: undefined: syscall.Handle
So we tested this with two SC5000s.
go-stagelinq found the two decks (with two IP addresses).
Loading a song from USB stick on deck 1, it would get the data correctly and printf'd it.
However, loading a song on deck 2, it wouldn't show up.
In the log, we first see the initial state of both decks, but from that point forward only actions on deck 1 where the USB stick would be printf'd. Deck 2 never printf'd anything from that point forward.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/go.yml
actions/checkout v4
actions/setup-go v5
robherley/go-test-action v0.2.0
go.mod
go 1.17
github.com/stretchr/testify v1.9.0
golang.org/x/text v0.14.0
Curious if you've seen any evidence of a StateMap "keepalive" feature to detect dead connections on the client side? I've seen instances where the Denon stops sending updates to the subscriber, yet the subscriber (go-stagelinq) and OS consider the TCP connection up so it continues to obediently wait for updates.
This seems to be a new service as of engine os 2.x. Did not analyze at all yet.
Is there a way to differentiate between devices?
I'm developing an OBS overlay to display the currently playing track in each channel. On the Prime 4(+) I get messages with state names /Engine/Deck[1-4]/.*
. so from that device I can easily differentiate the four channels. From a pair of SC5000 I get messages from them both and they're each sending /Engine/Deck[12]/.*
, so purely parsing the state name isn't enough.
For a given session, I can differentiate between devices by IP address, but between sessions the devices may get different addresses via DHCP. I'd like to get some durable identifier that I can combine with the Deck.
portion of the name to keep the channel ordering consistent in the overlay. I can potentially use ARP to get the MAC address associated with the device's IP and use that, but it would be nice if there were something directly in StagelinQ.
Running stagelinq-discover
, the output indicates that it's using the wrong format string placeholder for values. The output looks like this:
2024/01/24 19:17:42 /Engine/Deck3/Track/TrackName = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 /Engine/Deck4/Play = map[state:%!s(bool=false) type:%!s(float64=1)]
2024/01/24 19:17:42 /Engine/Deck4/PlayState = map[state:%!s(bool=false) type:%!s(float64=1)]
2024/01/24 19:17:42 /Engine/Deck4/Track/ArtistName = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 /Engine/Deck4/Track/TrackNetworkPath = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 /Engine/Deck4/Track/SongLoaded = map[state:%!s(bool=false) type:%!s(float64=1)]
2024/01/24 19:17:42 /Engine/Deck4/Track/SongName = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 /Engine/Deck4/Track/TrackData = map[state:%!s(bool=false) type:%!s(float64=3)]
2024/01/24 19:17:42 /Engine/Deck4/Track/TrackName = map[string: type:%!s(float64=8)]
I think it should look like this:
2024/01/24 19:20:24 /Engine/Deck3/Track/TrackData = map[state:false type:3]
2024/01/24 19:20:24 /Engine/Deck3/Track/TrackName = map[string: type:8]
2024/01/24 19:20:24 /Engine/Deck4/Play = map[state:false type:1]
2024/01/24 19:20:24 /Engine/Deck4/PlayState = map[state:false type:1]
2024/01/24 19:20:24 /Engine/Deck4/Track/ArtistName = map[string: type:8]
2024/01/24 19:20:24 /Engine/Deck4/Track/TrackNetworkPath = map[string: type:8]
2024/01/24 19:20:24 /Engine/Deck4/Track/SongLoaded = map[state:false type:1]
2024/01/24 19:20:24 /Engine/Deck4/Track/SongName = map[string: type:8]
2024/01/24 19:20:24 /Engine/Deck4/Track/TrackData = map[state:false type:3]
2024/01/24 19:20:24 /Engine/Deck4/Track/TrackName = map[string: type:8]
The log.Printf
call is using %s
for the map[string]interface{}
when it should be using %v
. PR forthcoming.
Would it potentially make sense to add context support to NewStateMapConnection
so that we can receive a ctx.Done()
or initiate a cancel signal? I'm pondering how to gracefully shutdown multiple StateMapConnection
when one of them closes its send channel due to error. If they all shared a parent context, I was thinking a graceful shutdown could be initiated when the failure of one should initiate a shutdown of all.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.