UPnP GetTransportSettings > PlayMode always shows the "NORMAL" value

Chris.G

Member
Joined
Apr 25, 2024
Messages
12
I am slowly finishing the development of the Homey (Smart Home) integration.

The only thing I am still missing is UPnP attributes when reading for the shuffle (loopmode), I have found the field (AVTransport > GetTransportSettings > PlayMode) but it always has the value "NORMAL".

However, when I check the loop attribute via HTTP > getPlayerStatus, the WiiM player sometimes shows me incorrect values (e.g. 5).

Now my question, has someone already implemented the loop and could help me or should I write a support ticket directly.

THX Chris
 
Possible interpretation of LoopMode attribute:

self._shuffle = {
2: True,
3: True,
5: True,
}.get(self._player_statdata['LoopMode'], False)

self._repeat = {
0: REPEAT_MODE_ALL,
1: REPEAT_MODE_ONE,
2: REPEAT_MODE_ALL,
5: REPEAT_MODE_ONE,
}.get(self._player_statdata['LoopMode'], REPEAT_MODE_OFF)
 
I did a little testing and came to the following conclusion:
JavaScript:
    if (shuffle === true && repeat === 'none') {
      loopMode = '3'
    } else if (shuffle === true && repeat === 'playlist') {
      loopMode = '2'
    } else if (shuffle === true && repeat === 'track') {
      loopMode = '5'
    } else if (shuffle === false && repeat === 'none') {
      loopMode = '4'
    } else if (shuffle === false && repeat === 'playlist') {
      loopMode = '0'
    } else if (shuffle === false && repeat === 'track') {
      loopMode = '1'
    }

BDW: Do you know what is meant by "PlayType" ?
 
Back
Top