Closed printerboi closed 3 years ago
Calling sonos.configureSleepTimer("PT30M") should set the sleep Timer of the called device to 30 minutes.
sonos.configureSleepTimer("PT30M")
I always get the following upnp error:
Error: upnp: statusCode 500 & upnpErrorCode <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>402</errorCode></UPnPError></detail></s:Fault></s:Body></s:Envelope>
I'm not sure if I got the time format right.
const { Sonos } = require('sonos') const device = new Sonos('xxx.xxx.xxx.x'); device.configureSleepTimer("PT30M").then(success => { console.log("timer set"); }).catch(err => { console.log(err); })
Node version: v14.15.1 node-sonos version: 7.5.4 OS: Manjaro Arch Linux
try 00:30:00 instead of PT30M
Hey, thanks for the response. This fixed the issue. I totally messed up with the time String.
Calling
sonos.configureSleepTimer("PT30M")
should set the sleep Timer of the called device to 30 minutes.I always get the following upnp error:
Error: upnp: statusCode 500 & upnpErrorCode <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>402</errorCode></UPnPError></detail></s:Fault></s:Body></s:Envelope>
I'm not sure if I got the time format right.
Versions (and Environment)
Node version: v14.15.1 node-sonos version: 7.5.4 OS: Manjaro Arch Linux