[GH-ISSUE #235] Where to jump in when a device is connected/disconnected? #160

Closed
opened 2026-02-27 19:29:10 +03:00 by kerem · 1 comment
Owner

Originally created by @itsmebasti on GitHub (Jul 2, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/235

I'm trying to switch my amplifier on and off whenever a device is connected with my pi-musicbox (using this library). So my question is where is the best spot to jump in. I found a play/pause state machine where I could trigger my stuff, but I would prefer a connection based trigger.

Originally created by @itsmebasti on GitHub (Jul 2, 2018). Original GitHub issue: https://github.com/librespot-org/librespot/issues/235 I'm trying to switch my amplifier on and off whenever a device is connected with my pi-musicbox (using this library). So my question is where is the best spot to jump in. I found a play/pause state machine where I could trigger my stuff, but I would prefer a connection based trigger.
kerem 2026-02-27 19:29:10 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@ashthespy commented on GitHub (Nov 6, 2019):

Missed this, you would be looking for MessageType::kMessageTypeLoad
Take a look a ashthespy/librespot for an implementation idea.

<!-- gh-comment-id:550411177 --> @ashthespy commented on GitHub (Nov 6, 2019): Missed this, you would be looking for `MessageType::kMessageTypeLoad` Take a look a [ashthespy/librespot](https://github.com/ashthespy/librespot/blob/f67905a4eeaf5a387107054080f64ac0a85c8ae4/connect/src/spirc.rs#L546-L554) for an implementation idea.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#160
No description provided.