Giter Site home page Giter Site logo

python-songpal's Introduction

python-songpal

PyPI version Black

Python 3 implementation of SongPal protocol as used by Sony's soundbar and potentially other devices.

Note

This project is currently at its alpha stage and all contributions, whether reporting about devices working with this or creating pull requests to implement missing functionality are more than welcome!

Supported devices

The library has been tested to work with following devices:

  • BDV-N9200W
  • CMT-SX7B
  • HT-XT2, HT-XT3
  • HT-NT5
  • HT-MT500
  • HT-ZF9
  • HT-ST5000
  • SRS-X77, SRS-X88, SRS-X99
  • STR-DN1060, STR-DN1070, STR-DN1080
  • STR-AZ5000ES
  • STR-AN1000, TA-AN1000

Note

If your device is not listed here but is working, feel free to contribute a device info file (see devinfos/ directory) by typing songpal dump-devinfo <filename> and creating a pull request on this repository. This information can later be useful for extending the support for those devices.

Note

Sony's Supported devices page lists devices, which will probably also work with this library.

If you have a device which is not listed above, please create a pull request or an issue on github!

Getting started

Installation

The easiest way to install is by using pip:

$ pip install python-songpal

Locating the endpoint

To communicate with the device you need to locate its endpoint URL. The easiest way to do is to execute the discover command:

$ songpal discover

Discovering for 3 seconds
Found HT-XT3 - BAR-2015
* API version: 1.0
* Endpoint: http://192.168.1.1:10000/sony
* Services:
  - Service: guide
  - Service: system
  - Service: audio
  - Service: avContent

This will run a UPnP discovery to find out responsive devices implementing the ScalarWebAPI.

Warning

If you are running the command on another network than the device is residing, you will need to locate the endpoint with some other means.

The endpoint can be defined with --endpoint option, or alternatively SONGPAL_ENDPOINT environment variable can be set.

General Usage

The accompanied songpal tool can be used to control your device. All available commands can be listed with --help and more help on each command can be obtained by passing it to the sub-command, e.g., songpal power --help. Most interesting commands are most likely power, output, volume, and sound.

Generally speaking invoking a command without any parameters will display some relevant information like settings or active output.

For debugging -d (--debug) can be passed -- also multiple times for increased verbosity -- for protocol-level information.

Some of the commands can be used to adjust settings related to that functionality, usually by passing the target and its wanted value as parameters to the command.

$ songpal bluetooth mode off

On commands which are not mainly used for settings, such as power, require explicit set sub-command for changing the settings.

Warning

Refer to help of the specific command to find the correct format.

TODO: Make the CLI consistent on this.

Status

$ songpal status

will display some basic information about the device, such as whether it is powered on and what are its volume settings.

Power Control

power command can be used to both turning the device on and off, and change its power settings.

$ songpal power

$ songpal power settings

$ songpal power

$ songpal power set quickStartMode on

Note

For turning on the device the quick boot has to be activated; a patch for adding wake-on-lan support to allow starting the device without quick boot are welcome.

Warning

The device seems to report sometimes its status to be off even when that is not the case (may be related to quick boot mode being 'on').

Please enable it and restart the device fully before reporting a bug related to this.

Volume Control

$ songpal volume [-- output 'output title'] [<value>|mute|unmute]

$ songpal volume 20

$ songpal volume +5

$ songpal volume -10

$ songpal volume --output 'Zone 2'


$ songpal volume --output 'Main Zone' 15

Sound Settings

Your device may support various sound-related settings, such as night mode or adjusting the subwoofer volume.

$ songpal sound

$ songpal sound nightMode off

$ songpal sound subwooferLevel 4

Zone Control

$ songpal zone

Zones:
  * Main Zone (uri: extOutput:zone?zone=1) (active)
  * Zone 2 (uri: extOutput:zone?zone=2) (active)
  * Zone 3 (uri: extOutput:zone?zone=3)
  * HDMI Zone (uri: extOutput:zone?zone=4)

$ songpal zone 'Main Zone'

Activating Main Zone (uri: extOutput:zone?zone=1) (active)

$ songpal zone 'Zone 2' true

Activating Zone 2 (uri: extOutput:zone?zone=2) (active)

$ songpal zone 'Zone 2' false

Deactivating Zone 2 (uri: extOutput:zone?zone=2) (active)

Input Control

without zones: .. code-block:

$ songpal input
      * HDMI1 (uri: extInput:hdmi?port=1)
      * HDMI2 (uri: extInput:hdmi?port=2) (active)
      * HDMI3 (uri: extInput:hdmi?port=3)

$ songpal input HDMI1

with zones: .. code-block:

$ songpal input

Inputs:
  * SOURCE (uri: extInput:source)
    - extOutput:zone?zone=2
    - extOutput:zone?zone=3
    - extOutput:zone?zone=4
  * GAME (uri: extInput:game) (active)
    - extOutput:zone?zone=1
    - extOutput:zone?zone=4
  * SAT/CATV (uri: extInput:sat-catv)
    - extOutput:zone?zone=1
    - extOutput:zone?zone=2
    - extOutput:zone?zone=3
    - extOutput:zone?zone=4
  * VIDEO 1 (uri: extInput:video?port=1)
    - extOutput:zone?zone=1
    - extOutput:zone?zone=2
    - extOutput:zone?zone=3
    - extOutput:zone?zone=4
  * VIDEO 2 (uri: extInput:video?port=2)
    - extOutput:zone?zone=1
    - extOutput:zone?zone=4
  * TV (uri: extInput:tv)
    - extOutput:zone?zone=1
  * SA-CD/CD (uri: extInput:sacd-cd)
    - extOutput:zone?zone=1
    - extOutput:zone?zone=2
    - extOutput:zone?zone=3
    - extOutput:zone?zone=4
  * Bluetooth Audio (uri: extInput:btAudio)
    - extOutput:zone?zone=1
    - extOutput:zone?zone=2
    - extOutput:zone?zone=3

$ songpal input 'VIDEO 1'

$ songpal input 'SOURCE' --output 'Zone 2'

Device Settings

To list available settings, use settings command.

$ songpal settings

Do note that some settings (e.g. bluetooth settings) are not listed in the global settings tree, but have to be separatedly accessed using the bluetooth command.

Note

Setting global settings directly via the CLI is not currently supported, but can potentially be accessed via their respective commands: bluetooth, sound, power.

Patches improving this are welcome!

Group Control

$ songpal group

Group command require using the UPnP URL --url instead of the API --endpoint, and you'll need the UUIDs of the devices you want to group as well. Both of these can be obtained through the discover function. All group commands should be executed on the master

Creating groups:

$ songpal group --url [upnpurl] create [groupname] [slave uuids]

$ songpal group --url "http://x.x.x.x:52323/dmr.xml" create GroupName uuid:00000000-0000-1010-8000-xxxx uuid:00000000-0000-1010-8000-xxxx

Aborting groups

$ songpal group --url [pnpurl] abort

$ songpal group --url "http://x.x.x.x:52323/dmr.xml" abort

Changing volume

$ songpal group --url [pnpurl] volume [value -100,100]

$ songpal group --url "http://x.x.x.x:52323/dmr.xml" volume -- -5
$ songpal group --url "http://x.x.x.x:52323/dmr.xml" volume 5

Muting

$ songpal group --url [pnpurl] mute [true|false]

$ songpal group --url "http://x.x.x.x:52323/dmr.xml" mute true
$ songpal group --url "http://x.x.x.x:52323/dmr.xml" mute false

Executing custom commands

For experimenting it can be useful to execute arbitrary commands against the endpoint. You can access the available methods by calling songpal list-all.

command can be used for that as follows:

$ songpal command system getSystemInformation

Notification support

The protocol supports subscribing to notifications on subsystem basis. Executing songpal notifications without any parameters will list available notifications.

Every notification can be listened to separately, or alternatively all notifications from a single subsystem can be subscribed to.

$ songpal notifications --listen-all avContent

Contributing

Reporting bugs or supported devices

When reporting bugs or informing about supported device not listed above, please consider attaching the output of songpal dump-devinfo with your report.

API information

Audio Control API describes the API this project (currently partially) implements.

The Camera Remote API is also similar to this, and may also be useful for developers.

Home Assistant support

Home Assistant supports devices using this library directly since 0.65: https://home-assistant.io/components/media_player.songpal/

python-songpal's People

Contributors

allistermaguire avatar anhtuanng98 avatar bestpig avatar birt avatar danielpalstra avatar dotlambda avatar faintghost avatar flameeyes avatar flyingclimber avatar jwiese avatar kurt-k avatar little-boots avatar maximoei avatar ohmantics avatar pschmitt avatar rfeagley avatar rytilahti avatar shenxn avatar thomnico avatar tobyh avatar yllar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-songpal's Issues

Learnings about Group - Memory

Done some further digging into the different group functions. Since latest PRs, now have confirmed that following are working in my set up (XT-2 + X-88 + X-77)

  • Create / Start group
  • Abort group
  • Mute group
  • Change group volume

Not working

  • Stop
  • Play

Furthermore; the GetAllGroupMemory works, and returns the last five groups in XML embedded Json:
Memory: {'GroupMemory': '<?xml version="1.0"?>\n<groupMemoryList>\n <groupMemory>\n <MemoryID>7</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Test</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9,uuid:00000000-0000-1010-8000-ac9b0a300c02</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>6</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Link</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>5</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Gekoppeld</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>4</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Group</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9,uuid:00000000-0000-1010-8000-ac9b0a300c02</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n <groupMemory>\n <MemoryID>3</MemoryID>\n <GroupMode>GROUP</GroupMode>\n <GroupName>Group</GroupName>\n <SlaveList>uuid:00000000-0000-1010-8000-ac9b0a2163d9</SlaveList>\n <CodecType>64</CodecType>\n <CodecBitrate>3</CodecBitrate>\n </groupMemory>\n</groupMemoryList>\n'}
Don't know how to apply the other Memory related functions; would expect a StartM based on group id to recreate a group, but that doesn't exist.

Anyway, latest changes are already useful. @rytilahti , can a new release be created? I'm working on building support into HomeAssistant to create/abort groups.

Got unknowns for Sysinfo

I suppose the first three rows are irrelevant, but I post them anyway.

2018-03-16 22:21:51 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getSourceList', 'versions': [{'version': '1.1'}, {'version': '1.2'}]}, using the first one 2018-03-16 22:21:51 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getStorageList', 'versions': [{'authLevel': 'generic', 'version': '1.1'}, {'version': '1.2'}]}, using the first one 2018-03-16 22:21:51 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getSystemInformation', 'versions': [{'version': '1.3'}, {'version': '1.4'}]}, using the first one 2018-03-16 22:21:52 WARNING (MainThread) [songpal.service] More than on version for {'name': 'connectBluetoothDevice', 'versions': [{'version': '1.0'}, {'version': '1.1'}]}, using the first one 2018-03-16 22:21:52 WARNING (MainThread) [songpal.containers] Got unknowns for Sysinfo: {'bleID': 'EF828129'} - please create an issue!

I have two devices, one SRS-ZR5 and one HT-CT800, which I sometimes group together using the Music Center app. The version of python-songpal I am using is the one provided with Homeassistant 0.65.5.

Send command with Bluetooth

Hi !
I have a CMT-X5CD, which only support bluetooth. It would be awesome to support this kind of device by sending command in Bluetooth.

I don't know how it's hard to achieve and how many code could be reused. If some people have idea how to implement it...
I would love to implement it if it's not too hard to do.

I found an other opensource tool to command sony headphones in bluetooth, there is probably some similarities.
https://github.com/ClusterM/sony-headphones-control

Hassio error. Device - sony kdl43w756c

Hello,
In the latest version of the hassio firmware, I see the following errors. I do not have any devices that support "songpal". Most likely the component is trying to access my TV kdl43w756c. How to eliminate these errors?
Hassio info: version - 0.65.4, image: homeassistant/raspberrypi3-homeassistant.

2018-03-13 20:15:22 ERROR (MainThread) [homeassistant.components.media_player.songpal] Unable to get methods from songpal: <Service system: 0 methods, 0 protocols, 0 notifications does not contain method getSystemInformation
2018-03-13 20:15:22 WARNING (MainThread) [homeassistant.components.media_player] Platform songpal not ready yet. Retrying in 30 seconds.
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for accessControl: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'setTextForm', 'versions': [{'version': '1.1', 'authLevel': 'generic'}, {'version': '1.0', 'authLevel': 'generic'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for appControl: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for appControl: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'setAudioVolume', 'versions': [{'version': '1.0', 'authLevel': 'generic'}, {'version': '1.2', 'authLevel': 'generic'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for audio: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for audio: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'setPlayTvContent', 'versions': [{'version': '1.1', 'authLevel': 'generic'}, {'version': '1.0', 'authLevel': 'generic'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getCurrentExternalInputsStatus', 'versions': [{'version': '1.1'}, {'version': '1.0'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getContentCount', 'versions': [{'version': '1.1', 'authLevel': 'private'}, {'version': '1.0', 'authLevel': 'private'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getContentList', 'versions': [{'version': '1.0', 'authLevel': 'private'}, {'version': '1.2', 'authLevel': 'private'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for avContent: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for avContent: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for browser: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for cec: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for contentshare: Bad status code: 404
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for encryption: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getScheduleList', 'versions': [{'version': '1.1', 'authLevel': 'private'}, {'version': '1.0', 'authLevel': 'private'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'addSchedule', 'versions': [{'version': '1.1', 'authLevel': 'generic'}, {'version': '1.0', 'authLevel': 'generic'}, {'version': '1.2', 'authLevel': 'generic'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for recording: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for recording: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getCurrentTime', 'versions': [{'version': '1.1'}, {'version': '1.0'}]}, using the first one
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for system: Bad status code: 501
2018-03-13 20:15:53 WARNING (MainThread) [songpal.service] Invalid handshake for system: Bad status code: 501
2018-03-13 20:15:54 WARNING (MainThread) [songpal.service] Invalid handshake for videoScreen: Bad status code: 501
2018-03-13 20:15:54 WARNING (MainThread) [songpal.service] Invalid handshake for videoScreen: Bad status code: 501
2018-03-13 20:15:54 ERROR (MainThread) [homeassistant.components.media_player.songpal] Unable to get methods from songpal: <Service system: 0 methods, 0 protocols, 0 notifications does not contain method getSystemInformation
2018-03-13 20:15:54 WARNING (MainThread) [homeassistant.components.media_player] Platform songpal not ready yet. Retrying in 60 seconds.
2018-03-13 20:16:54 WARNING (MainThread) [songpal.service] Invalid handshake for accessControl: Bad status code: 501

Help with finding endpoint on hass.io

hello

relly need some help finding the endpoint in hass.io running on RassP3 it is not posible to do $ songpal discover in ssh. is there anyway else i can find the endpoint.

beside that i get a bunce of errors (check log) but maybe it has somthing to do with some issue.

i have a Sony AMP str dn-1080

Thanks

home-assistant.log

command not found

I am very sorry for this newbie question but I really don't get any clude to solve this issue that blocks me from finding the end point in the first place. (I belive I followed all instructions here but everytime I type 'songpal discover' it only repeats 'command not found'.

I run HA in docker with Raspberry Pi 3, OS version is strech desktop, I had trouble installing python-songpal at first but It was solved after I changed python version to 3.5 by this instruction.
Here's what I had for now.

pi@raspberrypi:~ $ songpal discover
-bash: songpal: command not found

songpal command in the console

I need to subscribe to notifications in my Hassio (Docker), but I cant use 'songpal' command in the console (because is Docker?). It answer me "command not found".

How can I use 'songpal' command in console or in any other way?

Missing support for devices without getSupportedApiInfo (Sony BDV-N5200, HAP-S1, BDV-N9200W)

Hi,

For the past few days, i'm trying to get your project to control my Sony BDV-N5200. But somehow, i can't get it to work. Installation on my Raspberry Pi and discovering the endpoint was all straightforward, but actually trying to control my device got me stuck on an error message i can't figure out:

Setting debug level to 3
DEBUG:root:Using endpoint http://192.168.2.189:10000/sony
DEBUG:songpal.device:Endpoint: http://192.168.2.189:10000/sony
DEBUG:songpal.device:Guide endpoint: http://192.168.2.189:10000/sony/guide
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.2.189:10000
DEBUG:urllib3.connectionpool:http://192.168.2.189:10000 "POST /sony/guide HTTP/1.1" 200 43
DEBUG:songpal.device:Got getSupportedApiInfo: {'error': [12, 'getSupportedApiInfo'], 'id': 1}
Traceback (most recent call last):
  File "/usr/local/bin/songpal", line 11, in <module>
    sys.exit(cli())
  File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/.local/lib/python3.5/site-packages/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "/home/pi/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/.local/lib/python3.5/site-packages/songpal/main.py", line 29, in wrapper
    return loop.run_until_complete(f(*args, **kwargs))
  File "/usr/lib/python3.5/asyncio/base_events.py", line 466, in run_until_complete
    return future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/pi/.local/lib/python3.5/site-packages/songpal/main.py", line 372, in sysinfo
    click.echo(await dev.get_system_info())
  File "/home/pi/.local/lib/python3.5/site-packages/songpal/device.py", line 174, in get_system_info
    return Sysinfo.make(**await self.services["system"]["getSystemInformation"]())
KeyError: 'system'

Whichever command i try, i get the same error message. Any help or a guide in the right direction is highly appreciated!

"no such option: --endpoint" error

songpal version 0.0.9.1

I can use the command line to discover my music server's endpoint, but when I want to use other feature, I always get this error message

Endpoint is required except when with 'discover'!
Usage: songpal list-all [OPTIONS]
Try "songpal list-all --help" for help.

Error: no such option: --endpoint

although i have already set the endpoint as advised on the wiki page, like this

./songpal list-all --endpoint http://192.168.2.240:60200/sony

Add multi-zone support

Some devices offer possibility to have multiple zones with different inputs and outputs (including separate volume controls etc.), support for that could be added.

Relevant discussion and some logs can be found also in #8 .

LSPX-S2 works but...

I confirm the LSPX-S2 model works fine with this integration (source, volume and power control).

But there is a light in this one, any chance to control it also ? :)

image

HT-NT5 support

Thanks for all your efforts implementing this. Just wanted to comment that this works fine via home assistant for a sony HT-NT5. I am able to turn it on / off, change volume, change source and toggle night mode.

Discover gives (not sure if errors matter):

Discovering for 3 seconds
ERROR:ssdp:Error '404 Client Error: Not Found for url: http://192.168.0.83:8008/ssdp/notfound' for http://192.168.0.83:8008/ssdp/device-desc.xml
ERROR:ssdp:Error '404 Client Error: Not Found for url: http://192.168.0.83:8008/ssdp/notfound' for http://192.168.0.83:8008/ssdp/device-desc.xml
ERROR:ssdp:Error '404 Client Error: Not Found for url: http://192.168.0.83:8008/ssdp/notfound' for http://192.168.0.83:8008/ssdp/device-desc.xml
ERROR:ssdp:Error '404 Client Error: Not Found for url: http://192.168.0.83:8008/ssdp/notfound' for http://192.168.0.83:8008/ssdp/device-desc.xml
Found HT-NT5 - BAR-2016
* API version: 1.0
* Endpoint: http://192.168.0.83:10000/sony
* Services:
  - Service: guide
  - Service: system
  - Service: audio
  - Service: avContent

I always see warnings when interacting with the endpoint (maybe this is common?):

WARNING:songpal.service:More than on version for {'name': 'getStorageList', 'versions': [{'authLevel': 'generic', 'version': '1.1'}, {'version': '1.2'}]}, using the first one
WARNING:songpal.service:More than on version for {'name': 'getSystemInformation', 'versions': [{'version': '1.3'}, {'version': '1.4'}]}, using the first one
WARNING:songpal.service:More than on version for {'name': 'getSourceList', 'versions': [{'version': '1.1'}, {'version': '1.2'}]}, using the first one
WARNING:songpal.service:More than on version for {'name': 'getStorageList', 'versions': [{'authLevel': 'generic', 'version': '1.1'}, {'version': '1.2'}]}, using the first one
WARNING:songpal.service:More than on version for {'name': 'getSystemInformation', 'versions': [{'version': '1.3'}, {'version': '1.4'}]}, using the first one

Without knowing anything about the code; would it make sense to choose the newest version, rather than just the first one?

Is there anything you would like me to test? I have the output from dump_devinfo here

Volume down error

Sony HT-NT5
songpal, version 0.0.6

songpal --endpoint http://192.168.1.132:10000/sony volume -5
WARNING:songpal.service:More than on version for {'name': 'getSourceList', 'versions': [{'version': '1.1'}, {'version': '1.2'}]}, using the first one
WARNING:songpal.service:More than on version for {'name': 'getStorageList', 'versions': [{'authLevel': 'generic', 'version': '1.1'}, {'version': '1.2'}]}, using the first one
WARNING:songpal.service:More than on version for {'name': 'getSystemInformation', 'versions': [{'version': '1.3'}, {'version': '1.4'}]}, using the first one
Error: no such option: -5

Install in Hassio (docker)

Readme says: "The easiest way for installing this project is by using pypi inside a virtualenv."
But how can I install and run commands in Hassio?

It is possible?

Error 'empty namespace prefix is not supported in ElementPath'

Model Name: SRS-X77

songpal discover
Discovering for 3 seconds
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.172:5000/ssdp/desc-DSM-eth0.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.172:50001/desc/device.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.172:50001/desc/device.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.172:50001/desc/device.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.172:50001/desc/device.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.172:50001/desc/device.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.172:50001/desc/device.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.1:14504/rootDesc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:54380/SRS-X77_DDD.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:8008/ssdp/device-desc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:8008/ssdp/device-desc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:8008/ssdp/device-desc.xml
ERROR:ssdp:Error 'empty namespace prefix is not supported in ElementPath' for http://192.168.123.35:8008/ssdp/device-desc.xml
android@localhost:~$ songpal --version
songpal, version 0.0.5

image

HT-RT5 support (HT-CT790 + two SRS-ZR5) Surround Sound

Hello rytilahti,
is it possible to activate and deactivate the Surround Sound via your python-songpal? (I have the HT-RT5. This is a package that includes one HT-CT790 with two SRS-ZR5 Speakers) Its possible to activate and deactivate Sourround Sound via the HT-CT790 Menu or the new Sony "Music Center" App. The "Music Center" app should use the API Interfaces, therefore it should be able to achieve the same goal via your python-songpal.

Got unknowns for ContentChange

Just noticed a bunch of warnings for songpal in my HA log that I wanted to share (because it told me to!);

[songpal.containers] Got unknowns for ContentChange: {'stateInfo': {'state': 'STOPPED', 'supplement': 'noMedia'}} - please create an issue!

Happy to help debug / test if needed.

use homeassistant when change source of SRS-X99 always get short disconnecting

Basic information

arch: armv7l
dev: false
docker: true
hassio: true
os_name: Linux
os_version: 4.19.97-v7l+
python_version: 3.7.7
timezone: Europe/Berlin
version: 0.108.9
virtualenv: false
Logger: homeassistant.components.songpal.media_player
Source: components/songpal/media_player.py:180
Integration: songpal (documentation, issues)
First occurred: 下午8:09:40 (8 occurrences)
Last logged: 下午8:24:52

Got disconnected with Unable to make a request: 'extInput:line': None, trying to reconnect.
Logger: songpal.service
Source: __main__.py:342
First occurred: 下午8:09:35 (14 occurrences)
Last logged: 下午8:24:50

Got unknown notification type: notifyAvailablePlaybackFunction - params: [{'functions': [], 'uri': 'dlna:music'}]

I always got this two error when i try to change input source of my SRS-X99. The speaker will disconnecting immediately and then in 2~3s reconnecting. Could you please fix this issue? Thanks a lot for your great work!

SRS-X88 status/output

On to the next set of issues with the SRS-X88:

songpal --endpoint http://192.168.1.18:54480/sony status
Power on
(output truncated)
  File "/home/sean/python3/lib/python3.5/site-packages/songpal/main.py", line 103, in status
    vol = await dev.get_volume_information()
  File "/home/sean/python3/lib/python3.5/site-packages/songpal/protocol.py", line 254, in get_volume_information
    volume_info = [Volume(self.services, **x) for x in res]
  File "/home/sean/python3/lib/python3.5/site-packages/songpal/protocol.py", line 254, in <listcomp>
    volume_info = [Volume(self.services, **x) for x in res]
TypeError: __init__() missing 1 required positional argument: 'output'

Calling output on its own:

songpal --endpoint http://192.168.1.18:54480/sony output
Traceback (most recent call last):
(ouput truncated)
  File "/home/sean/python3/lib/python3.5/site-packages/songpal/protocol.py", line 176, in get_outputs
    return [Output(self.services, **x) for x in res]
  File "/home/sean/python3/lib/python3.5/site-packages/songpal/protocol.py", line 176, in <listcomp>
    return [Output(self.services, **x) for x in res]
TypeError: __init__() missing 3 required positional arguments: 'active', 'label', and 'iconUrl'

When I run it with debug on I get the following before the traceback:

DEBUG:songpal.method:got res: {'id': 12,
 'result': [[{'connection': 'unknown',
              'meta': 'meta:usbdac',
              'title': 'USB DAC',
              'uri': 'extInput:usbDac'},
             {'connection': 'unknown',
              'meta': 'meta:btaudio',
              'title': 'Bluetooth Audio',
              'uri': 'extInput:btAudio'},
             {'connection': 'unknown',
              'meta': 'meta:line',
              'title': 'Audio in',
              'uri': 'extInput:line?port=1'}]]}

So it looks like it's finding a partial list but not indicating which is currently selected.

Incidentally is this actually the set of inputs (i.e. sources) rather than outputs? If so I'd expect to see the network inputs in the list - the device supports Chromecast and Spotify.

Let me know if you want a full dump_devinfo or full debug output for any of the commands or if there are any other commands you'd like me to try.

ST DN 1070 errors in logs

Happy to report that this is working on ST DN 1070 via Home Assistant (Hass.io). But running into some issues:

  • Soundcontrols do not work via Home Assistant

And I get the following errors in the log. I have very little experience in programming, but happy to help if possible! I love to be able to control my receiver via HA!

2018-03-12 19:11:01 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getSourceList', 'versions': [{'version': '1.1'}, {'version': '1.2'}]}, using the first one 2018-03-12 19:11:01 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getStorageList', 'versions': [{'authLevel': 'generic', 'version': '1.1'}, {'version': '1.2'}]}, using the first one 2018-03-12 19:11:01 WARNING (MainThread) [songpal.service] More than on version for {'name': 'getSystemInformation', 'versions': [{'version': '1.3'}, {'version': '1.4'}]}, using the first one 2018-03-12 19:11:02 WARNING (MainThread) [root] The device seems to have more than one volume setting. 2018-03-12 19:11:02 WARNING (MainThread) [homeassistant.components.media_player.songpal] Got [Volume(maxVolume=55, minVolume=0, mute='off', output='extOutput:zone?zone=1', step=1, volume=11), Volume(maxVolume=55, minVolume=0, mute='off', output='extOutput:zone?zone=2', step=0, volume=-1), Volume(maxVolume=55, minVolume=0, mute='off', output='extOutput:zone?zone=3', step=0, volume=-1), Volume(maxVolume=55, minVolume=0, mute='off', output='extOutput:zone?zone=4', step=0, volume=-1)] volume controls, using the first one 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=2', 'extOutput:zone?zone=3', 'extOutput:zone?zone=4']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=4']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=4']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2', 'extOutput:zone?zone=3', 'extOutput:zone?zone=4']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2', 'extOutput:zone?zone=3']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=4']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2', 'extOutput:zone?zone=3', 'extOutput:zone?zone=4']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [songpal.containers] Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2', 'extOutput:zone?zone=3']} - please create an issue! 2018-03-12 19:11:02 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Zolderraam sensor, the state is unknown. 2018-03-12 19:11:02 WARNING (MainThread) [homeassistant.components.sensor.template] Could not render template Bewegingsmelder 1, the state is unknown.

HT-NT5. Warnings / errors in HA log

HT-NT5
After updating Home Assistant to 0.85.+ I get warnings / errors in the log
After restart HA:

Log Details (WARNING)
Sun Jan 13 2019 08:48:04 GMT+0100 (CET)
Got duplicate signature for MethodSignature(name='getSourceList', input={'scheme': <class 'str'>}, output={'source': <class 'str'>, 'title': <class 'str'>, 'isPlayable': 'bool', 'isBrowsable': 'bool', 'playAction': <class 'str'>, 'outputs': 'string*', 'meta': <class 'str'>, 'iconUrl': <class 'str'>, 'protocols': 'string*', 'upnpOperationInfo': 'UpnpOperationInfo'}, version='1.2'), existing was <Method avContent.getSourceList({'scheme': <class 'str'>}) -> {'iconUrl': <class 'str'>,
 'isBrowsable': 'bool',
 'isPlayable': 'bool',
 'meta': <class 'str'>,
 'outputs': 'string*',
 'playAction': <class 'str'>,
 'source': <class 'str'>,
 'title': <class 'str'>}>. Keeping the existing one

Log Details (WARNING) 
Sun Jan 13 2019 08:48:05 GMT+0100 (CET)
Got duplicate signature for MethodSignature(name='getStorageList', input={'uri': <class 'str'>, 'isRegistered': <class 'str'>}, output={'uri': <class 'str'>, 'deviceName': <class 'str'>, 'volumeLabel': <class 'str'>, 'permission': <class 'str'>, 'position': <class 'str'>, 'formattable': <class 'str'>, 'mounted': <class 'str'>, 'wholeCapacityMB': <class 'int'>, 'freeCapacityMB': <class 'int'>, 'systemAreaCapacityMB': <class 'int'>, 'isAvailable': <class 'str'>, 'lun': <class 'int'>, 'type': <class 'str'>, 'protocol': <class 'str'>, 'format': <class 'str'>, 'error': <class 'str'>, 'isRegistered': <class 'str'>, 'registrationDate': <class 'str'>, 'isSqvSupported': <class 'str'>, 'hasNonStandardData': <class 'str'>, 'isProtected': <class 'str'>, 'isLocked': <class 'str'>, 'formatStatus': <class 'str'>, 'finalizeStatus': <class 'str'>, 'timeSecToFinalize': <class 'int'>, 'isSelfRecorded': <class 'str'>, 'isManagementInfoFull': <class 'str'>, 'timeSecToGetContents': <class 'int'>, 'hasUnsupportedContents': <class 'str'>, 'usbDeviceType': <class 'str'>, 'fileSystem': <class 'str'>}, version='1.2'), existing was <Method system.getStorageList({'uri': <class 'str'>}) -> {'deviceName': <class 'str'>,
 'error': <class 'str'>,
 'format': <class 'str'>,
 'formattable': <class 'str'>,
 'formatting': <class 'str'>,
 'freeCapacityMB': <class 'int'>,
 'isAvailable': <class 'str'>,
 'lun': <class 'int'>,
 'mounted': <class 'str'>,
 'permission': <class 'str'>,
 'position': <class 'str'>,
 'systemAreaCapacityMB': <class 'int'>,
 'type': <class 'str'>,
 'uri': <class 'str'>,
 'volumeLabel': <class 'str'>,
 'wholeCapacityMB': <class 'int'>}>. Keeping the existing one

Log Details (WARNING)
Sun Jan 13 2019 08:48:05 GMT+0100 (CET)
Got duplicate signature for MethodSignature(name='getSystemInformation', input=None, output={'product': <class 'str'>, 'region': <class 'str'>, 'language': <class 'str'>, 'model': <class 'str'>, 'serial': <class 'str'>, 'macAddr': <class 'str'>, 'name': <class 'str'>, 'generation': <class 'str'>, 'area': <class 'str'>, 'cid': <class 'str'>, 'helpUrl': <class 'str'>, 'deviceID': <class 'str'>, 'version': <class 'str'>, 'duid': <class 'str'>, 'wirelessMacAddr': <class 'str'>, 'esn': <class 'str'>, 'iconUrl': <class 'str'>, 'ssid': <class 'str'>, 'bdAddr': <class 'str'>, 'initialPowerOnTime': <class 'str'>, 'lastPowerOnTime': <class 'str'>, 'bleID': <class 'str'>}, version='1.4'), existing was <Method system.getSystemInformation(None) -> {'area': <class 'str'>,
 'bdAddr': <class 'str'>,
 'cid': <class 'str'>,
 'deviceID': <class 'str'>,
 'duid': <class 'str'>,
 'esn': <class 'str'>,
 'generation': <class 'str'>,
 'helpUrl': <class 'str'>,
 'iconUrl': <class 'str'>,
 'language': <class 'str'>,
 'macAddr': <class 'str'>,
 'model': <class 'str'>,
 'name': <class 'str'>,
 'product': <class 'str'>,
 'region': <class 'str'>,
 'serial': <class 'str'>,
 'ssid': <class 'str'>,
 'updatableVersion': <class 'str'>,
 'version': <class 'str'>,
 'wirelessMacAddr': <class 'str'>}>. Keeping the existing one

Sometimes when I listen spotify on my soundbar:

Log Details (WARNING)
Sun Jan 13 2019 13:03:04 GMT+0100 (CET)
Got non-handled content change: ContentChange(contentKind='service', service='netService:audio?service=spotify', source='netService:audio', uri='netService:audio?service=spotify', applicationName=None)
Log Details (ERROR)
Sun Jan 13 2019 13:03:04 GMT+0100 (CET)
Got disconnected with Unable to make a request: 'NoneType' object is not subscriptable: None, trying to reconnect.

Log Details (WARNING)
Sun Jan 13 2019 16:34:37 GMT+0100 (CET)
Got non-handled content change: ContentChange(contentKind='service', service='netService:audio?service=spotify', source='netService:audio', uri='netService:audio?service=spotify', applicationName=None)
Log Details (ERROR)
Sun Jan 13 2019 16:34:37 GMT+0100 (CET)
Got disconnected with Unable to make a request: 'NoneType' object is not subscriptable: None, trying to reconnect.

Home Assistant warnings with SRS-ZR7

Everything is working fine with both my ZR7s, besides the following warnings:

Got unknowns for Sysinfo: {'bleID': '4ACC54EA'} - please create an issue!
Got unknowns for Sysinfo: {'bleID': '3EDA50EF'} - please create an issue!

... which seems to lead to:

homeassistant.exceptions.HomeAssistantError: Entity id already exists: media_player.office_speaker. Platform songpal does not generate unique IDs

Got unknowns for Input STR DN1080

Hello,
I have these errors using HomeAssistant 0.65-0.66 on Docker (Synology). My amplifier is a STR-DN1080

Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2', 'extOutput:zone?zone=4']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=4']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=2', 'extOutput:zone?zone=4']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=4']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=1', 'extOutput:zone?zone=4']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got unknowns for Input: {'outputs': ['extOutput:zone?zone=2', 'extOutput:zone?zone=4']} - please create an issue!
14:12 components/media_player/songpal.py (WARNING)
Got [Volume(maxVolume=55, minVolume=0, mute='off', output='extOutput:zone?zone=1', step=1, volume=6), Volume(maxVolume=55, minVolume=0, mute='off', output='extOutput:zone?zone=2', step=0, volume=-1), Volume(maxVolume=55, minVolume=0, mute='off', output='extOutput:zone?zone=4', step=0, volume=-1)] volume controls, using the first one
14:12 components/media_player/songpal.py (WARNING)
The device seems to have more than one volume setting.
14:12 components/media_player/songpal.py (WARNING)

Trouble setting sound mode (soundField) or clearAudio on HT-XT2

I'm trying to configure the sound mode on my HT-XT2 with songpal, but I always get this error when trying to change it:

Error: Got an error for setSoundSettings: [15, 'unsupported operation']: UnsupportedOperation (15): unsupported operation

Available sound settings:

* ClearAudio+  (clearAudio, value: on, type: booleanTarget)
  - On (on)
* Sound Field (soundField, value: clearAudio, type: enumTarget)
  - ClearAudio+  (clearAudio)
  - Movie (movie)
  - Music (music)
  - Sports (sports)
  - Game Studio (game)
  - Standard (standard)
* IDMR_TEXT_FOOTBALL_STRING (footballMode, value: off, type: enumTarget)
  - IDMR_TEXT_NARRATION_ON_STRING (on)
  - IDMR_TEXT_NARRATION_OFF_STRING (on_narration_off)
  - Off (off)
* Night (nightMode, value: off, type: booleanTarget)
  - On (on)
  - Off (off)
* Voice (voice, value: type1, type: enumTarget)
  - Up Off (type1)
  - Up 1 (type2)
  - Up 2 (type3)
* Subwoofer Volume (subwooferLevel, value: 8, type: integerTarget)
  - Subwoofer Volume (subwooferLevel)
* A/V SYNC (avSyncMs, value: 0, type: integerTarget)
  - A/V SYNC (avSyncMs)
* Dual Mono (dualMono, value: main, type: enumTarget)
  - Main/Sub (main_sub)
  - Main (main)
  - Sub (sub)

Both songpal sound clearAudio on and songpal sound soundField game return the error mentioned above. Any tips on how I could help solve this or investigate further myself?

songpal -d sound soundField game
Setting debug level to 1
DEBUG:root:Using endpoint http://192.168.178.192:10000/sony
DEBUG:songpal.device:Endpoint: http://192.168.178.192:10000/sony
DEBUG:songpal.device:Guide endpoint: http://192.168.178.192:10000/sony/guide
DEBUG:songpal.device:Got 4 services!
DEBUG:songpal.service:Available protocols for audio: ['xhrpost:jsonizer', 'websocket:jsonizer']
DEBUG:songpal.service:Using protocol: ProtocolType.WebSocket
DEBUG:songpal.notification:notification payload: {'name': 'notifyVolumeInformation', 'versions': [{'version': '1.0'}]}
DEBUG:songpal.notification:notification payload: {'name': 'notifyWirelessSurroundInfo', 'versions': [{'version': '1.0'}]}
DEBUG:songpal.service:Got notifications: [<Notification notifyVolumeInformation, versions=[{'version': '1.0'}], endpoint=http://192.168.178.192:10000/sony/audio>, <Notification notifyWirelessSurroundInfo, versions=[{'version': '1.0'}], endpoint=http://192.168.178.192:10000/sony/audio>]
DEBUG:songpal.service:Available protocols for avContent: ['xhrpost:jsonizer', 'websocket:jsonizer']
DEBUG:songpal.service:Using protocol: ProtocolType.WebSocket
DEBUG:songpal.service:Got duplicate signature for MethodSignature(name='getSourceList', input={'scheme': <class 'str'>}, output={'source': <class 'str'>, 'title': <class 'str'>, 'isPlayable': 'bool', 'isBrowsable': 'bool', 'playAction': <class 'str'>, 'outputs': 'string*', 'meta': <class 'str'>, 'iconUrl': <class 'str'>, 'protocols': 'string*', 'upnpOperationInfo': 'UpnpOperationInfo'}, version='1.2'), existing was <Method avContent.getSourceList({'scheme': <class 'str'>}) -> {'iconUrl': <class 'str'>,
 'isBrowsable': 'bool',
 'isPlayable': 'bool',
 'meta': <class 'str'>,
 'outputs': 'string*',
 'playAction': <class 'str'>,
 'source': <class 'str'>,
 'title': <class 'str'>}>, keeping it.
DEBUG:songpal.notification:notification payload: {'name': 'notifyAvailablePlaybackFunction', 'versions': [{'version': '1.0'}]}
DEBUG:songpal.notification:notification payload: {'name': 'notifyExternalTerminalStatus', 'versions': [{'version': '1.0'}]}
DEBUG:songpal.notification:notification payload: {'name': 'notifyPlayingContentInfo',
 'versions': [{'authLevel': 'private', 'version': '1.0'}]}
DEBUG:songpal.service:Got notifications: [<Notification notifyAvailablePlaybackFunction, versions=[{'version': '1.0'}], endpoint=http://192.168.178.192:10000/sony/avContent>, <Notification notifyExternalTerminalStatus, versions=[{'version': '1.0'}], endpoint=http://192.168.178.192:10000/sony/avContent>, <Notification notifyPlayingContentInfo, versions=[{'authLevel': 'private', 'version': '1.0'}], endpoint=http://192.168.178.192:10000/sony/avContent>]
DEBUG:songpal.service:Available protocols for guide: ['xhrpost:jsonizer']
DEBUG:songpal.service:Using protocol: ProtocolType.XHRPost
DEBUG:songpal.service:Available protocols for system: ['xhrpost:jsonizer', 'websocket:jsonizer']
DEBUG:songpal.service:Using protocol: ProtocolType.WebSocket
DEBUG:songpal.service:Got duplicate signature for MethodSignature(name='getStorageList', input={'uri': <class 'str'>, 'isRegistered': <class 'str'>}, output={'uri': <class 'str'>, 'deviceName': <class 'str'>, 'volumeLabel': <class 'str'>, 'permission': <class 'str'>, 'position': <class 'str'>, 'formattable': <class 'str'>, 'mounted': <class 'str'>, 'wholeCapacityMB': <class 'int'>, 'freeCapacityMB': <class 'int'>, 'systemAreaCapacityMB': <class 'int'>, 'isAvailable': <class 'str'>, 'lun': <class 'int'>, 'type': <class 'str'>, 'protocol': <class 'str'>, 'format': <class 'str'>, 'error': <class 'str'>, 'isRegistered': <class 'str'>, 'registrationDate': <class 'str'>, 'isSqvSupported': <class 'str'>, 'hasNonStandardData': <class 'str'>, 'isProtected': <class 'str'>, 'isLocked': <class 'str'>, 'formatStatus': <class 'str'>, 'finalizeStatus': <class 'str'>, 'timeSecToFinalize': <class 'int'>, 'isSelfRecorded': <class 'str'>, 'isManagementInfoFull': <class 'str'>, 'timeSecToGetContents': <class 'int'>, 'hasUnsupportedContents': <class 'str'>, 'usbDeviceType': <class 'str'>, 'fileSystem': <class 'str'>}, version='1.2'), existing was <Method system.getStorageList({'uri': <class 'str'>}) -> {'deviceName': <class 'str'>,
 'error': <class 'str'>,
 'format': <class 'str'>,
 'formattable': <class 'str'>,
 'formatting': <class 'str'>,
 'freeCapacityMB': <class 'int'>,
 'isAvailable': <class 'str'>,
 'lun': <class 'int'>,
 'mounted': <class 'str'>,
 'permission': <class 'str'>,
 'position': <class 'str'>,
 'systemAreaCapacityMB': <class 'int'>,
 'type': <class 'str'>,
 'uri': <class 'str'>,
 'volumeLabel': <class 'str'>,
 'wholeCapacityMB': <class 'int'>}>, keeping it.
DEBUG:songpal.service:Got duplicate signature for MethodSignature(name='getSystemInformation', input=None, output={'product': <class 'str'>, 'region': <class 'str'>, 'language': <class 'str'>, 'model': <class 'str'>, 'serial': <class 'str'>, 'macAddr': <class 'str'>, 'name': <class 'str'>, 'generation': <class 'str'>, 'area': <class 'str'>, 'cid': <class 'str'>, 'helpUrl': <class 'str'>, 'deviceID': <class 'str'>, 'version': <class 'str'>, 'duid': <class 'str'>, 'wirelessMacAddr': <class 'str'>, 'esn': <class 'str'>, 'iconUrl': <class 'str'>, 'ssid': <class 'str'>, 'bdAddr': <class 'str'>, 'initialPowerOnTime': <class 'str'>, 'lastPowerOnTime': <class 'str'>, 'bleID': <class 'str'>}, version='1.4'), existing was <Method system.getSystemInformation(None) -> {'area': <class 'str'>,
 'bdAddr': <class 'str'>,
 'cid': <class 'str'>,
 'deviceID': <class 'str'>,
 'duid': <class 'str'>,
 'esn': <class 'str'>,
 'generation': <class 'str'>,
 'helpUrl': <class 'str'>,
 'iconUrl': <class 'str'>,
 'language': <class 'str'>,
 'macAddr': <class 'str'>,
 'model': <class 'str'>,
 'name': <class 'str'>,
 'product': <class 'str'>,
 'region': <class 'str'>,
 'serial': <class 'str'>,
 'ssid': <class 'str'>,
 'updatableVersion': <class 'str'>,
 'version': <class 'str'>,
 'wirelessMacAddr': <class 'str'>}>, keeping it.
DEBUG:songpal.notification:notification payload: {'name': 'notifyPowerStatus', 'versions': [{'version': '1.0'}]}
DEBUG:songpal.notification:notification payload: {'name': 'notifySWUpdateInfo', 'versions': [{'version': '1.0'}]}
DEBUG:songpal.notification:notification payload: {'name': 'notifySettingsUpdate', 'versions': [{'version': '1.1'}]}
DEBUG:songpal.notification:notification payload: {'name': 'notifyStorageStatus',
 'versions': [{'authLevel': 'generic', 'version': '1.1'}, {'version': '1.2'}]}
DEBUG:songpal.service:Got notifications: [<Notification notifyPowerStatus, versions=[{'version': '1.0'}], endpoint=http://192.168.178.192:10000/sony/system>, <Notification notifySWUpdateInfo, versions=[{'version': '1.0'}], endpoint=http://192.168.178.192:10000/sony/system>, <Notification notifySettingsUpdate, versions=[{'version': '1.1'}], endpoint=http://192.168.178.192:10000/sony/system>, <Notification notifyStorageStatus, versions=[{'authLevel': 'generic', 'version': '1.1'}, {'version': '1.2'}], endpoint=http://192.168.178.192:10000/sony/system>]
Setting soundField to game
DEBUG:songpal.service:setSoundSettings got called with args (({'settings': [{'target': 'soundField', 'value': 'game'}]},)) kwargs ({})
DEBUG:songpal.method:<Method audio.setSoundSettings({'settings': 'GeneralSettings[]'}) -> None>
Error: Got an error for setSoundSettings: [15, 'unsupported operation']: UnsupportedOperation (15): unsupported operation
Traceback (most recent call last):
  File "/Users/strayer/tmp/./songpal/bin/songpal", line 8, in <module>
    sys.exit(cli())
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/click/decorators.py", line 73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/songpal/main.py", line 57, in wrapper
    raise ex
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/songpal/main.py", line 48, in wrapper
    return loop.run_until_complete(f(*args, **kwargs))
  File "/Users/strayer/.asdf/installs/python/3.9.1/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/songpal/main.py", line 483, in sound
    click.echo(await dev.set_sound_settings(target, value))
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/songpal/device.py", line 417, in set_sound_settings
    return await self.services["audio"]["setSoundSettings"](params)
  File "/Users/strayer/tmp/songpal/lib/python3.9/site-packages/songpal/method.py", line 131, in __call__
    raise SongpalException(
songpal.common.SongpalException: Got an error for setSoundSettings: [15, 'unsupported operation']: UnsupportedOperation (15): unsupported operation
dump-devinfo
{
    "interface_info": {
        "interfaceVersion": "3.1.0",
        "modelName": "HT-XT2",
        "productCategory": "homeTheaterSystem",
        "productName": "Bar",
        "serverName": ""
    },
    "settings": [
        {
            "apiMapping": null,
            "deviceUIInfo": null,
            "isAvailable": true,
            "settings": [
                {
                    "apiMapping": null,
                    "deviceUIInfo": null,
                    "isAvailable": true,
                    "settings": [
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getSoundSettings",
                                    "version": "1.1"
                                },
                                "service": "audio",
                                "setApi": {
                                    "name": "setSoundSettings",
                                    "version": "1.1"
                                },
                                "target": "clearAudio",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": false,
                            "settings": null,
                            "title": "ClearAudio+ ",
                            "titleTextID": "sound-clearaudio",
                            "type": "booleanTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getSoundSettings",
                                    "version": "1.1"
                                },
                                "service": "audio",
                                "setApi": {
                                    "name": "setSoundSettings",
                                    "version": "1.1"
                                },
                                "target": "soundField",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": "soundFieldFig",
                            "isAvailable": false,
                            "settings": null,
                            "title": "Sound Field",
                            "titleTextID": "sound-soundfield",
                            "type": "enumTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getSoundSettings",
                                    "version": "1.1"
                                },
                                "service": "audio",
                                "setApi": {
                                    "name": "setSoundSettings",
                                    "version": "1.1"
                                },
                                "target": "nightMode",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Night",
                            "titleTextID": "sound-night",
                            "type": "booleanTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getSoundSettings",
                                    "version": "1.1"
                                },
                                "service": "audio",
                                "setApi": {
                                    "name": "setSoundSettings",
                                    "version": "1.1"
                                },
                                "target": "voice",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Voice",
                            "titleTextID": "sound-voice",
                            "type": "enumTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getSoundSettings",
                                    "version": "1.1"
                                },
                                "service": "audio",
                                "setApi": {
                                    "name": "setSoundSettings",
                                    "version": "1.1"
                                },
                                "target": "subwooferLevel",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": "sliderHorizon",
                            "isAvailable": true,
                            "settings": null,
                            "title": "Subwoofer Volume",
                            "titleTextID": "sound-subwoofer",
                            "type": "integerTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": null,
                            "deviceUIInfo": null,
                            "isAvailable": false,
                            "settings": [
                                {
                                    "apiMapping": {
                                        "getApi": {
                                            "name": "getSoundSettings",
                                            "version": "1.1"
                                        },
                                        "service": "audio",
                                        "setApi": {
                                            "name": "setSoundSettings",
                                            "version": "1.1"
                                        },
                                        "target": "avSyncMs",
                                        "targetSuppl": null
                                    },
                                    "deviceUIInfo": "picker",
                                    "isAvailable": true,
                                    "settings": null,
                                    "title": "A/V SYNC",
                                    "titleTextID": "sound-adjustment-avsync",
                                    "type": "integerTarget",
                                    "usage": null
                                },
                                {
                                    "apiMapping": {
                                        "getApi": {
                                            "name": "getSoundSettings",
                                            "version": "1.1"
                                        },
                                        "service": "audio",
                                        "setApi": {
                                            "name": "setSoundSettings",
                                            "version": "1.1"
                                        },
                                        "target": "dualMono",
                                        "targetSuppl": null
                                    },
                                    "deviceUIInfo": null,
                                    "isAvailable": true,
                                    "settings": null,
                                    "title": "Dual Mono",
                                    "titleTextID": "sound-adjustment-dualmono",
                                    "type": "enumTarget",
                                    "usage": null
                                }
                            ],
                            "title": "Sound Adjustments",
                            "titleTextID": "sound-adjustment",
                            "type": "directory",
                            "usage": null
                        }
                    ],
                    "title": "Sound Settings",
                    "titleTextID": "sound",
                    "type": "directory",
                    "usage": null
                },
                {
                    "apiMapping": null,
                    "deviceUIInfo": null,
                    "isAvailable": true,
                    "settings": [
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getSWUpdateInfo",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": {
                                    "name": "actSWUpdate",
                                    "version": "1.0"
                                },
                                "target": null,
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Software Update",
                            "titleTextID": "system-update",
                            "type": "nullTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getPowerSettings",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": {
                                    "name": "setPowerSettings",
                                    "version": "1.0"
                                },
                                "target": "quickStartMode",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": "",
                            "isAvailable": true,
                            "settings": null,
                            "title": "Quick Start/Network Standby",
                            "titleTextID": "system-networkstandby",
                            "type": "booleanTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getDeviceMiscSettings",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": {
                                    "name": "setDeviceMiscSettings",
                                    "version": "1.0"
                                },
                                "target": "deviceName",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Device Name",
                            "titleTextID": "system-networkdevicename",
                            "type": "stringTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getDeviceMiscSettings",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": {
                                    "name": "setDeviceMiscSettings",
                                    "version": "1.0"
                                },
                                "target": "swAutoUpdate",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Auto Update ",
                            "titleTextID": "system-autoupdate",
                            "type": "booleanTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getDeviceMiscSettings",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": {
                                    "name": "setDeviceMiscSettings",
                                    "version": "1.0"
                                },
                                "target": "timeZone",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Time Zone",
                            "titleTextID": "system-timezone",
                            "type": "stringTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getSystemInformation",
                                    "version": "1.3"
                                },
                                "service": "system",
                                "setApi": null,
                                "target": "",
                                "targetSuppl": "version"
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "HT-XT2 Software Version",
                            "titleTextID": "other-htversion-TBD",
                            "type": "stringTarget",
                            "usage": null
                        }
                    ],
                    "title": "System",
                    "titleTextID": "system",
                    "type": "directory",
                    "usage": null
                }
            ],
            "title": null,
            "titleTextID": null,
            "type": "directory",
            "usage": "deviceConfig"
        },
        {
            "apiMapping": null,
            "deviceUIInfo": null,
            "isAvailable": true,
            "settings": [
                {
                    "apiMapping": null,
                    "deviceUIInfo": null,
                    "isAvailable": true,
                    "settings": [
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getPlaybackModeSettings",
                                    "version": "1.0"
                                },
                                "service": "avContent",
                                "setApi": {
                                    "name": "setPlaybackModeSettings",
                                    "version": "1.0"
                                },
                                "target": "repeatType",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Repeat",
                            "titleTextID": "playbackMode-repeatType",
                            "type": "enumTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getPlaybackModeSettings",
                                    "version": "1.0"
                                },
                                "service": "avContent",
                                "setApi": {
                                    "name": "setPlaybackModeSettings",
                                    "version": "1.0"
                                },
                                "target": "shuffleType",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Shuffle",
                            "titleTextID": "playbackMode-shuffleType",
                            "type": "enumTarget",
                            "usage": null
                        }
                    ],
                    "title": "Playback Mode",
                    "titleTextID": "playbackMode",
                    "type": "directory",
                    "usage": null
                }
            ],
            "title": null,
            "titleTextID": null,
            "type": "directory",
            "usage": "playingControl"
        },
        {
            "apiMapping": null,
            "deviceUIInfo": null,
            "isAvailable": true,
            "settings": [
                {
                    "apiMapping": {
                        "getApi": {
                            "name": "getPowerSettings",
                            "version": "1.0"
                        },
                        "service": "system",
                        "setApi": {
                            "name": "setPowerSettings",
                            "version": "1.0"
                        },
                        "target": "quickStartMode",
                        "targetSuppl": null
                    },
                    "deviceUIInfo": "",
                    "isAvailable": true,
                    "settings": null,
                    "title": "Quick Start/Network Standby",
                    "titleTextID": "system-networkstandby",
                    "type": "booleanTarget",
                    "usage": null
                },
                {
                    "apiMapping": {
                        "getApi": {
                            "name": "getDeviceMiscSettings",
                            "version": "1.0"
                        },
                        "service": "system",
                        "setApi": {
                            "name": "setDeviceMiscSettings",
                            "version": "1.0"
                        },
                        "target": "swAutoUpdate",
                        "targetSuppl": null
                    },
                    "deviceUIInfo": null,
                    "isAvailable": true,
                    "settings": null,
                    "title": "Auto Update ",
                    "titleTextID": "system-autoupdate",
                    "type": "booleanTarget",
                    "usage": null
                },
                {
                    "apiMapping": {
                        "getApi": {
                            "name": "getDeviceMiscSettings",
                            "version": "1.0"
                        },
                        "service": "system",
                        "setApi": {
                            "name": "setDeviceMiscSettings",
                            "version": "1.0"
                        },
                        "target": "timeZone",
                        "targetSuppl": null
                    },
                    "deviceUIInfo": null,
                    "isAvailable": true,
                    "settings": null,
                    "title": "Time Zone",
                    "titleTextID": "system-timezone",
                    "type": "stringTarget",
                    "usage": null
                }
            ],
            "title": null,
            "titleTextID": null,
            "type": "directory",
            "usage": "initialSetting"
        },
        {
            "apiMapping": null,
            "deviceUIInfo": null,
            "isAvailable": true,
            "settings": [
                {
                    "apiMapping": null,
                    "deviceUIInfo": null,
                    "isAvailable": true,
                    "settings": [
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getWuTangInfo",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": {
                                    "name": "setWuTangInfo",
                                    "version": "1.0"
                                },
                                "target": "privacySetting",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Share usage data",
                            "titleTextID": "googlecast-shareusagedata",
                            "type": "booleanTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getWuTangInfo",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": {
                                    "name": "setWuTangInfo",
                                    "version": "1.0"
                                },
                                "target": "activateStatus",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Activate status",
                            "titleTextID": "googlecast-activatestatus",
                            "type": "booleanTarget",
                            "usage": null
                        },
                        {
                            "apiMapping": {
                                "getApi": {
                                    "name": "getWuTangInfo",
                                    "version": "1.0"
                                },
                                "service": "system",
                                "setApi": null,
                                "target": "currentVersion",
                                "targetSuppl": null
                            },
                            "deviceUIInfo": null,
                            "isAvailable": true,
                            "settings": null,
                            "title": "Version number",
                            "titleTextID": "googlecast-versionnumber",
                            "type": "stringTarget",
                            "usage": null
                        }
                    ],
                    "title": "Google Cast",
                    "titleTextID": "googlecast",
                    "type": "directory",
                    "usage": null
                }
            ],
            "title": null,
            "titleTextID": null,
            "type": "directory",
            "usage": "wuTangSetting"
        }
    ],
    "supported_methods": {
        "audio": {
            "methods": {
                "getCustomEqualizerSettings": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getCustomEqualizerSettings",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "audio",
                    "version": "1.0"
                },
                "getMethodTypes": {
                    "input": "str",
                    "name": "getMethodTypes",
                    "output": "str",
                    "service": "audio",
                    "version": "1.0"
                },
                "getSoundSettings": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getSoundSettings",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "audio",
                    "version": "1.1"
                },
                "getSpeakerSettings": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getSpeakerSettings",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "audio",
                    "version": "1.0"
                },
                "getVersions": {
                    "input": null,
                    "name": "getVersions",
                    "output": "str",
                    "service": "audio",
                    "version": "1.0"
                },
                "getVolumeInformation": {
                    "input": {
                        "output": "str"
                    },
                    "name": "getVolumeInformation",
                    "output": {
                        "maxVolume": "int",
                        "minVolume": "int",
                        "mute": "str",
                        "output": "str",
                        "step": "int",
                        "volume": "int"
                    },
                    "service": "audio",
                    "version": "1.1"
                },
                "setAudioMute": {
                    "input": {
                        "mute": "str",
                        "output": "str"
                    },
                    "name": "setAudioMute",
                    "output": null,
                    "service": "audio",
                    "version": "1.1"
                },
                "setAudioVolume": {
                    "input": {
                        "output": "str",
                        "volume": "str"
                    },
                    "name": "setAudioVolume",
                    "output": null,
                    "service": "audio",
                    "version": "1.1"
                },
                "setCustomEqualizerSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setCustomEqualizerSettings",
                    "output": null,
                    "service": "audio",
                    "version": "1.0"
                },
                "setSoundSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setSoundSettings",
                    "output": null,
                    "service": "audio",
                    "version": "1.1"
                },
                "setSpeakerSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setSpeakerSettings",
                    "output": null,
                    "service": "audio",
                    "version": "1.0"
                },
                "switchNotifications": {
                    "input": {
                        "disabled": "ApiIdentity[]",
                        "enabled": "ApiIdentity[]"
                    },
                    "name": "switchNotifications",
                    "output": {
                        "disabled": "ApiIdentity[]",
                        "enabled": "ApiIdentity[]",
                        "unsupported": "ApiIdentity[]"
                    },
                    "service": "audio",
                    "version": "1.0"
                }
            },
            "notifications": {
                "notifyVolumeInformation": {
                    "name": "notifyVolumeInformation",
                    "version": "1.0"
                },
                "notifyWirelessSurroundInfo": {
                    "name": "notifyWirelessSurroundInfo",
                    "version": "1.0"
                }
            },
            "protocols": []
        },
        "avContent": {
            "methods": {
                "getAvailablePlaybackFunction": {
                    "input": {
                        "output": "str"
                    },
                    "name": "getAvailablePlaybackFunction",
                    "output": {
                        "functions": "FunctionInfo[]",
                        "output": "str",
                        "uri": "str"
                    },
                    "service": "avContent",
                    "version": "1.0"
                },
                "getBluetoothSettings": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getBluetoothSettings",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "avContent",
                    "version": "1.0"
                },
                "getContentCount": {
                    "input": {
                        "path": "str",
                        "target": "str",
                        "type": "string*",
                        "uri": "str",
                        "view": "str"
                    },
                    "name": "getContentCount",
                    "output": {
                        "capability": "int",
                        "count": "int"
                    },
                    "service": "avContent",
                    "version": "1.3"
                },
                "getContentList": {
                    "input": {
                        "cnt": "int",
                        "path": "str",
                        "sort": "str",
                        "stIdx": "int",
                        "target": "str",
                        "type": "string*",
                        "uri": "str",
                        "view": "str"
                    },
                    "name": "getContentList",
                    "output": {
                        "albumName": "str",
                        "artist": "str",
                        "audioInfo": "AudioInfo[]",
                        "broadcastFreq": "int",
                        "broadcastFreqBand": "str",
                        "channelName": "str",
                        "channelSurfingVisibility": "str",
                        "chapterCount": "int",
                        "content": "ContentInfo",
                        "contentKind": "str",
                        "contentType": "str",
                        "createdTime": "str",
                        "directRemoteNum": "int",
                        "dispNum": "str",
                        "durationMsec": "int",
                        "epgVisibility": "str",
                        "fileNo": "str",
                        "fileSizeByte": "int",
                        "folderNo": "str",
                        "genre": "string*",
                        "index": "int",
                        "is3D": "str",
                        "isAlreadyPlayed": "str",
                        "isBrowsable": "str",
                        "isPlayable": "str",
                        "isProtected": "str",
                        "originalDispNum": "str",
                        "parentIndex": "int",
                        "parentUri": "str",
                        "parentalInfo": "ParentalInfo[]",
                        "path": "str",
                        "playlistName": "str",
                        "podcastName": "str",
                        "productID": "str",
                        "programMediaType": "str",
                        "programNum": "int",
                        "remotePlayType": "string*",
                        "sizeMB": "int",
                        "startDateTime": "str",
                        "storageUri": "str",
                        "subtitleInfo": "SubtitleInfo[]",
                        "title": "str",
                        "tripletStr": "str",
                        "uri": "str",
                        "userContentFlag": "bool",
                        "videoInfo": "VideoInfo",
                        "visibility": "str"
                    },
                    "service": "avContent",
                    "version": "1.4"
                },
                "getCurrentExternalTerminalsStatus": {
                    "input": null,
                    "name": "getCurrentExternalTerminalsStatus",
                    "output": {
                        "active": "str",
                        "connection": "str",
                        "iconUrl": "str",
                        "label": "str",
                        "meta": "str",
                        "outputs": "string*",
                        "title": "str",
                        "uri": "str"
                    },
                    "service": "avContent",
                    "version": "1.0"
                },
                "getMethodTypes": {
                    "input": "str",
                    "name": "getMethodTypes",
                    "output": "str",
                    "service": "avContent",
                    "version": "1.0"
                },
                "getPlaybackModeSettings": {
                    "input": {
                        "target": "str",
                        "uri": "str"
                    },
                    "name": "getPlaybackModeSettings",
                    "output": {
                        "candidate": "PlaybackModeSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str",
                        "uri": "str"
                    },
                    "service": "avContent",
                    "version": "1.0"
                },
                "getPlayingContentInfo": {
                    "input": {
                        "output": "str"
                    },
                    "name": "getPlayingContentInfo",
                    "output": {
                        "albumName": "str",
                        "applicationName": "str",
                        "artist": "str",
                        "audioInfo": "AudioInfo[]",
                        "bivl_assetId": "str",
                        "bivl_provider": "str",
                        "bivl_serviceId": "str",
                        "broadcastFreq": "int",
                        "broadcastFreqBand": "str",
                        "channelName": "str",
                        "chapterCount": "int",
                        "chapterIndex": "int",
                        "contentKind": "str",
                        "dabInfo": "DabInfo",
                        "dispNum": "str",
                        "durationMsec": "int",
                        "durationSec": "double",
                        "fileNo": "str",
                        "genre": "string*",
                        "index": "int",
                        "mediaType": "str",
                        "originalDispNum": "str",
                        "output": "str",
                        "parentUri": "str",
                        "playSpeed": "str",
                        "playSpeedStep": "int",
                        "playlistName": "str",
                        "podcastName": "str",
                        "positionMsec": "int",
                        "positionSec": "double",
                        "programNum": "int",
                        "programTitle": "str",
                        "repeatType": "str",
                        "service": "str",
                        "source": "str",
                        "sourceLabel": "str",
                        "startDateTime": "str",
                        "stateInfo": "StateInfo",
                        "subtitleIndex": "int",
                        "title": "str",
                        "totalCount": "int",
                        "tripletStr": "str",
                        "uri": "str",
                        "videoInfo": "VideoInfo"
                    },
                    "service": "avContent",
                    "version": "1.2"
                },
                "getSchemeList": {
                    "input": null,
                    "name": "getSchemeList",
                    "output": {
                        "scheme": "str"
                    },
                    "service": "avContent",
                    "version": "1.0"
                },
                "getSourceList": {
                    "input": {
                        "scheme": "str"
                    },
                    "name": "getSourceList",
                    "output": {
                        "iconUrl": "str",
                        "isBrowsable": "bool",
                        "isPlayable": "bool",
                        "meta": "str",
                        "outputs": "string*",
                        "playAction": "str",
                        "source": "str",
                        "title": "str"
                    },
                    "service": "avContent",
                    "version": "1.1"
                },
                "getSupportedPlaybackFunction": {
                    "input": {
                        "uri": "str"
                    },
                    "name": "getSupportedPlaybackFunction",
                    "output": {
                        "functions": "SupportedFunctionInfo[]",
                        "uri": "str"
                    },
                    "service": "avContent",
                    "version": "1.0"
                },
                "getVersions": {
                    "input": null,
                    "name": "getVersions",
                    "output": "str",
                    "service": "avContent",
                    "version": "1.0"
                },
                "pausePlayingContent": {
                    "input": {
                        "output": "str"
                    },
                    "name": "pausePlayingContent",
                    "output": null,
                    "service": "avContent",
                    "version": "1.1"
                },
                "presetBroadcastStation": {
                    "input": {
                        "frequency": "int",
                        "uri": "str"
                    },
                    "name": "presetBroadcastStation",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "scanPlayingContent": {
                    "input": {
                        "direction": "str",
                        "output": "str"
                    },
                    "name": "scanPlayingContent",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "seekBroadcastStation": {
                    "input": {
                        "direction": "str",
                        "tuning": "str"
                    },
                    "name": "seekBroadcastStation",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "setActiveTerminal": {
                    "input": {
                        "active": "str",
                        "uri": "str"
                    },
                    "name": "setActiveTerminal",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "setBluetoothSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setBluetoothSettings",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "setPlayContent": {
                    "input": {
                        "keepLastFrame": "bool",
                        "output": "str",
                        "positionMsec": "int",
                        "positionSec": "double",
                        "repeatType": "str",
                        "requester": "str",
                        "resume": "bool",
                        "uri": "str"
                    },
                    "name": "setPlayContent",
                    "output": null,
                    "service": "avContent",
                    "version": "1.2"
                },
                "setPlayNextContent": {
                    "input": {
                        "output": "str"
                    },
                    "name": "setPlayNextContent",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "setPlayPreviousContent": {
                    "input": {
                        "output": "str"
                    },
                    "name": "setPlayPreviousContent",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "setPlaybackModeSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setPlaybackModeSettings",
                    "output": null,
                    "service": "avContent",
                    "version": "1.0"
                },
                "startContentBrowsing": {
                    "input": {
                        "uri": "str"
                    },
                    "name": "startContentBrowsing",
                    "output": {
                        "errorMessage": "str",
                        "status": "str"
                    },
                    "service": "avContent",
                    "version": "1.0"
                },
                "stopPlayingContent": {
                    "input": {
                        "keepLastFrame": "bool",
                        "output": "str"
                    },
                    "name": "stopPlayingContent",
                    "output": null,
                    "service": "avContent",
                    "version": "1.1"
                },
                "switchNotifications": {
                    "input": {
                        "disabled": "ApiIdentity[]",
                        "enabled": "ApiIdentity[]"
                    },
                    "name": "switchNotifications",
                    "output": {
                        "disabled": "ApiIdentity[]",
                        "enabled": "ApiIdentity[]",
                        "unsupported": "ApiIdentity[]"
                    },
                    "service": "avContent",
                    "version": "1.0"
                }
            },
            "notifications": {
                "notifyAvailablePlaybackFunction": {
                    "name": "notifyAvailablePlaybackFunction",
                    "version": "1.0"
                },
                "notifyExternalTerminalStatus": {
                    "name": "notifyExternalTerminalStatus",
                    "version": "1.0"
                },
                "notifyPlayingContentInfo": {
                    "name": "notifyPlayingContentInfo",
                    "version": "1.0"
                }
            },
            "protocols": []
        },
        "guide": {
            "methods": {
                "getMethodTypes": {
                    "input": "str",
                    "name": "getMethodTypes",
                    "output": "str",
                    "service": "guide",
                    "version": "1.0"
                },
                "getServiceProtocols": {
                    "input": null,
                    "name": "getServiceProtocols",
                    "output": "str",
                    "service": "guide",
                    "version": "1.0"
                },
                "getSupportedApiInfo": {
                    "input": {
                        "services": "string*"
                    },
                    "name": "getSupportedApiInfo",
                    "output": {
                        "apis": "ApiInfo[]",
                        "protocols": "string*",
                        "service": "str"
                    },
                    "service": "guide",
                    "version": "1.0"
                },
                "getVersions": {
                    "input": null,
                    "name": "getVersions",
                    "output": "str",
                    "service": "guide",
                    "version": "1.0"
                }
            },
            "notifications": {},
            "protocols": []
        },
        "system": {
            "methods": {
                "actSWUpdate": {
                    "input": null,
                    "name": "actSWUpdate",
                    "output": null,
                    "service": "system",
                    "version": "1.0"
                },
                "connectBluetoothDevice": {
                    "input": {
                        "bdAddr": "str"
                    },
                    "name": "connectBluetoothDevice",
                    "output": null,
                    "service": "system",
                    "version": "1.0"
                },
                "getDeviceMiscSettings": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getDeviceMiscSettings",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "system",
                    "version": "1.0"
                },
                "getInterfaceInformation": {
                    "input": null,
                    "name": "getInterfaceInformation",
                    "output": {
                        "interfaceVersion": "str",
                        "modelName": "str",
                        "productCategory": "str",
                        "productName": "str",
                        "serverName": "str"
                    },
                    "service": "system",
                    "version": "1.0"
                },
                "getMethodTypes": {
                    "input": "str",
                    "name": "getMethodTypes",
                    "output": "str",
                    "service": "system",
                    "version": "1.0"
                },
                "getPowerSettings": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getPowerSettings",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "system",
                    "version": "1.0"
                },
                "getPowerStatus": {
                    "input": null,
                    "name": "getPowerStatus",
                    "output": {
                        "standbyDetail": "str",
                        "status": "str"
                    },
                    "service": "system",
                    "version": "1.1"
                },
                "getSWUpdateInfo": {
                    "input": {
                        "network": "str"
                    },
                    "name": "getSWUpdateInfo",
                    "output": {
                        "isUpdatable": "str",
                        "swInfo": "SWInfo[]"
                    },
                    "service": "system",
                    "version": "1.0"
                },
                "getSettingsTree": {
                    "input": {
                        "usage": "str"
                    },
                    "name": "getSettingsTree",
                    "output": {
                        "settings": "SettingsTreeList[]"
                    },
                    "service": "system",
                    "version": "1.1"
                },
                "getSleepTimerSettings": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getSleepTimerSettings",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "system",
                    "version": "1.0"
                },
                "getStorageList": {
                    "input": {
                        "uri": "str"
                    },
                    "name": "getStorageList",
                    "output": {
                        "deviceName": "str",
                        "error": "str",
                        "format": "str",
                        "formattable": "str",
                        "formatting": "str",
                        "freeCapacityMB": "int",
                        "isAvailable": "str",
                        "lun": "int",
                        "mounted": "str",
                        "permission": "str",
                        "position": "str",
                        "systemAreaCapacityMB": "int",
                        "type": "str",
                        "uri": "str",
                        "volumeLabel": "str",
                        "wholeCapacityMB": "int"
                    },
                    "service": "system",
                    "version": "1.1"
                },
                "getSystemInformation": {
                    "input": null,
                    "name": "getSystemInformation",
                    "output": {
                        "area": "str",
                        "bdAddr": "str",
                        "cid": "str",
                        "deviceID": "str",
                        "duid": "str",
                        "esn": "str",
                        "generation": "str",
                        "helpUrl": "str",
                        "iconUrl": "str",
                        "language": "str",
                        "macAddr": "str",
                        "model": "str",
                        "name": "str",
                        "product": "str",
                        "region": "str",
                        "serial": "str",
                        "ssid": "str",
                        "updatableVersion": "str",
                        "version": "str",
                        "wirelessMacAddr": "str"
                    },
                    "service": "system",
                    "version": "1.3"
                },
                "getVersions": {
                    "input": null,
                    "name": "getVersions",
                    "output": "str",
                    "service": "system",
                    "version": "1.0"
                },
                "getWuTangInfo": {
                    "input": {
                        "target": "str"
                    },
                    "name": "getWuTangInfo",
                    "output": {
                        "candidate": "GeneralSettingsCandidate[]",
                        "currentValue": "str",
                        "deviceUIInfo": "str",
                        "isAvailable": "bool",
                        "target": "str",
                        "title": "str",
                        "titleTextID": "str",
                        "type": "str"
                    },
                    "service": "system",
                    "version": "1.0"
                },
                "setClientInfo": {
                    "input": {
                        "target": "str",
                        "value": "str"
                    },
                    "name": "setClientInfo",
                    "output": null,
                    "service": "system",
                    "version": "1.0"
                },
                "setDeviceMiscSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setDeviceMiscSettings",
                    "output": null,
                    "service": "system",
                    "version": "1.0"
                },
                "setPowerSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setPowerSettings",
                    "output": null,
                    "service": "system",
                    "version": "1.0"
                },
                "setPowerStatus": {
                    "input": {
                        "standbyDetail": "str",
                        "status": "str"
                    },
                    "name": "setPowerStatus",
                    "output": null,
                    "service": "system",
                    "version": "1.1"
                },
                "setSleepTimerSettings": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setSleepTimerSettings",
                    "output": null,
                    "service": "system",
                    "version": "1.0"
                },
                "setWuTangInfo": {
                    "input": {
                        "settings": "GeneralSettings[]"
                    },
                    "name": "setWuTangInfo",
                    "output": null,
                    "service": "system",
                    "version": "1.0"
                },
                "switchNotifications": {
                    "input": {
                        "disabled": "ApiIdentity[]",
                        "enabled": "ApiIdentity[]"
                    },
                    "name": "switchNotifications",
                    "output": {
                        "disabled": "ApiIdentity[]",
                        "enabled": "ApiIdentity[]",
                        "unsupported": "ApiIdentity[]"
                    },
                    "service": "system",
                    "version": "1.0"
                }
            },
            "notifications": {
                "notifyPowerStatus": {
                    "name": "notifyPowerStatus",
                    "version": "1.0"
                },
                "notifySWUpdateInfo": {
                    "name": "notifySWUpdateInfo",
                    "version": "1.0"
                },
                "notifySettingsUpdate": {
                    "name": "notifySettingsUpdate",
                    "version": "1.1"
                },
                "notifyStorageStatus": {
                    "name": "notifyStorageStatus",
                    "version": "1.2"
                }
            },
            "protocols": []
        }
    },
    "sysinfo": {
        "bdAddr": "98:22:ef:8c:96:8c",
        "bleID": null,
        "bssid": null,
        "macAddr": "70:26:05:48:e9:12",
        "ssid": null,
        "version": "M34.R.2137",
        "wirelessMacAddr": "98:22:ef:8c:96:8b"
    }
}

ModuleNotFoundError: No module named 'async_upnp_client.search

Hello I have updated to the latest version by the command:

pip install python-songpal --upgrade

It updated properly but i now receiving the following errors.

  File "c:\users\Sauerkraut\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\Sauerkraut\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Sauerkraut\AppData\Local\Programs\Python\Python37\Scripts\songpal.exe\__main__.py", line 5, in <module>
  File "c:\users\Sauerkraut\appdata\local\programs\python\python37\lib\site-packages\songpal\main.py", line 15, in <module>
    from songpal.discovery import Discover
  File "c:\users\Sauerkraut\appdata\local\programs\python\python37\lib\site-packages\songpal\discovery.py", line 2, in <module>
    from async_upnp_client.search import async_search
ModuleNotFoundError: No module named 'async_upnp_client.search'
PS C:\Users\Sauerkraut>      ```

the version before worked without Problem. Do you know whats the issue?

Add basic DLNA/UPnP support

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.

Error

Hi.

Sony HT-NT5

Raspberry Pi 3 Model B Rev 1.2

ARMv7 Processor rev 4 (v7l)

Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.1 (stretch)
Release:	9.1
Codename:	stretch

I did

sudo apt-get install python3 python3-dev
sudo apt-get install python3-pip libffi-dev libssl-dev
sudo pip3 install -U setuptools
sudo pip3 install -U virtualenv
pi@raspberrypi:~ $ pip3 install python-songpal
Collecting python-songpal
  Downloading python_songpal-0.0.1-py3-none-any.whl
Collecting websockets (from python-songpal)
  Downloading https://www.piwheels.hostedpi.com/simple/websockets/websockets-4.0.1-cp35-cp35m-linux_armv7l.whl (86kB)
    100% |████████████████████████████████| 92kB 819kB/s 
Collecting upnpclient (from python-songpal)
  Downloading https://www.piwheels.hostedpi.com/simple/upnpclient/uPnPClient-0.0.6-py3-none-any.whl
Collecting click (from python-songpal)
  Downloading click-6.7-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 1.5MB/s 
Collecting python-dateutil (from upnpclient->python-songpal)
  Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)
    100% |████████████████████████████████| 194kB 858kB/s 
Collecting requests (from upnpclient->python-songpal)
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 2.0MB/s 
Collecting six (from upnpclient->python-songpal)
  Downloading six-1.11.0-py2.py3-none-any.whl
Collecting netdisco (from upnpclient->python-songpal)
  Downloading https://www.piwheels.hostedpi.com/simple/netdisco/netdisco-1.2.3-py2.py3-none-any.whl
Collecting lxml (from upnpclient->python-songpal)
  Downloading https://www.piwheels.hostedpi.com/simple/lxml/lxml-4.1.1-cp35-cp35m-linux_armv7l.whl (4.9MB)
    100% |████████████████████████████████| 4.9MB 57kB/s 
Collecting certifi>=2017.4.17 (from requests->upnpclient->python-songpal)
  Downloading certifi-2017.11.5-py2.py3-none-any.whl (330kB)
    100% |████████████████████████████████| 337kB 783kB/s 
Collecting idna<2.7,>=2.5 (from requests->upnpclient->python-songpal)
  Downloading idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 1.5MB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests->upnpclient->python-songpal)
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 1.6MB/s 
Collecting urllib3<1.23,>=1.21.1 (from requests->upnpclient->python-songpal)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 1.7MB/s 
Collecting zeroconf==0.19.1 (from netdisco->upnpclient->python-songpal)
  Downloading zeroconf-0.19.1-py2.py3-none-any.whl
Collecting netifaces!=0.10.5 (from zeroconf==0.19.1->netdisco->upnpclient->python-songpal)
  Downloading https://www.piwheels.hostedpi.com/simple/netifaces/netifaces-0.10.6-cp35-cp35m-linux_armv7l.whl (40kB)
    100% |████████████████████████████████| 40kB 744kB/s 
Collecting enum-compat (from zeroconf==0.19.1->netdisco->upnpclient->python-songpal)
  Downloading https://www.piwheels.hostedpi.com/simple/enum-compat/enum_compat-0.0.2-py3-none-any.whl
Installing collected packages: websockets, six, python-dateutil, certifi, idna, chardet, urllib3, requests, netifaces, enum-compat, zeroconf, netdisco, lxml, upnpclient, click, python-songpal
Successfully installed certifi-2017.11.5 chardet-3.0.4 click-6.7 enum-compat-0.0.2 idna-2.6 lxml-4.1.1 netdisco-1.2.3 netifaces-0.10.6 python-dateutil-2.6.1 python-songpal-0.0.1 requests-2.18.4 six-1.11.0 upnpclient-0.0.6 urllib3-1.22 websockets-4.0.1 zeroconf-0.19.1
pi@raspberrypi:~ $ 

I get an error

pi@raspberrypi:~ $ songpal discover
Traceback (most recent call last):
  File "/usr/local/bin/songpal", line 7, in <module>
    from songpal.main import cli
  File "/home/pi/.local/lib/python3.5/site-packages/songpal/__init__.py", line 2, in <module>
    from songpal.protocol import Protocol
  File "/home/pi/.local/lib/python3.5/site-packages/songpal/protocol.py", line 10, in <module>
    from songpal.containers import (
  File "/home/pi/.local/lib/python3.5/site-packages/songpal/containers.py", line 3, in <module>
    import attr
ImportError: No module named 'attr'
pi@raspberrypi:~ $ 

Home assistant should support current version (with zones!)

It wasn't clear where else to discuss this. Should we be updating the home assistant component, or working on supporting it as an integration? Are there current efforts to update the home assistant component/write code for an integration, or should I start from scratch?

SRS-ZR5: error on source + active source not indicated

I'm getting errors on running songpal source:

WARNING:songpal.service:More than on version for {'name': 'connectBluetoothDevice', 'versions': [{'version': '1.0'}, {'version': '1.1'}]}, using the first one
WARNING:songpal.containers:Got unknowns for Source: {'protocols': ['scalar'], 'upnpOperationInfo': {'uuid': '00000001-0000-1010-8000-8c579b3e2f21', 'containerID': 'usb'}} - please create an issue!
Home Network (dlna:music)
  Got an error for getContentCount: [15, 'unsupported operation']
  Got an error for getContentList: [15, 'unsupported operation']
WARNING:songpal.containers:Got unknowns for Source: {'protocols': ['upnp'], 'upnpOperationInfo': {'uuid': '00000001-0000-1010-8000-8c579b3e2f21', 'containerID': 'usb'}} - please create an issue!
USB (storage:usb1)
  Got an error for getContentCount: [15, 'unsupported operation']
  Got an error for getContentList: [15, 'unsupported operation']
WARNING:songpal.containers:Got unknowns for Source: {'protocols': ['scalar'], 'upnpOperationInfo': {'uuid': '00000001-0000-1010-8000-8c579b3e2f21', 'containerID': 'usb'}} - please create an issue!
WARNING:songpal.containers:Got unknowns for Source: {'protocols': ['scalar'], 'upnpOperationInfo': {'uuid': '00000001-0000-1010-8000-8c579b3e2f21', 'containerID': 'usb'}} - please create an issue!
WARNING:songpal.containers:Got unknowns for Source: {'protocols': ['scalar'], 'upnpOperationInfo': {'uuid': '00000001-0000-1010-8000-8c579b3e2f21', 'containerID': 'usb'}} - please create an issue!
HDMI (exInput:hdmi)
  Got an error for getContentCount: [15, 'unsupported operation']
  Got an error for getContentList: [15, 'unsupported operation']
Bluetooth Audio (extInput:btAudio)
  Got an error for getContentCount: [15, 'unsupported operation']
  Got an error for getContentList: [15, 'unsupported operation']
Audio in (extInput:line)
  Got an error for getContentCount: [15, 'unsupported operation']
  Got an error for getContentList: [15, 'unsupported operation']
WARNING:songpal.containers:Got unknowns for Source: {'protocols': ['scalar'], 'upnpOperationInfo': {'uuid': '00000001-0000-1010-8000-8c579b3e2f21', 'containerID': 'usb'}} - please create an issue!
Cast (cast:audio)
  Got an error for getContentCount: [15, 'unsupported operation']
  Got an error for getContentList: [15, 'unsupported operation']
WARNING:songpal.containers:Got unknowns for Source: {'protocols': ['scalar'], 'upnpOperationInfo': {'uuid': '00000001-0000-1010-8000-8c579b3e2f21', 'containerID': 'usb'}} - please create an issue!
NetService (netService:audio)
  Got an error for getContentCount: [15, 'unsupported operation']
  Got an error for getContentList: [15, 'unsupported operation']

Running songpal input does list a few of the sources, but the active source is not indicated:

Inputs:
  * Bluetooth Audio (uri: extInput:btAudio)
  * Audio in (uri: extInput:line?port=1)
  * HDMI (uri: extInput:hdmi)

I'd love to get this fixed, I would like to read the active source in HA...
Let me know if I can help at all.

my devinfo:
https://gist.github.com/Censored3/4fac9923b5a86540e650599ccb2fb49f

Thanks!

Hassio's latest update makes songpal disappear

My settings work and I can control my DN1080 perfectly from the first moment. But this morning I applied an HA update and songpal is no longer available on my system.

It is no longer available in Services and my DN1080 only has the option to delete.

I have erased the device and tried to add it again, but since songpal is no longer available, its lines in configuration.yaml (the same from the beginning) do not take effect.

media_player:

Anyone know why?

Home Assistant 0.108.3
screenshot

Volume up works but Volume down doesn't

Sony STR-DN1080
iServer:~ localadmin$ songpal volume +5
Setting volume to +5
Zone 1 Volume: 10/55
Zone 2 Volume: -1/55
Zone 4 Volume: -1/55

iServer:~ localadmin$ songpal volume -5
Usage: songpal volume [OPTIONS] [VOLUME]
Try 'songpal volume --help' for help.

Error: no such option: -5

Please advise or fix in next release ;-)

SRS-X7 doesnt work

i am trying to get this to work with my Sony SRS-X7. it is officially on the list and i have to connecgted via the lan cable. when i run a discover, i dont see any results. i have manually set the ip and run the endpoint status comand as well but it says:

connection was refuled

[Feature/Discussion] Grouping / Ungrouping Devices

Hey,
as I would love to be able to group/ungroup my Sony Speakers using Home Assistant, I have done some investigation how the protocol works there. The Audio Control API doesn't support grouping/ungrouping (yet?), but instead it's a SOAP Request.

I can not judge whether or not @rytilahti would like to implement support for grouping or ungrouping, but here's what I know.

Setup

I have two speakers, "Küche" and "Wohnzimmer (WZ)". Küche runs at IP 192.168.178.77.

Getting Group Status

Request:

curl -H 'SOAPACTION: "urn:schemas-sony-com:service:Group:1#X_GetState"' -H 'Content-Type: text/xml; charset="utf-8"' -H 'User-Agent: UPnP/1.0 DLNADOC/1.50' -H 'X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="Music Center"; mv="5.6.0-20180205a"' -H 'X-AV-Physical-Unit-Info: pa="Music Center"' -H 'Host: 192.168.178.77:54380' --data-binary "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><s:Envelope s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><u:X_GetState xmlns:u=\"urn:schemas-sony-com:service:Group:1\" /></s:Body></s:Envelope>" --compressed 'http://192.168.178.77:54380/upnp/control/Group'

Response when not grouped

 <?xml version="1.0"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
            s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:X_GetStateResponse xmlns:u="urn:schemas-sony-com:service:Group:1">
                <GroupState>IDLE</GroupState>
                <GroupMode>IDLE</GroupMode>
                <GroupName></GroupName>
                <GroupSong>PUBLIC</GroupSong>
                <SessionID>0</SessionID>
                <NumberOfSlaves>0</NumberOfSlaves>
                <SlaveList></SlaveList>
                <MasterUUID></MasterUUID>
                <MasterSessionID>0</MasterSessionID>
                <PlayingState>STOPPED</PlayingState>
                <PowerState>OFF</PowerState>
                <Discoverable>YES</Discoverable>
                <WiredState>DOWN</WiredState>
                <WiredLinkSpeed>0</WiredLinkSpeed>
                <WirelessState>UP</WirelessState>
                <WirelessLinkSpeed>65</WirelessLinkSpeed>
                <WirelessType>802.11bgn</WirelessType>
                <RSSIValue>-65</RSSIValue>
                <SlaveNetworkState></SlaveNetworkState>
            </u:X_GetStateResponse>
        </s:Body>
    </s:Envelope>

Response when grouped with the other Speaker

<?xml version="1.0"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
                s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:X_GetStateResponse xmlns:u="urn:schemas-sony-com:service:Group:1">
                <GroupState>SINGING</GroupState>
                <GroupMode>GROUP</GroupMode>
                <GroupName>WZ und Kueche</GroupName>
                <GroupSong>PUBLIC</GroupSong>
                <SessionID>792069</SessionID>
                <NumberOfSlaves>1</NumberOfSlaves>
                <SlaveList>uuid:00000000-0000-1010-8000-8c579b4d78da</SlaveList>
                <MasterUUID></MasterUUID>
                <MasterSessionID>0</MasterSessionID>
                <PlayingState>PLAYING</PlayingState>
                <PowerState>ON</PowerState>
                <Discoverable>YES</Discoverable>
                <WiredState>DOWN</WiredState>
                <WiredLinkSpeed>0</WiredLinkSpeed>
                <WirelessState>UP</WirelessState>
                <WirelessLinkSpeed>65</WirelessLinkSpeed>
                <WirelessType>802.11bgn</WirelessType>
                <RSSIValue>-65</RSSIValue>
                <SlaveNetworkState></SlaveNetworkState>
            </u:X_GetStateResponse>
        </s:Body>
    </s:Envelope>

Grouping two speakers

By running the following request to the master Speaker (Küche), telling it to enslave Wohnzimmer.

curl -H 'SOAPACTION: "urn:schemas-sony-com:service:Group:1#X_Start"' -H 'Content-Type: text/xml; charset="utf-8"' -H 'User-Agent: UPnP/1.0 DLNADOC/1.50' -H 'X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="Music Center"; mv="5.6.0-20180205a"' -H 'X-AV-Physical-Unit-Info: pa="Music Center"' -H 'Host: 192.168.178.77:54380' --data-binary "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><s:Envelope s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><u:X_Start xmlns:u=\"urn:schemas-sony-com:service:Group:1\"><GroupMode>GROUP</GroupMode><GroupName>WZ und Kueche</GroupName><SlaveList>uuid:00000000-0000-1010-8000-8c579b4d78da</SlaveList></u:X_Start></s:Body></s:Envelope>" --compressed 'http://192.168.178.77:54380/upnp/control/Group'

Response:

<?xml version="1.0"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
                s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
            <u:X_StartResponse xmlns:u="urn:schemas-sony-com:service:Group:1">
                <MasterSessionID>792069</MasterSessionID>
            </u:X_StartResponse>
        </s:Body>
    </s:Envelope>

Ungrouping

curl -H 'SOAPACTION: "urn:schemas-sony-com:service:Group:1#X_Abort"' -H 'Content-Type: text/xml; charset="utf-8"' -H 'User-Agent: UPnP/1.0 DLNADOC/1.50' -H 'X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="Music Center"; mv="5.6.0-20180205a"' -H 'X-AV-Physical-Unit-Info: pa="Music Center"' -H 'Host: 192.168.178.77:54380' --data-binary "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><s:Envelope s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><u:X_Abort xmlns:u=\"urn:schemas-sony-com:service:Group:1\"><MasterSessionID>792066</MasterSessionID></u:X_Abort></s:Body></s:Envelope>" --compressed 'http://192.168.178.77:54380/upnp/control/Group'

(i forgot to capture the response for this one)

Can't find endpoint SRS-X88

First of all, glad to see this, I've got an SRS-X88 speaker that I've been wanting to integrate into Home Assistant!

I see endpoint is now a compulsory option even when attempting to discover. The discovery doesn't work, and I've tried various endpoints based on your example of http://<ip_address>:10000/sony with no luck. I've tried directly against all of the ports shown open in nmap:

PORT      STATE SERVICE
80/tcp    open  http
5000/tcp  open  upnp
8008/tcp  open  http
8009/tcp  open  ajp13
9876/tcp  open  sd
10001/tcp open  scp-config

The http ports return 404 for /sony if I try them in a browser.

The speaker does work with the Songpal app and http://<ip_address> returns a network device settings page.

Any ideas on how I can find the right endpoint?

Home Assistant lots of Songpal errors

Home Assistant release with the issue:
0.99.2<!--

Operating environment (Hass.io/Docker/Windows/etc.):
Docker

Component/platform:

https://www.home-assistant.io/components/songpal/

Description of problem:

Songpal is logging a lot of errors, when something changes like volume or different input then an error is logged.
I a using songpal in combination with a HT-ZF9 soundbar

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

- platform: songpal
  name: soundbar
  endpoint: http://192.168.0.59:10000/sony

Traceback (if applicable):

2019-09-20 15:57:16 WARNING (MainThread) [homeassistant.components.script] Script script.mqtt_depart already running.
2019-09-20 18:41:03 WARNING (SyncWorker_16) [homeassistant.components.waze_travel_time.sensor] Error on retrieving data: empty response
2019-09-20 20:57:46 WARNING (MainThread) [homeassistant.components.script] Script script.mqtt_depart already running.
2019-09-20 21:16:23 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:23 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:23 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'kind': 'input'} - please create an issue!
2019-09-20 21:16:30 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'kind': 'input'} - please create an issue!
2019-09-20 21:16:42 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:43 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:43 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:44 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:44 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:45 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:45 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:46 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:46 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:46 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:55 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:16:55 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'kind': 'directory'} - please create an issue!
2019-09-20 21:16:56 WARNING (MainThread) [songpal.service] Got unknown notification type: notifyAvailablePlaybackFunction
2019-09-20 21:16:56 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'albumName': 'Sony Sound Bar', 'artist': 'Sony Corporation', 'durationMsec': 127795, 'mediaType': 'music', 'parentUri': 'storage:usb1?', 'positionMsec': 0, 'repeatType': 'off', 'stateInfo': {'state': 'PLAYING'}, 'supplement': 'noMedia', 'title': 'Three Dimensional Surround Experience'} - please create an issue!
2019-09-20 21:16:56 WARNING (MainThread) [songpal.service] Got unknown notification type: notifyAvailablePlaybackFunction
2019-09-20 21:16:56 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'albumName': 'Sony Sound Bar', 'artist': 'Sony Corporation', 'durationMsec': 127795, 'mediaType': 'music', 'parentUri': 'storage:usb1?', 'positionMsec': 0, 'repeatType': 'off', 'stateInfo': {'state': 'PLAYING'}, 'supplement': 'noMedia', 'title': 'Three Dimensional Surround Experience'} - please create an issue!
2019-09-20 21:16:56 WARNING (MainThread) [songpal.service] Got unknown notification type: notifyAvailablePlaybackFunction
2019-09-20 21:16:56 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'albumName': 'Sony Sound Bar', 'artist': 'Sony Corporation', 'durationMsec': 127795, 'mediaType': 'music', 'parentUri': 'storage:usb1?', 'positionMsec': 0, 'repeatType': 'off', 'stateInfo': {'state': 'PLAYING'}, 'supplement': 'noMedia', 'title': 'Three Dimensional Surround Experience'} - please create an issue!
2019-09-20 21:17:41 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:17:42 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:17:42 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:17:43 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:17:43 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:17:44 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:07 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:08 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:09 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:09 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:10 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:23 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:23 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:23 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:24 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:24 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:24 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:25 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:25 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:25 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:26 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:26 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:26 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:27 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:28 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:30 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:18:35 WARNING (MainThread) [songpal.service] Got unknown notification type: notifyAvailablePlaybackFunction
2019-09-20 21:18:35 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'mediaType': 'music', 'parentUri': 'extInput:hdmi?port=1', 'stateInfo': {'state': 'STOPPED'}} - please create an issue!
2019-09-20 21:18:37 WARNING (MainThread) [songpal.containers] Got unknowns for ContentChange: {'kind': 'input'} - please create an issue!
2019-09-20 21:19:05 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:19:05 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:19:05 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:19:05 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:19:06 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:19:06 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:19:07 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 21:19:08 WARNING (MainThread) [songpal.containers] Got unknowns for VolumeChange: {'output': ''} - please create an issue!
2019-09-20 09:13:47 WARNING (MainThread) [songpal.containers] Got unknowns for Sysinfo: {'generation': '', 'serialNumber': 'xxxxxx'} - please create an issue!

Additional information:

home assistant component can't load: No Such Method

I'm running home assistant on raspberry pi 3,

python_version | 3.5.3
home assistant version | 0.88

config is same as advised

media_player:
  - platform: songpal
    name: my soundbar
    endpoint: http://192.168.2.240:60200/sony

but get this error message

Platform songpal not ready yet. Retrying in 120 seconds.
1:54 PM helpers/entity_platform.py (WARNING)
Unable to get methods from songpal: Got an error for getSupportedApiInfo: NoSuchMethod (12): No Such Method
1:54 PM components/media_player/songpal.py (ERROR) - message first occured at 1:51 PM and shows up 4 times
Platform songpal not ready yet. Retrying in 90 seconds.
1:52 PM helpers/entity_platform.py (WARNING)
Platform songpal not ready yet. Retrying in 60 seconds.
1:51 PM helpers/entity_platform.py (WARNING)
Setup failed for xiaomi_aqara: Component failed to initialize.
1:51 PM setup.py (ERROR)
No gateway discovered
1:51 PM components/xiaomi_aqara/__init__.py (ERROR)
Error doing job: Exception in callback EventBus.async_listen_once.<locals>.onetime_listener(<Event homeassistant_start[L]>) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py:614
1:51 PM components/person/__init__.py (ERROR)
Platform songpal not ready yet. Retrying in 30 seconds.
1:51 PM helpers/entity_platform.py (WARNING)
 
 2019-03-01 05:51:24 ERROR (MainThread) [homeassistant.components.media_player.songpal] Unable to get methods from songpal: Got an error for getSupportedApiInfo: NoSuchMethod (12): No Such Method
2019-03-01 05:51:24 WARNING (MainThread) [homeassistant.components.media_player] Platform songpal not ready yet. Retrying in 30 seconds.
2019-03-01 05:51:27 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback EventBus.async_listen_once.<locals>.onetime_listener(<Event homeassistant_start[L]>) at /srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py:614
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
    self._callback(*self._args)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 626, in onetime_listener
    self._hass.async_run_job(listener, event)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 333, in async_run_job
    target(*args)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/person/__init__.py", line 342, in person_start_hass
    self.person_updated()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/person/__init__.py", line 363, in person_updated
    self._update_state()
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/person/__init__.py", line 374, in _update_state
    for entity_id in self._config.get(CONF_DEVICE_TRACKERS, []):
TypeError: 'NoneType' object is not iterable

but I can manual use songpal command line toll in the /srv/homeassistant/bin folder

any help will be appreciated

group abort command is not working

Hello, it seems that the group abort command is not working.

Group created with the command:
songpal group --url http://192.192.0.254:52323/dmr.xml create Multiroomtest uuid:00000000-0000-1010-8000-xxxxxxxxxxxxx uuid:00000000-0000-1010-8000-xxxxxxxxxx

Group try to abort:

C:\> songpal group --url http://192.168.0.254:52323/dmr.xml abort
Endpoint is required except when with 'discover'!
Aborting current group..
INFO:songpal.group:Calling X_Abort with {'MasterSessionID': 0}
Traceback (most recent call last):
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Gwendolin\AppData\Local\Programs\Python\Python38\Scripts\songpal.exe\__main__.py", line 7, in <module>
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 717, in main
    rv = self.invoke(ctx)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\songpal\main.py", line 50, in wrapper
    return loop.run_until_complete(f(*args, **kwargs))
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\asyncio\base_events.py", line 608, in run_until_complete
    return future.result()
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\songpal\main.py", line 713, in abort
    click.echo(await gc.abort())
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\songpal\group.py", line 203, in abort
    res = await self.call("X_Abort", MasterSessionID=state.MasterSessionID)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\songpal\group.py", line 133, in call
    res = await act.async_call(**kwargs)
  File "c:\users\Gwendolin\appdata\local\programs\python\python38\lib\site-packages\async_upnp_client\client.py", line 514, in async_call
    raise UpnpError('Error during async_call(), status: %s, body: %s' %
async_upnp_client.client.UpnpError: Error during async_call(), status: 500, body: <?xml version="1.0"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring>UPnPError</faultstring><detail><UPnPError xmlns="urn:schemas-upnp-org:control-1-0"><errorCode>811</errorCode><errorDescription>Action X_Abort failed
</errorDescription></UPnPError></detail></s:Fault></s:Body></s:Envelope>

htmt500

Volume down not work, it's behaviour is like volume down.
Everything else seems to be working.

TypeError: attrib() got an unexpected keyword argument 'convert'

I get an error when loading songpal component in HomeAssistant. After some googling i found the same problem in other projects. Seems like convert is depricated and that converter should be used instead.

2019-10-06 08:47:56 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform songpal
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/songpal/media_player.py", line 63, in async_setup_platform
    from songpal import SongpalException
  File "/usr/local/lib/python3.7/site-packages/songpal/__init__.py", line 3, in <module>
    from songpal.device import Device
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 31, in <module>
    from songpal.notification import Notification, ConnectChange
  File "/usr/local/lib/python3.7/site-packages/songpal/notification.py", line 69, in <module>
    class SoftwareUpdateChange(ChangeNotification):
  File "/usr/local/lib/python3.7/site-packages/songpal/notification.py", line 77, in SoftwareUpdateChange
    isUpdatable = attr.ib(convert=convert_to_bool)
TypeError: attrib() got an unexpected keyword argument 'convert'

Add support for bravias

https://github.com/aparraga/braviarc provides a simplified implementation of the same protocol, but is targeting only the bravia televisions. This library could be extended to add support for those, which would require adding handling authentication (pin & psk) and extending some other parts (e.g. if IR command sending is wanted).

Error when trying to run song pal after installation in venv

Have installed song pal using the pip install method listed on the homepage, but receive this error :

homeassistant@hassio:/srv $ source /srv/homeassistant/bin/activate (homeassistant) homeassistant@hassio:/srv $ songpal songpal (homeassistant) homeassistant@hassio:/srv $ songpal discover Traceback (most recent call last): File "/srv/homeassistant/bin/songpal", line 7, in <module> from songpal.main import cli File "/srv/homeassistant/lib/python3.5/site-packages/songpal/main.py", line 10, in <module> import upnpclient File "/srv/homeassistant/lib/python3.5/site-packages/upnpclient/__init__.py", line 143, in <module> from upnpclient import const, errors, marshal, soap, ssdp, upnp, util # noqa: F401 File "/srv/homeassistant/lib/python3.5/site-packages/upnpclient/soap.py", line 4, in <module> from lxml import etree ImportError: libxslt.so.1: cannot open shared object file: No such file or directory (homeassistant) homeassistant@hassio:/srv $

Attempt to decode JSON with unexpected mimetype

Unable to control HT-ZF9 after upgrading from 0.10 to 0.11.1

Functional:
image

Decoding issue:
image

pip list:
Package Version Location


aiohttp 3.6.2
altgraph 0.15
arrow 0.12.1
asn1crypto 1.0.1
astroid 2.1.0
async-timeout 3.0.1
async-upnp-client 0.14.11
attrs 17.4.0
certifi 2019.9.11
cffi 1.12.3
chardet 3.0.4
Click 7.0
click-configfile 0.2.3
colorama 0.4.1
configparser 3.5.0
cryptography 2.7
defusedxml 0.6.0
dnspython 1.15.0
docxtpl 0.4.13
easygui 0.98.1
future 0.16.0
idna 2.8
idna-ssl 1.1.0
ipwhois 1.0.0
isort 4.3.4
Jinja2 2.10
jsonref 0.1
lazy-object-proxy 1.3.1
lxml 4.2.3
macholib 1.9
markdown2 2.3.5
MarkupSafe 1.0
mccabe 0.6.1
multidict 4.5.2
Naked 0.1.31
ntlm-auth 1.4.0
pefile 2017.11.5
pip 19.2.3
psutil 5.6.3
pycparser 2.19
pycryptodome 3.9.0
pycryptodomex 3.9.0
PyInstaller 3.3.1
pylint 2.2.2
PyPDF3 1.0.1
pyperclip 1.7.0
pypiwin32 223
python-dateutil 2.7.3
python-didl-lite 1.2.4
python-docx 0.8.6
python-songpal 0.11.1
python-whois 0.7.0
pytz 2019.3
pywin32 223
PyYAML 3.12
pyzipper 0.3.1
ramlfications 0.1.9
requests 2.22.0
requests-ntlm 1.1.0
setuptools 28.8.0
shellescape 3.4.1
six 1.11.0
SQLAlchemy 1.2.9
SQLAlchemy-Utils 0.33.3
termcolor 1.1.0
tqdm 4.36.1
typed-ast 1.3.1
typing-extensions 3.7.4
tzlocal 2.0.0
urllib3 1.25.6
voluptuous 0.11.7
wrapt 1.11.1
xmltodict 0.11.0
yarl 1.3.0

Hassio 0.101 songpal setup error

Hi mate, I’ve just updated to 0.101 from 99.2

I’m now getting this error which I saw a couple of people mention in the 0.100 blog.

Error while setting up platform songpal
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/songpal/media_player.py", line 90, in async_setup_platform
    await device.initialize()
  File "/usr/src/homeassistant/homeassistant/components/songpal/media_player.py", line 152, in initialize
    await self.dev.get_supported_methods()
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 127, in get_supported_methods
    response = await self.request_supported_methods()
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 119, in request_supported_methods
    return await self.create_post_request("getSupportedApiInfo")
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 104, in create_post_request
    res = await res.json()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1031, in json
    headers=self.headers)
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url='http://192.168.1.29:54480/sony/guide

My previously working config is:

media_player:

  - platform: songpal
    name: Sony
    endpoint: http://192.168.1.29:54489/sony

Really hope you can help :) I’ve also tried port 1000 in line with homeassistant component docs

Linton

Error while setting up platform songpal

since the homeassistant 0.100 update i cannot get the songpal media_player to work again.

HA config:

media_player:
    - platform: songpal
      name: lukas_soundbar
      endpoint: http://192.168.107.42:10000/sony

after restarting i get this error

Error while setting up platform songpal
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/songpal/media_player.py", line 84, in async_setup_platform
    await device.initialize()
  File "/usr/src/homeassistant/homeassistant/components/songpal/media_player.py", line 148, in initialize
    await self.dev.get_supported_methods()
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 127, in get_supported_methods
    response = await self.request_supported_methods()
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 119, in request_supported_methods
    return await self.create_post_request("getSupportedApiInfo")
  File "/usr/local/lib/python3.7/site-packages/songpal/device.py", line 104, in create_post_request
    res = await res.json()
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 1031, in json
    headers=self.headers)
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url='http://192.168.107.42:10000/sony/guide

when calling the method directly with the songpal command i get this error (maybe i'm missing an argument here):

> songpal --endpoint http://192.168.107.42:10000/sony command guide getSupportedApiInfo           
Calling guide.getSupportedApiInfo with params None
INFO:songpal.device:Calling guide.getSupportedApiInfo(None)
Error: Got an error for getSupportedApiInfo: [3, 'Illegal Argument']: IllegalArgument (3): Illegal Argument

with curl it seems to work:

Request

curl -X POST \
  http://192.168.107.42:10000/sony/guide \
  -H 'Content-Type: application/json' \
  -d '{"method": "getSupportedApiInfo", "params": [{}], "id": 1, "version": "1.0"}'

Response:

{"result":[[{"apis": [{"versions": [{"version": "1.1"}],"name": "getSoundSettings"},{"versions": [{"version": "1.0"}],"name": "getSpeakerSettings"},{"versions": [{"version": "1.1"}],"name": "getVolumeInformation"},{"versions": [{"version": "1.1"}],"name": "setAudioMute"},{"versions": [{"version": "1.1"}],"name": "setAudioVolume"},{"versions": [{"version": "1.1"}],"name": "setSoundSettings"},{"versions": [{"authLevel":"generic","version":"1.0"}],"name": "setSpeakerSettings"},{"name":"switchNotifications","versions":[{"protocols":["websocket:jsonizer"],"version":"1.0"}]}],"service": "audio","protocols": ["xhrpost:jsonizer","websocket:jsonizer"],"notifications": [{"versions": [{"version": "1.0"}],"name": "notifyVolumeInformation"}]}, {"apis": [{"versions": [{"version": "1.0"}],"name": "getAvailablePlaybackFunction"},{"versions": [{"version": "1.0"}],"name": "getBluetoothSettings"},{"versions": [{"version": "1.0"}],"name": "getCurrentExternalTerminalsStatus"},{"versions": [{"version": "1.0"}],"name": "getPlaybackModeSettings"},{"versions": [{"version": "1.2"}],"name": "getPlayingContentInfo"},{"versions": [{"version": "1.0"}],"name": "getSchemeList"},{"versions": [{"version": "1.2"}],"name": "getSourceList"},{"versions": [{"version": "1.0"}],"name": "getSupportedPlaybackFunction"},{"versions": [{"version": "1.1"}],"name": "pausePlayingContent"},{"versions": [{"version": "1.0"}],"name": "scanPlayingContent"},{"versions": [{"authLevel":"generic","version":"1.0"}],"name": "setBluetoothSettings"},{"versions": [{"version": "1.1"}],"name": "setPlaybackModeSettings"},{"versions": [{"version": "1.2"}],"name": "setPlayContent"},{"versions": [{"version": "1.0"}],"name": "setPlayNextContent"},{"versions": [{"version": "1.0"}],"name": "setPlayPreviousContent"},{"versions": [{"version": "1.1"}],"name": "stopPlayingContent"},{"name":"switchNotifications","versions":[{"protocols":["websocket:jsonizer"],"version":"1.0"}]}],"service": "avContent","protocols": ["xhrpost:jsonizer","websocket:jsonizer"],"notifications": [{"versions": [{"version": "1.0"}],"name": "notifyAvailablePlaybackFunction"},{"versions": [{"authLevel": "private","version": "1.0"}],"name": "notifyPlayingContentInfo"}]}, {"apis": [{"versions": [{"version": "1.0"}],"name": "getSupportedApiInfo"}],"service": "guide","protocols": ["websocket:jsonizer"]}, {"apis": [{"versions": [{"authLevel":"generic","version":"1.0"}],"name": "actSWUpdate"},{"versions": [{"version": "1.0"}],"name": "connectBluetoothDevice"},{"versions": [{"version": "1.0"}],"name": "getAlexaDeviceInfo"},{"versions": [{"version": "1.0"}],"name": "getAlexaRegistrationStatus"},{"versions": [{"version": "1.0"}],"name": "getDeviceMiscSettings"},{"versions": [{"version": "1.0"}],"name": "getInterfaceInformation"},{"versions": [{"version": "1.0"}],"name": "getPowerSettings"},{"versions": [{"version": "1.1"}],"name": "getPowerStatus"},{"versions": [{"version": "1.1"}],"name": "getSettingsTree"},{"versions": [{"version": "1.2"}],"name": "getStorageList"},{"versions": [{"version": "1.0"}],"name": "getSWUpdateInfo"},{"versions": [{"version": "1.4"}],"name": "getSystemInformation"},{"versions": [{"version": "1.0"}],"name": "getSystemSupportedFeature"},{"versions": [{"version": "1.0"}],"name": "getWuTangInfo"},{"versions": [{"version": "1.0"}],"name": "setAlexaRegistrationInfo"},{"versions": [{"version": "1.0"}],"name": "setClientInfo"},{"versions": [{"version": "1.0"}],"name": "setDeviceMiscSettings"},{"versions": [{"version": "1.0"}],"name": "setPowerSettings"},{"versions": [{"version": "1.1"}],"name": "setPowerStatus"},{"versions": [{"authLevel":"generic","version":"1.0"}],"name": "setSleepTimerSettings"},{"versions": [{"authLevel":"generic","version": "1.0"}],"name": "setWuTangInfo"},{"versions": [{"version": "1.0"}],"name": "unregistAlexaDevice"},{"versions": [{"version": "1.0"}],"name": "getVoiceCommandGuide"},{"name":"switchNotifications","versions":[{"protocols":["websocket:jsonizer"],"version":"1.0"}]}],"service": "system","protocols": ["xhrpost:jsonizer","websocket:jsonizer"],"notifications": [{"versions": [{"authLevel": "none","version": "1.0"}],"name": "notifyAlexaRegistrationStatus"},{"versions": [{"authLevel": "none","version": "1.0"}],"name": "notifyPowerStatus"},{"versions": [{"authLevel": "none","version": "1.1"}],"name": "notifySettingsUpdate"},{"versions": [{"authLevel": "generic","version": "1.1"}],"name": "notifyStorageStatus"},{"versions": [{"authLevel": "none","version": "1.0"}],"name": "notifySWUpdateInfo"}]}]],"id":1}

am i missing something?

Getting SRS-X88 source list

I've figured out how to get the list of SRS-X88 sources. You have to get the list for each scheme in turn. First get the schemes:

songpal --endpoint http://192.168.1.18:54480/sony command avContent getSchemeList
Calling avContent.getSchemeList with params None
INFO:songpal.protocol:Calling avContent.getSchemeList(None)
[{'scheme': 'storage'}, {'scheme': 'extInput'}, {'scheme': 'dlna'}]

For each scheme, get the source list:

songpal --endpoint http://192.168.1.18:54480/sony command avContent getSourceList '{ "scheme": "storage" }'
Calling avContent.getSourceList with params {'scheme': 'storage'}
INFO:songpal.protocol:Calling avContent.getSourceList({'scheme': 'storage'})
[{'playAction': 'changeSource', 'isBrowsable': True, 'meta': 'meta:storage:usb', 'isPlayable': True, 'source': 'storage:usb1', 'title': 'USB'}]

songpal --endpoint http://192.168.1.18:54480/sony command avContent getSourceList '{ "scheme": "extInput" }'
Calling avContent.getSourceList with params {'scheme': 'extInput'}
INFO:songpal.protocol:Calling avContent.getSourceList({'scheme': 'extInput'})
[{'isBrowsable': False, 'meta': 'meta:usbdac', 'title': 'USB DAC', 'source': 'extInput:usbDac', 'isPlayable': True, 'playAction': 'startPlay'}, {'isBrowsable': False, 'meta': 'meta:btaudio', 'title': 'Bluetooth Audio', 'source': 'extInput:btAudio', 'isPlayable': True, 'playAction': 'startPlay'}, {'isBrowsable': True, 'meta': 'meta:line', 'title': 'Audio in', 'source': 'extInput:line', 'isPlayable': False, 'playAction': 'startPlay'}]

songpal --endpoint http://192.168.1.18:54480/sony command avContent getSourceList '{ "scheme": "dlna" }'
Calling avContent.getSourceList with params {'scheme': 'dlna'}
INFO:songpal.protocol:Calling avContent.getSourceList({'scheme': 'dlna'})
[{'isBrowsable': False, 'playAction': 'startPlay', 'title': 'Home Network', 'isPlayable': True, 'source': 'dlna:music', 'meta': 'meta:dlna:music'}]

The next problem is that the network option can be set using the "Home Network" or dlna:music URL but the playing source does not match:

songpal --endpoint http://192.168.1.18:54480/sony command avContent getPlayingContentInfo {""}
Calling avContent.getPlayingContentInfo with params {}
INFO:songpal.protocol:Calling avContent.getPlayingContentInfo({})
[{'contentKind': 'service', 'parentUri': '', 'stateInfo': {'supplement': '', 'state': 'STOPPED'}, 'service': 'netService:audio?service=spotify', 'uri': 'netService:audio?service=spotify&contentId=-1', 'fileNo': '255', 'source': 'netService:audio'}]

So that shows which network service is in use, but they are not available as sources. Spotify is the default, by the way, I've never used it. It could also be cast:audio when casting.

I can't think of any way round that other than a sort of bodge where "Home Network" is treated as the source for any netService, at least for the purposes of source selection.

That said, if you cast to the Sony it automatically switches to network input even if another input is currently active so maybe it doesn't need to be explicitly listed in the inputs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.