Skip to main content

Dependency lite and micropython friendly library for interacting with Lyrion Music Server systems

Project description

micropyLMS

A dependency lite and micropython friendly library for interacting with Lyrion Music Server (LMS) systems

Overview

This library is intended to help build micropython based LMS controller projects. LMS allows for multiple players to simultaneously play separate streams and most commands and queries have to be represented as coming from one of the players connected to the server. Because of this, the bulk of the library is the player class that allows the creation of an object to hold information about and interaction methods for an LMS player.

A player object only needs to be created once. Any commands can be issued via the class methods. The various class attributes store some useful information on the last updated status of the player. Other information can be retrieved with the generic player_query() method. To insure that the information is current the status_update() method should be called. So for example, if the song playing has moved on since the last status_update() call the player.title, player.artist, and player.album information will all refer to that previous song until status_update() is called again.

Installation

pip install micropyLMS

Example Setup

The following code snippet shows how to initialize and use a simple setup

import micropyLMS

host = "192.168.1.5" # Change this to the specific local URL for your LMS server.
player_name = "Lounge" # Change to the name of the specific player. 

server_url = micropyLMS.build_url(host)
player = micropyLMS.get_player(server_url,player_name)
player.status_update()

player.set_volume(50) # Sets the volume to half the maximum.
player.play() # Starts the playback. Enjoy your music.
...

Advanced Usage

There are a wide varied of commands and queries that could be issued that are less commonly used than the ones implemented in this library. For that reason, the Player class has a generic player_query() method and the library has a generic query function core_query() for non-player queries. Constructing valid arguments for these function is a little more complicated. For full information on how to structure the argument or arguments that go in the place of *command for these functions see https://lyrion.org/reference/cli/using-the-cli/ under the jsonrpc.js section and the command part of the body of the request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micropylms-1.0.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micropylms-1.0.2-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file micropylms-1.0.2.tar.gz.

File metadata

  • Download URL: micropylms-1.0.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for micropylms-1.0.2.tar.gz
Algorithm Hash digest
SHA256 1f3aff8ff53818bbc73dfd32a99aa06cfa76bfac6159114ea19e291c9ab3fe8b
MD5 03c5c6780310498a73a4cfbf193b4416
BLAKE2b-256 8b23b3efed2f54487e24f67b148479e1b6f9b870a263f01334052ff9920229c4

See more details on using hashes here.

File details

Details for the file micropylms-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: micropylms-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for micropylms-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a0a22182b17bb759045cae65b48ae8f89c3f1ce6f1fee5ac007d6d493a78ad9
MD5 5912b66dd604da9e374d050795532c60
BLAKE2b-256 a33a26234598a5d3dc83795459fe99e9625828132e308cc957a2367c11783b7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page