This is an unofficial command line interface (CLI) for macOS to remote control network enabled Beoplay loudspeakers.
This repository contains:
The RemoteCore library is also used by https://github.com/tlk/beoplay-macos-remote-gui which supports keyboard shortcuts.
$ beoplay-cli discover
+ "Beoplay Device" http://BeoplayDevice.local.:8080
$ export BEOPLAY_NAME="Beoplay Device"
$ beoplay-cli getVolume
35
$ beoplay-cli setVolume 20
$ beoplay-cli getVolume
20
$ beoplay-cli pause
$ beoplay-cli play
$ beoplay-cli monitor
RemoteCore.NotificationBridge.DataConnectionNotification(state: RemoteCore.NotificationSession.ConnectionState.connecting, message: nil)
RemoteCore.NotificationBridge.DataConnectionNotification(state: RemoteCore.NotificationSession.ConnectionState.online, message: nil)
RemoteCore.Source(id: "radio:[email protected]", type: "TUNEIN", category: "RADIO", friendlyName: "TuneIn", productJid: "[email protected]", productFriendlyName: "Beoplay M5 i køkkenet", state: RemoteCore.DeviceState.play)
RemoteCore.NowPlayingRadio(stationId: "s37309", liveDescription: "Higher Love - Kygo & Whitney Houston", name: "96.5 | DR P4 København (Euro Hits)")
RemoteCore.Progress(playQueueItemId: "plid-4342.3", state: RemoteCore.DeviceState.play)
RemoteCore.Volume(volume: 35, muted: false, minimum: 0, maximum: 90)
RemoteCore.Progress(playQueueItemId: "plid-4342.3", state: RemoteCore.DeviceState.play)
RemoteCore.Progress(playQueueItemId: "plid-4342.3", state: RemoteCore.DeviceState.play)
RemoteCore.Progress(playQueueItemId: "plid-4342.3", state: RemoteCore.DeviceState.play)
RemoteCore.NotificationBridge.DataConnectionNotification(state: RemoteCore.NotificationSession.ConnectionState.disconnecting, message: nil)
RemoteCore.NotificationBridge.DataConnectionNotification(state: RemoteCore.NotificationSession.ConnectionState.offline, message: nil)
$
$ beoplay-cli monitor volume
RemoteCore.Volume(volume: 23, muted: false, minimum: 0, maximum: 90)
RemoteCore.Volume(volume: 27, muted: false, minimum: 0, maximum: 90)
RemoteCore.Volume(volume: 31, muted: false, minimum: 0, maximum: 90)
RemoteCore.Volume(volume: 35, muted: false, minimum: 0, maximum: 90)
$ beoplay-cli emulator "Nice Device"
emulating device "Nice Device" on port 80 (stop with ctrl+c)
^C
$
$ make install
swift build -c release
[5/5] Linking ./.build/x86_64-apple-macosx/release/beoplay-cli
cp .build/release/beoplay-cli /usr/local/bin/beoplay-cli
Alternatively, install with Homebrew:
brew install tlk/beoplayremote/beoplay-cli
The beoplay-cli tool needs to know which device to connect to when issuing commands such as play, pause, etc.
Beoplay devices on the local network can be discovered in different ways:
dns-sd -B _beoremote._tcp.
beoplay-cli discover
The device name can be specified via an environment variable:
export BEOPLAY_NAME="Beoplay Device"
beoplay-cli play
Alternatively, host and port can be used:
export BEOPLAY_HOST=BeoplayDevice.local.
export BEOPLAY_PORT=8080
beoplay-cli play
link |
Stars: 11 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics