snapcast
snapcast copied to clipboard
RFC: Add method to pass arbitrary client system info
This is a request-for-comments PR regarding a new feature I would like to add to SnapCast: sending arbitrary system information from SnapCast clients to the server, so that the information can be displayed in SnapWeb.
It adds two new command-line switches to the client:
-
--sysinfo [file:<path to JSON file>, script:<path to executable returning JSON>]
-
--sysinfo-interval [seconds - interval in seconds between system information updates]
Any JSON values that are in the specified file or returned by the script will be passed to the SnapCast server. The server then returns this information along with the other client info and also sends an Client.OnSystemInfoChanged
event via the Websocket.
The data is displayed in a dialog similar to the client details. An example implementation for SnapWeb can be found in this branch: https://github.com/mawe42/snapweb/tree/show-system-info
Use-case for this feature is that I want to sent and display information about the battery charge and power consumption of the connected clients, but possibly also other information.
The question here is: would this be something that you would consider for integration in SnapCast?