Code of the NetSpeaker project written in C++
Go to file
2024-05-01 14:41:50 +02:00
examples-diy/standalone Added timelapse of the second part of the diy standalone example (a little late for this one, i know) 2024-05-01 14:41:50 +02:00
src/NetSpeaker Corrected wrong default operation mode 2024-03-30 13:20:14 +01:00
.gitignore Fixed wrong rule in .gitignore 2023-12-09 08:52:43 +00:00
initial_config.ino Added helper script 2024-03-26 12:22:50 +01:00
LICENSE.md Added web page example 2022-11-02 09:31:09 +01:00
README.md Added better descriptions about the operation modes 2024-03-30 15:01:08 +01:00

NetSpeaker

License: Unlicense Open Source ESP32 State: Development

NetSpeaker is a project that aims to make it easier to build your own sound system, just like sqeezebox, for example.

There are two operating modes, to adapt to the specific use case - default mode is 0. The mode can be set at compile time via the constant operation_mode. Valid choices are:

  • 0: interconnected (HTTP API and WiFi, no buttons); useful for bigger projects
  • 1: standalone (Buttons, no WiFi and HTTP API); useful if you want to build a small player

Another two "operating modes" have been introduced as sometimes you want to change between the above operation modes without having to recompile everything.

  • 2: interconnected first (if any button is pressed at startup, while the led is blinking, the standalone mode is chosen. otherwise, interconnected mode is used)
  • 3: standalone first (just the reverse of mode 2)

Any questions? Hopefully a look into the Wiki will help.

API demo

One thing I have learnt while developing NetSpeaker is that implementing a web server which servers hundreds of lines of html is... well sort of dumb (there previously was an API demo running directly on the NetSpeaker machine which took loads of resources when requested). You can see all this in that commit. This local API demo has been replaced by another repository containing the Demo as HTML files (you can just open these in your web browser and type in you NetSpeaker's IP address and start playing).

Audio compatibility

For audio compatibilty, please have a look at schreibfaul1's git repository's wiki, where he goes into that in detail.

Roadmap

Features, already implemented, or still in progress for the v1.0.0 release!

  • SD card support for playing audio files
  • Two operating modes, standalone mode fully implemented
  • two further operation modes to choose whether to run as standalone or interconnected at startup by pressing buttons
  • API in mode 0
  • API methods:
    • /api/v1/playback/toggle
    • /api/v1/playback/play
    • /api/v1/playback/pause
    • /api/v1/playback/next
    • /api/v1/playback/previous
    • /api/v1/playback/info
    • /api/v1/playback/id3_image
    • /api/v1/playback/<index>
    • /api/v1/playlist/get
    • /api/v1/playlist/create
    • /api/v1/playlist/play
    • /api/v1/volume/get
    • /api/v1/volume/get_max
    • /api/v1/volume/up
    • /api/v1/volume/down
    • /api/v1/volume/mute
    • /api/v1/volume/<0-20>
    • /api/v1/balance/get
    • /api/v1/balance/<0-32>
    • /api/v1/eq/get
    • /api/v1/eq/reset
    • /api/v1/eq/low/get
    • /api/v1/eq/low/reset
    • /api/v1/eq/low/<0-46>
    • /api/v1/eq/mid/get
    • /api/v1/eq/mid/reset
    • /api/v1/eq/mid/<0-46>
    • /api/v1/eq/high/get
    • /api/v1/eq/high/reset
    • /api/v1/eq/high/<0-46>
    • /api/v1/system/restart/
    • /api/v1/system/name
    • /api/v1/system/name/change
    • /api/v1/system/network_name
    • /api/v1/system/network_name/change
    • /api/v1/system/restore_state/{on,off,get}
    • /api/v1/system/restore_playing/{on,off,get}
    • /api/v1/system/tell_address/{on,off,get}
    • /api/v1/system/tell_address/lang/{en,de,get}
    • /api/v1/system/version
    • /api/v1/system/wifi/change
    • /api/v1/system/wifi/get_ssid
    • /api/v1/system/wifi/get_ap_creds
    • /api/v1/files/get
    • /api/v1/files/upload
  • Automatic WiFi connection
  • Access Point opened when no WiFi connection could be established
  • Improve the volume endpoint handler (currently pretty undynamic - not anymore :)
  • Add better encoding as umlauts are not displayed correctly sometimes

Please note that all API endpoints may not end with a /.

Credits & Acknowledgements

Thanks to...

  • the makers of Arduino IDE
  • schreibfaul1 (github) for creating the audio library used in this project
  • espressif for making the best microprocessor I've ever seen

External librarys used:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please also make sure to test things carefully before contributing them.

Mirrors

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to http://unlicense.org/