Home

Awesome

ESParkle

MQTT driven visual & audio notifier, based on ESP8266.

Features

Audio notifications:

Visual notifications:

Audio & visual notifications can be mixed.

Audio notification are fugitive, limited by the duration of the sound (i.e. won't loop), while visual notifications are persistent. This way, you can still be alerted of an event, even if you were not present during the audio notification.

And because not all events are equally important, you can affect them a different priority level: visual notifications with higher priority will persist if a lower priority notification occurs (sound notifications will always be played, whatever the priority level).

Hardware

*The NeoPixel data line voltage in logic-high state has to be at least 0.7× the NeoPixel power voltage (see https://ben.artins.org/electronics/glitchy-neopixels/)

Wiring

Wiring

Enclosure

A reclaimed deodorant stick makes a nifty enclosure... ;)
Enclosure

Software

ESParkle was tested with the 2.4.0 version of the Arduino libraries for ESP8266.
ESP8266 frequency must be set to 160MHz

External libraries

See README of each library for specific installation instructions.

Settings

Interfaces

MQTT commands

Notifications are triggered by simple JSON messages over MQTT.

Examples

- Play MP3 from URL, at reasonable volume, while displaying red pulses on NeoPixel:
  {"mp3":"http://www.dummyhost.net/esparkle/mp3/starwars.mp3","oncegain":0.4,"led":"Pulse","delay":5,"color":"0xff0000"}

- Play MP3 from SPIFFS, with a green slow sine visual effect:
  {"mp3":"/mp3/toad.mp3","led":"Sine","delay":20,"color":"0x00ff00"}

- Play RTTTL:
  {"rtttl":"starwars:d=4,o=5,b=180:8f,8f,8f,2a#.,2f.6,8d#6,8d6,8c6,2a#.6,f.6,8d#6,8d6,8c6,2a#.6,f.6,8d#6,8d6,8d#6,2c6"}

- Play TTS (via PHP companion script), with a fancy Disco visual effect and high priority:
  {"tts":"You look fantastic today","led":"Disco","priority":9}

- Blinks yellow, quite slowly, at low priority:
  {"led":"Blink","color":"0xffff00","delay":1500,"priority":1}

- Play random MP3 from online repository (via PHP companion script):
  {"mp3":"http://www.dummyhost.net/esparkle/esparkle_mp3.php?action=random"}

- Simple commands:
  {"cmd":"about"}   => display useful information about ESParkle
  {"cmd":"restart"} => restart ESP8266
  {"cmd":"break"}   => stop current notification
  {"cmd":"list"}    => list SPIFFS content
  {"gain":0.5}      => set default gain value
  {"oncegain":0.2}  => set once gain value (handy to adapt poorly encoded MP3 volume)

Tap sensor

Miscellaneous

To do...

Tips & tricks

Useful links

Thanks

Embedded MP3 files are courtesy of https://notificationsounds.com .

Many thanks to all the authors of above libraries, and more generally to all the generous people contributing to the ESP8266 ecosystem.

And a special thank to @earlephilhower for making ESParkle possible, including the essential RTTTL player! ;)

Disclaimer

Even if I try to improve myself, my C++ skills are very limited: I do programming like a Lego player, essentially by assembling bricks made by real programmers.
You've been warned...

For a real disclaimer, see the MIT license.