Skip to content

Bluesound API for for controlling a Bluesound player. API written in Python 3

Notifications You must be signed in to change notification settings

venjum/bluesound

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bluesound Python 3 API

Bluesound API for for controlling a Bluesound player. see: http://www.bluesound.com

Install (program is in beta, must install with github address)

pip3 install git+https://github.com/venjum/bluesound.git

Example of usage:

Make a subscription handler:

def handelTitle1(new_title):
    print(new_title)

from bluesound.bluesound_subscribe import SubscriptionObject
title1 = SubscriptionObject(['status', 'title1'], handelTitle1)

Or use some of the predefined subscription objects, but remember to set callback

from bluesound_subscription_objects import secondsInTrack

def handelSecondsInTrack(sec):
    print(sec)

secondsInTrack.setCallback(handelSecondsInTrack)

Then initiate and start Bluesound thread

from bluosesound.bluesound_control import Bluesound
bluos = Bluesound("192.168.1.87", 1.0, set([title1, secondsInTrack]))
bluos.start()

Use the API

bluos.skip()

When stopping application, remember to stop the thread as well.

bluos.stop()

About

Bluesound API for for controlling a Bluesound player. API written in Python 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages