Comments (4)
When I try to select a host manually, it doesn't seem to work. Is this correct syntax?
heos = Heos('192.168.55.176', verbose=True)
Even specifying an IP, it always seems to do the get_players call.
from heos.
Let me give you both my sample program, and the output:
$ cat test.py
from heos.heos import *
host = '192.168.55.176'
heos = Heos(host,True)
info = heos.get_player_info()
heos.close()
print(info)
$ python3 ./test.py
'heos://player/get_players\r\n'
(b'{"heos": {"command": "player/get_players", "result": "success", "message": "'
b'"}, "payload": [{"name": "Living Room", "pid": 174479135, "model": "HEOS Dri'
b've", "version": "1.382.80", "ip": "192.168.55.229", "network": "wired", "lin'
b'eout": 1}, {"name": "Master Bathroom", "pid": -608667775, "model": "HEOS Dri'
b've", "version": "1.382.80", "ip": "192.168.55.176", "network": "wired", "lin'
b'eout": 1}, {"name": "Pool", "pid": -366844967, "model": "HEOS Amp", "version'
b'": "1.382.80", "ip": "192.168.55.175", "network": "wired", "lineout": 0}, {"'
b'name": "Playroom", "pid": -608128766, "model": "HEOS Drive", "version": "1.3'
b'82.80", "ip": "192.168.55.201", "network": "wired", "lineout": 1}, {"name": '
b'"Master Bedroom", "pid": -3336210, "model": "HEOS Drive", "version": "1.382.'
b'80", "ip": "192.168.55.228", "network": "wired", "lineout": 1}, {"name": "Fa'
b'mily Room", "pid": -411275013, "model": "HEOS Link", "version": "1.382.80", '
b'"ip": "192.168.55.113", "network": "wired", "lineout": 1}]}\r\n')
('{"heos": {"command": "player/get_players", "result": "success", "message": '
'""}, "payload": [{"name": "Living Room", "pid": 174479135, "model": "HEOS '
'Drive", "version": "1.382.80", "ip": "192.168.55.229", "network": "wired", '
'"lineout": 1}, {"name": "Master Bathroom", "pid": -608667775, "model": "HEOS '
'Drive", "version": "1.382.80", "ip": "192.168.55.176", "network": "wired", '
'"lineout": 1}, {"name": "Pool", "pid": -366844967, "model": "HEOS Amp", '
'"version": "1.382.80", "ip": "192.168.55.175", "network": "wired", '
'"lineout": 0}, {"name": "Playroom", "pid": -608128766, "model": "HEOS '
'Drive", "version": "1.382.80", "ip": "192.168.55.201", "network": "wired", '
'"lineout": 1}, {"name": "Master Bedroom", "pid": -3336210, "model": "HEOS '
'Drive", "version": "1.382.80", "ip": "192.168.55.228", "network": "wired", '
'"lineout": 1}, {"name": "Family Room", "pid": -411275013, "model": "HEOS '
'Link", "version": "1.382.80", "ip": "192.168.55.113", "network": "wired", '
'"lineout": 1}]}\r\n')
[{'ip': '192.168.55.229',
'lineout': 1,
'model': 'HEOS Drive',
'name': 'Living Room',
'network': 'wired',
'pid': 174479135,
'version': '1.382.80'},
{'ip': '192.168.55.176',
'lineout': 1,
'model': 'HEOS Drive',
'name': 'Master Bathroom',
'network': 'wired',
'pid': -608667775,
'version': '1.382.80'},
{'ip': '192.168.55.175',
'lineout': 0,
'model': 'HEOS Amp',
'name': 'Pool',
'network': 'wired',
'pid': -366844967,
'version': '1.382.80'},
{'ip': '192.168.55.201',
'lineout': 1,
'model': 'HEOS Drive',
'name': 'Playroom',
'network': 'wired',
'pid': -608128766,
'version': '1.382.80'},
{'ip': '192.168.55.228',
'lineout': 1,
'model': 'HEOS Drive',
'name': 'Master Bedroom',
'network': 'wired',
'pid': -3336210,
'version': '1.382.80'},
{'ip': '192.168.55.113',
'lineout': 1,
'model': 'HEOS Link',
'name': 'Family Room',
'network': 'wired',
'pid': -411275013,
'version': '1.382.80'}]
'heos://player/get_player_info?pid=174479135\r\n'
(b'{"heos": {"command": "player/get_player_info", "result": "success", "message'
b'": "pid=174479135"}, "payload": {"name": "Living Room", "pid": 174479135, "m'
b'odel": "HEOS Drive", "version": "1.382.80", "ip": "192.168.55.229", "network'
b'": "wired", "lineout": 1}}\r\n')
('{"heos": {"command": "player/get_player_info", "result": "success", '
'"message": "pid=174479135"}, "payload": {"name": "Living Room", "pid": '
'174479135, "model": "HEOS Drive", "version": "1.382.80", "ip": '
'"192.168.55.229", "network": "wired", "lineout": 1}}\r\n')
{'ip': '192.168.55.229',
'lineout': 1,
'model': 'HEOS Drive',
'name': 'Living Room',
'network': 'wired',
'pid': 174479135,
'version': '1.382.80'}
{'network': 'wired', 'model': 'HEOS Drive', 'ip': '192.168.55.229', 'name': 'Living Room', 'lineout': 1, 'version': '1.382.80', 'pid': 174479135}
$
from heos.
Sorry, but this isnt implemented, I only have one speaker. If you can stand one ugly solution you should be able to set heos._player_id to a pid of choice. Please patch, or I will probably update in the future.
from heos.
That ugly workaround works! Thanks.
from heos.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heos.