Skip to content

svrooij/sonos-net

Repository files navigation

Control sonos speakers from dotnet

Latest version Github Issues Star on Github

Always wanted to control sonos speakers right from your dotnet application? I've created this library for you to do just that.

Warning This library is far from complete at the moment, it's just an experiment for now check features for more details.

Control sonos in other languages

Sonos net Sonos typescript Sonos api documentation Sonos2mqtt

Show your support

Support me on Github Follow on Twitter Check my blog

Features

Currently this library is not at version one, these are the planned features that need to be build before this can be called a version one.

  • All sonos services generated from service discovery
  • Event subscriptions
  • Dynamic metadata generation based on these docs
  • SonosManager class that keeps track of speaker groups
  • Device discovery, though it hardly works

Sonos-web

As an experiment I've created (mostly generated) an api and a blazor web interface to control sonos speakers.

Sonos-web screenshot]

Endpoints:

  • Scalar API documentation at /scalar
  • API endpoints at /api
  • Album proxy at /getaa
  • Blazor web interface at /

Want to try it out? Deploy the following docker compose file:

services:
  web:
    image: ghcr.io/svrooij/sonos-net:0.3.0-beta
    restart: unless-stopped
    ports: 
      - "8080:8080" # Web interface
      - "6329:6329" # Sonos event listener
    environment:
      "SONOS_EVENT_HOST": "192.168.y.y" # Change to the IP of the machine running this container, so the sonos speakers know where to send the events 
      "SONOS_EVENT_PORT": 6329 # Change to the port you want to listen on, make sure it's the same as the one in the ports section
      "SONOS_HOST": "http://192.168.x.x:1400/" # Change to the IP of one of your sonos speakers

CodeTour available

This project uses CodeTour in Visual Studio Code to describe how stuff works. If you want to contribute to this library, I suggest you to take a look at the code tour just to get started.

Contribute

We welcome all contributions to this project, to get started be sure to checkout the CodeTour which will explain how some files get generated.

If you see a file with the .g.cs suffix it means that it is generated. Manual changes to these files will not be accepted because they will get lost upon next generation.

This library is licensed under GPL v3 and all contributions are considered to be publishable under that same license.

About

Control Sonos from dotnet

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors