andrewsayre / pyheos

An async python library for controlling HEOS devices through the HEOS CLI Protocol
Apache License 2.0
14 stars 12 forks source link

Player problem #12

Closed Patrick-17 closed 4 years ago

Patrick-17 commented 4 years ago

Good morning, sir, I have a Denon CEOL N10 in my office and I would like to run it from my computer. Denon offers an application for android and ios but nothing for windows 10. Therefore I'm thinking of creating a python application to drive my Ceol from my PC. Your pyheos library seems pretty great and could allow me to realize this project. I tested the Heos class which works perfectly. But I have a problem with the player class : I don't understand what parameter must be given to it in the initialization. Can you enlighten me on this subject. Player = HeosPlayer(heos, data), what should be understood by heos and what should be provided as data? Thank you for taking some time to answer me.

bearsh commented 4 years ago

why do you try to create a player instance? Once connected to one heos device, all players can be queried from Heos and get instantiated by Heos

heos = pyheos.Heos(IP)
players = await hoes.get_players()

now players is a dictionary containing all players in the network