Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
################################################################################
# Diese .gitignore-Datei wurde von Microsoft(R) Visual Studio automatisch erstellt.
################################################################################

/.vs/sonos/v16/.suo
/.vs/ProjectSettings.json
/.vs/slnx.sqlite
7 changes: 7 additions & 0 deletions src/SonosUPnP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const char p_RadioMetaFullStart[] PROGMEM = SONOS_RADIO_META_FULL_START;
const char p_RadioMetaFullEnd[] PROGMEM = SONOS_RADIO_META_FULL_END;
const char p_BecomeCoordinatorOfStandaloneGroup[] PROGMEM = SONOS_TAG_BECOME_COORDINATOR_OF_STANDALONE_GROUP;
const char p_SetLEDState[] PROGMEM = SONOS_TAG_SET_LED_STATE;
const char p_ConfigureSleepTimer[] PROGMEM = SONOS_TAG_CONFIGURE_SLEEP_TIMER;

const char p_AddURIToQueue[] PROGMEM = SONOS_TAG_ADD_URI_TO_QUEUE;
const char p_SavedQueues[] PROGMEM = SONOS_SAVED_QUEUES;
Expand Down Expand Up @@ -282,6 +283,12 @@ void SonosUPnP::setStatusLight(IPAddress speakerIP, bool state)
SONOS_TAG_DESIRED_LED_STATE, state ? "On" : "Off");
}

void SonosUPnP::NewSleepTimerDuration(IPAddress speakerIP, uint8_t hour, uint8_t minute, uint8_t second)
{
char time[11];
sprintf_P(time, p_TimeFormatTemplate, hour, minute, second);
upnpSet(speakerIP, UPNP_AV_TRANSPORT, p_ConfigureSleepTimer, SONOS_TAG_NEW_SLEEP_TIMER_DURATION, time);

void SonosUPnP::addPlaylistToQueue(IPAddress speakerIP, uint16_t playlistIndex)
{
char path[45];
Expand Down
4 changes: 4 additions & 0 deletions src/SonosUPnP.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@
#define SONOS_TAG_SET_LED_STATE "SetLEDState"
#define SONOS_TAG_DESIRED_LED_STATE "DesiredLEDState"

#define SONOS_TAG_CONFIGURE_SLEEP_TIMER "ConfigureSleepTimer"
#define SONOS_TAG_NEW_SLEEP_TIMER_DURATION "NewSleepTimerDuration"

// Playlist & Queue
/*
<u:AddURIToQueueResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
Expand Down Expand Up @@ -307,6 +310,7 @@ class SonosUPnP
void addPlaylistToQueue(IPAddress speakerIP, uint16_t playlistIndex);
void addTrackToQueue(IPAddress speakerIP, const char *scheme, const char *address);
void removeAllTracksFromQueue(IPAddress speakerIP);
void NewSleepTimerDuration(IPAddress speakerIP, uint8_t hour, uint8_t minute, uint8_t second);

#ifndef SONOS_WRITE_ONLY_MODE

Expand Down