Bluesound API for for controlling a Bluesound player. see: http://www.bluesound.com
pip3 install git+https://github.com/venjum/bluesound.git
def handelTitle1(new_title):
print(new_title)
from bluesound.bluesound_subscribe import SubscriptionObject
title1 = SubscriptionObject(['status', 'title1'], handelTitle1)
from bluesound_subscription_objects import secondsInTrack
def handelSecondsInTrack(sec):
print(sec)
secondsInTrack.setCallback(handelSecondsInTrack)
from bluosesound.bluesound_control import Bluesound
bluos = Bluesound("192.168.1.87", 1.0, set([title1, secondsInTrack]))
bluos.start()
bluos.skip()
bluos.stop()