Closed stp6778 closed 5 years ago
Thank you for reporting this. Curious, it appears that your HEOS speaker reports that the state variable VolumeDB
has changed, but it does not have this state variable. Perhaps the state variable is named differently (Volumedb
instead of VolumeDB
.)
I'll make the code a bit more robust to log it is missing the state variable, instead of raising an error.
Just to check, can you run the following command:
upnp-client --pprint subscribe http://192.168.178.69:49152/description.xml \*
Replace the URL with the one of your HEOS device. I think you know what it should be. If not, you can run upnp-client search
, which will give you all UPnP services/devices in your network. Then, change the volume of your device.
This should give something like the following:
{
"timestamp": 1548844140.3578146,
"service_id": "urn:upnp-org:serviceId:RenderingControl",
"service_type": "urn:schemas-upnp-org:service:RenderingControl:1",
"state_variables": {
"LastChange": "<Event xmlns=\"urn:schemas-upnp-org:metadata-1-0/AVT_RCS\">\n<InstanceID val=\"0\">\n<Volume channel=\"Master\" val=\"23\"/>\n</InstanceID>\n</Event>\n"
}
}
We're interesting in the LastChange
variable. Can you report the results?
Also, can you dump the XML files (device description and service descriptions) and show them? This will tell us which state variables are available. It should be something like this, but then for VolumeDB:
<stateVariable sendEvents="no">
<name>Volume</name>
<dataType>ui2</dataType>
<allowedValueRange>
<minimum>0</minimum>
<maximum>100</maximum>
<step>1</step>
</allowedValueRange>
</stateVariable>
Volume
and VolumeDB
state variables changes at the same time.
The problem seems to be a different name between state variable name A_ARG_TYPE_VolumeDB
and lastchange
name VolumeDB
Not sure it's a good way to name state variables, this should be a bad implementation from Denon...
{
"timestamp": 1548880295.997434,
"service_id": "urn:upnp-org:serviceId:RenderingControl",
"service_type": "urn:schemas-upnp-org:service:RenderingControl:1",
"state_variables": {
"LastChange": "<Event xmlns=\"urn:schemas-upnp-org:metadata-1-0/RCS/\"><InstanceID val=\"0\"><Volume channel=\"Master\" val=\"20\"/><VolumeDB channel=\"Master\" val=\"20\"/></InstanceID></Event>"
}
}
<stateVariable sendEvents="no">
<name>A_ARG_TYPE_VolumeDB</name>
<dataType>i2</dataType>
<defaultValue>0</defaultValue>
<allowedValueRange>
<minimum>0</minimum>
<maximum>100</maximum>
<step>1</step>
</allowedValueRange>
</stateVariable>
<stateVariable sendEvents="no">
<name>Volume</name>
<dataType>ui2</dataType>
<defaultValue>0</defaultValue>
<allowedValueRange>
<minimum>0</minimum>
<maximum>100</maximum>
<step>1</step>
</allowedValueRange>
</stateVariable>
Thanks! You are right, the name of the state variable is wrong. The RenderingControl:3 specs state that the name must be VolumeDB.
You could file a report with Denon. Or you can use your own hack and/or wait a bit longer before a new version of async_upnp_client
lands in home assistant. (I'll try to get this ready this weekend.) I'm sure you'll help others too if you report this with Denon.
I have sent an email to denon but I'm not sure they will do something. I comment the keyerror command and waiting your next release. Thanks for all your work.
0.14.4 was released and landed in home assistant. The fix should be available next version.
Hi, I upgrade to 0.14.3, works fine with my heos speakers, but there is a traceback :
All media_player controls are OK, I just comment the raise command to suppress the traceback.
Regards.