Skip to content
Draft
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
659 changes: 562 additions & 97 deletions docker/MQTTManager/include/protobuf/protobuf_nspanel.pb.cc

Large diffs are not rendered by default.

625 changes: 617 additions & 8 deletions docker/MQTTManager/include/protobuf/protobuf_nspanel.pb.h

Large diffs are not rendered by default.

741 changes: 711 additions & 30 deletions docker/MQTTManager/include/protobuf/protobuf_nspanel_entity.pb.cc

Large diffs are not rendered by default.

953 changes: 951 additions & 2 deletions docker/MQTTManager/include/protobuf/protobuf_nspanel_entity.pb.h

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docker/protobuf/protobuf_nspanel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ message NSPanelStatusReport {
UPDATING_TFT = 2;
UPDATING_FIRMWARE = 3;
UPDATING_LITTLEFS = 4;
REBOOTING = 5;
}
state nspanel_state = 1;
int32 update_progress = 2;
Expand Down Expand Up @@ -143,6 +144,7 @@ message NSPanelRoomEntitiesPage {
ENTITY_TYPE_BUTTON = 3;
ENTITY_TYPE_THERMOSTAT = 4;
ENTITY_TYPE_SCENE = 5;
ENTITY_TYPE_MEDIA_PLAYER = 6;
}
EntityType type = 8;
int32 id = 9;
Expand Down Expand Up @@ -248,6 +250,25 @@ message NSPanelMQTTManagerCommand {
string new_value = 3;
}

message MediaPlayerCommand {
enum PlaybackAction {
NONE = 0;
PLAY = 1;
PAUSE = 2;
NEXT_TRACK = 3;
PREVIOUS_TRACK = 4;
}

int32 media_player_id = 1;
PlaybackAction playback_action = 2;
bool has_volume = 3;
int32 volume = 4; // Volume in 0-100%
bool has_source_volume = 5;
int32 source_volume = 6; // Volume in 0-100%
bool has_muted = 7;
bool muted = 8;
}

oneof CommandData {
FirstPageTurnLightOn first_page_turn_on = 1;
FirstPageTurnLightOff first_page_turn_off = 2;
Expand All @@ -258,6 +279,7 @@ message NSPanelMQTTManagerCommand {

ThermostatTemperatureCommand thermostat_temperature_command = 7;
ThermostatCommand thermostat_command = 8;
MediaPlayerCommand media_player_command = 9;
}

int32 nspanel_id = 100;
Expand Down
34 changes: 34 additions & 0 deletions docker/protobuf/protobuf_nspanel_entity.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,42 @@ message NSPanelEntityState {
repeated ThermostatOption options = 7;
}

message MediaPlayer {
enum PlaybackState {
UNKNOWN = 0;
OFF = 1;
ON = 2;
IDLE = 3;
PLAYING = 4;
PAUSED = 5;
BUFFERING = 6;
}

int32 media_player_id = 1;
string name = 2;
PlaybackState state = 3;
string media_title = 4;
string media_artist = 5;

int32 volume = 6; // Volume in 0-100%
bool is_muted = 7;

// Some setups (for example multi-room audio matrices) have a separate volume
// for the source feeding this player. Only valid if has_source_volume is set.
bool has_source_volume = 8;
int32 source_volume = 9; // Volume in 0-100%

bool can_play = 10;
bool can_pause = 11;
bool can_next_track = 12;
bool can_previous_track = 13;
bool can_set_volume = 14;
bool can_mute = 15;
}

oneof entity {
Light light = 1;
Thermostat thermostat = 2;
MediaPlayer media_player = 3;
}
}
Loading