Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic DLNA/UPnP support #23

Open
thomnico opened this issue Aug 29, 2018 · 7 comments
Open

Add basic DLNA/UPnP support #23

thomnico opened this issue Aug 29, 2018 · 7 comments

Comments

@thomnico
Copy link
Contributor

Hi,
The basic works for this device .. but not the dlna/upnp input which is my main usage.

Attached is the dump_devinfo

I can test and do a little python if that helps.

@thomnico
Copy link
Contributor Author

@rytilahti
Copy link
Owner

Can you be more specific about the problem you have with upnp/dlna? Is it related to those discussed in #5?

Thanks for the devinfo, could you create a PR to add it to https://github.com/rytilahti/python-songpal/tree/master/devinfos ?

@thomnico
Copy link
Contributor Author

thomnico commented Sep 8, 2018

I added the pull request #27 for devinfo.

Here is one of the non working call I got:
songpal --endpoint http://192.168.0.100:10000/sony source
WARNING:songpal.service:More than on version for {'versions': [{'version': '1.1'}, {'version': '1.2'}], 'name': 'getSourceList'}, using the first one
WARNING:songpal.service:More than on version for {'versions': [{'version': '1.1', 'authLevel': 'generic'}, {'version': '1.2'}], 'name': 'getStorageList'}, using the first one
WARNING:songpal.service:More than on version for {'versions': [{'version': '1.3'}, {'version': '1.4'}], 'name': 'getSystemInformation'}, using the first one
TV (extInput:tv)
ContentInfo(capability=0, count=-1)
Got an error for getContentList: [15, 'unsupported operation']
HDMI1 (extInput:hdmi?port=1)
ContentInfo(capability=0, count=-1)
Got an error for getContentList: [15, 'unsupported operation']
HDMI2 (extInput:hdmi?port=2)
ContentInfo(capability=0, count=-1)
Got an error for getContentList: [15, 'unsupported operation']
HDMI3 (extInput:hdmi?port=3)
ContentInfo(capability=0, count=-1)
Got an error for getContentList: [15, 'unsupported operation']
Bluetooth Audio (extInput:btAudio)
ContentInfo(capability=0, count=-1)
Got an error for getContentList: [15, 'unsupported operation']
Analog (extInput:line)
ContentInfo(capability=0, count=-1)
Got an error for getContentList: [15, 'unsupported operation']
USB (storage:usb1)
Got an error for getContentCount: [15, 'unsupported operation']
Got an error for getContentList: [15, 'there is no usb loaded']
Home Network (dlna:music)
ContentInfo(capability=0, count=-1)
Got an error for getContentList: [15, 'unsupported operation']
Unable to get sources for cast
Unable to get sources for netService

Can you please help me debug that ??

@thomnico
Copy link
Contributor Author

thomnico commented Sep 8, 2018

https://gist.github.com/thomnico/1e78afa45ea7808842994739e9dcfc9f same with debug information

@rytilahti
Copy link
Owner

Playback from upnp/dlna sources is not currently implemented: https://developer.sony.com/develop/audio-control-api/get-started/play-dlna-file . I think it is not possible to change to that source via this API, but it should be done in DLNA way. The output from source is quite verbose (as it calls both list of content and then tries to read the content list), but do you have some specific functionality which is not working? What do you want to debug?

@thomnico
Copy link
Contributor Author

Thanks for the answers.
All the lines with 'unsupported operation' seems to need some attention or should not log such a message, imho.

My ideal scenario will be to be able to control the dlna from this api code indeed.

@rytilahti
Copy link
Owner

Indeed, I just changed that in a recent commit (but forgot to remove some debug printouts, which will be removed soonish). There is https://github.com/StevenLooman/async_upnp_client which could be used to facilitate DLNA, but I think the control is more generic and very unlikely to be implemented in this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants