-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest_pybeoplay.py
69 lines (56 loc) · 2.13 KB
/
test_pybeoplay.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from pybeoplay import BeoPlay
import logging
LOG = logging.getLogger(__name__)
if __name__ == '__main__':
import sys
ch = logging.StreamHandler(sys.stdout)
logging.basicConfig(level=logging.DEBUG)
ch.setLevel(logging.DEBUG)
LOG.addHandler(ch)
if len(sys.argv) < 2:
quit()
gateway = BeoPlay(sys.argv[1])
gateway.getDeviceInfo()
print ("Serial Number: " , gateway.serialNumber)
print ("Type Number: ", gateway.typeNumber)
print ("Item Number: ",gateway.itemNumber)
print ("Type Name: ",gateway.typeName)
print ("SW: ",gateway.softwareVersion)
print ("HW: ",gateway.hardwareVersion)
print ("Name: ",gateway.name)
print ("Standby: ", gateway.on)
print ("--- SOURCES ---")
gateway.getSources()
print (gateway.sources)
print (gateway.sourcesID)
print (gateway.sourcesBorrowed)
gateway.getSource()
print ("Active source: ", gateway.source)
print ("--- STAND POSITIONS ---")
gateway.getStandPositions()
print (gateway.standPositions)
print (gateway.standPositionsID)
gateway.getStandPosition()
print ("Stand Position: ", gateway.standPosition)
print ("--- SOUND MODES ---")
gateway.getSoundMode()
print("Sound Mode: ", gateway.soundMode)
gateway.getSoundModes()
print (gateway.soundModes)
print (gateway.soundModesID)
print("Sound Mode: ", gateway.soundMode)
gateway.getSoundMode()
print("Sound Mode: ", gateway.soundMode)
gateway.getStandby()
print ("On State: ", gateway.on)
# gateway.playQueueItem(True, {"playQueueItem": {"behaviour": "impulsive","track": {"deezer": { "id": 997764 }, "image" : []}}})
# gateway.playQueueItem(True, {"playQueueItem": {"behaviour": "planned","station": {"tuneIn": {"stationId": "s45455"}, "image" : []}}})
gateway.playQueueItem(True,{
"playQueueItem":
{
"behaviour": "impulsive",
"track": {
"dlna": {
"url": "http://192.168.1.217:50002/v/NDLNA/785.mp4"
}}}}
)