That facebook icon that tells you how many new messages you have? Useful, huh? You don’t leave the page, and it gets updated. It’s a little trick done with a combination of SQL and asynchronous jQuery.
I needed to implement notifications for a few applications at work, so I’ve found a way to implement this with just a few lines of jQuery and an asynchronous call to the database.
Update: This project has been taken offline, but the project notes/source code is still available on github.
Currently, this little iOT Lamp is running on a pi-zero-w with a Pimoroni Unicorn pHat. The scripts are all written in python — some of which are the examples that come either with the Pimoroni BlinkIt or Pimoroni Unicorn, others of which I pulled from some of the Adafruit NeoPixel libraries, and yet a couple of which I wrote myself. The webserver itself is running right on the pi-zero-w — apache2 and php 7.2 — and is configured to launch an ssh connection from Amazon EC2 to my home R2-D2 lamp to send the commands.