UPnP Event error > 412 Precondition Failed

Chris.G

Member
Joined
Apr 25, 2024
Messages
14
Hi,

Actually, I just wanted to use the subscription to be informed in my app when the status has changed in the WiiM device.

const UPnPClient = require('upnp-device-client');

this.#client = new UPnPClient(`http://${this.getStoreValue('address')}:49152/description.xml`);
this.#client.subscribe('AVTransport', (event) => {
this.logDebug(`onInit() > subscribe > ${JSON.stringify(event)}`)
})

The whole code works as expected, until after about 5 minutes a "SUBSCRIBE renewal error" error occurs. After analyzing the error in more detail, it turned out that the UPnP client sends a "Renewing subscription" message to the WIIM Pro (FW: 4.8.614042) and this always responds with the message "412 Precondition Failed".

In my opinion, the message from the client is correct (see screenshots) and I have also looked at other implantations and their message structure is identical.

UPnP-Specs > see Chapter: 4.1.2 Eventing: Renewing a subscription: SUBSCRIBE with SID

UPnP-Client Code:
Bildschirmfoto 2024-04-30 um 18.04.13.png
Request:
Bildschirmfoto 2024-04-30 um 17.19.54.png


Response:
Bildschirmfoto 2024-04-30 um 17.21.00.png
 
Hi @WiiM Support

I'm still relatively new here so the question, do you need a support ticket for the problem or is this enough?

THX Chris
 
Hi @WiiM Support

I'm still relatively new here so the question, do you need a support ticket for the problem or is this enough?

THX Chris
This is more of a user community forum, not a route to support. You should use the settings/ feedback section in the WiiM home app to submit a ticket to WiiM so they can also inspect your device logs for issues.
 
Back
Top