Just thought I'd post an example of using micropython on the esp8266 to display the song playing on my Sonos system. The main point for me is that this would have been tedious and time consuming in C and was comparatively quick and easy using micropython. For the curious, information on the song playing on Sonos system is posted to a web server and then accessed via a socket from the esp8266. Increasing the heap to 24 * 1024 has enabled a full font set; however, I am still running out of memory when I also program the buttons to do things like change the volume although I am sure that is a solvable problem. I had created something similar with a raspberry pi but it needed to be plugged in and was unwieldy compared to the esp8266 with lipo battery. I listen to sources like Pandora and am always interested in what is playing and having a very small portable dedicated display is great and was entirely made possible by micropython and the port to the esp8266.
The link is to a brief video of the display in action -- I am just flipping through some songs quickly so you can see the display change (ignore the sound of the dryer in the background).
https://youtu.be/S4IRAIIhizU
Micropython + ESP8266 + Sonos
Re: Micropython + ESP8266 + Sonos
Hi,
very nice example.
Thus, I need to create something for Teufels Raumfeld System now , just to make sure we do get an equal weight here.
I am curious why you used an additional web service. Not familiar with the Sonos System, but for Raumfeld you can directly connect to the Box and receive those info. Actually, this is the way apps on the smartphone do it.
very nice example.
Thus, I need to create something for Teufels Raumfeld System now , just to make sure we do get an equal weight here.
I am curious why you used an additional web service. Not familiar with the Sonos System, but for Raumfeld you can directly connect to the Box and receive those info. Actually, this is the way apps on the smartphone do it.
Re: Micropython + ESP8266 + Sonos
Good question. You can definitely run a web server directly on the esp8266 and skip the separate web server -- I have my music and a bunch of other sonos-related code in the Amazon cloud and it was simpler to have the esp act as an http client and grab the song information. The advantage of doing it that way (although I doubt most people would care) is that I can tell what's playing when I am not home or pause the music if I forgot to when I left.I am curious why you used an additional web service.
-
- Posts: 1
- Joined: Sun Jul 07, 2019 7:42 am
Re: Micropython + ESP8266 + Sonos
Where can I obtain your code? I’m going to steal your idea and have it display volume instead.