Services.proto 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. syntax = "proto3";
  2. package sys;
  3. import "GPIO.proto";
  4. import "Artwork.proto";
  5. import "Spotify.proto";
  6. import "AirPlay.proto";
  7. import "Squeezelite.proto";
  8. import "Equalizer.proto";
  9. import "nanopb.proto";
  10. import "customoptions.proto";
  11. // Configuration for sleep service
  12. message SleepService {
  13. option (nanopb_msgopt).msgid = 10035;
  14. // Inactivity in minutes before going to sleep
  15. uint32 delay = 1;
  16. // Inactivity delay in minutes after which sleep resumes
  17. int32 spurious = 2 [(nanopb).int_size = IS_16];
  18. // GPIO for sleep
  19. GPIO sleep = 3;
  20. // List of GPIOs that will cause the system to wake up
  21. repeated GPIO wake = 4 [(nanopb).type = FT_POINTER]; //[(nanopb).max_count= 10];
  22. // List of RTC GPIOs to keep active
  23. repeated GPIO rtc = 5 [(nanopb).type = FT_POINTER]; //[(nanopb).max_count= 10];
  24. // Threshold in volts under which the system will enter into sleep
  25. float batt = 6;
  26. }
  27. message Telnet {
  28. bool enable = 1;
  29. uint32 block = 2 [(nanopb).int_size = IS_16];
  30. uint32 buffer = 3 [(nanopb).int_size = IS_16];
  31. }
  32. message Metadata {
  33. option (nanopb_msgopt).msgid = 10036;
  34. // Optional parameters controlling bluetooth and airplay
  35. // Display format with optional keywords %artist%, %album%, %title%
  36. string format = 1 [(nanopb).max_length= 50];
  37. // Scrolling speed in ms
  38. uint32 speed = 2 ;
  39. // Pause time between scrolls in ms
  40. uint32 pause = 3;
  41. // Cover art display configuration
  42. Artwork artwork = 4;
  43. }
  44. message BluetoothSink {
  45. bool enabled = 1;
  46. uint32 volume = 2;
  47. string pin = 3 [(nanopb).max_length = 16,(cust_field).v_string = "0000" ];
  48. }
  49. message Services {
  50. option (nanopb_msgopt).msgid = 10037;
  51. Metadata metadata = 1;
  52. SleepService sleep = 2;
  53. Spotify cspot = 4;
  54. AirPlay airplay = 5;
  55. Squeezelite squeezelite = 6;
  56. string release_url = 7 [(nanopb).max_length = 256, (cust_field).v_string = "https://api.github.com/repos/sle118/squeezelite-esp32/releases"];
  57. BluetoothSink bt_sink = 8;
  58. bool statistics = 9 [(cust_field).v_bool = false];
  59. Telnet telnet = 10;
  60. Equalizer equalizer = 11;
  61. }