bisitariak-koloretsua/README.md
2024-09-01 06:21:29 +02:00

1.3 KiB

bisitariak & koloretsua

those scripts are used to made a lamp who illuminates with various colors (generated based on visitor's IP address) when someone visit my websites (detection based on nginx logs)

to use them, you need a MQTT broker
if you want to use a public broker: https://www.maqiatto.com/

'bisitariak' means 'visitors' and 'koloretsua' means 'colorful' in Basque

bisitariak

this script monitors nginx access logs and advertises any new visits to a MQTT broker
it comes with it's sibbling script (koloretsua) wich turn on a LED strip for each visitor, using an ESP microcontroller

TODO:

  • properly detect any new visits
    • FIXME: to test properly
  • extract their associated IP address
  • generate a color based on this IP address
  • advertise new visitors (and their associated color) on the MQTT broker

koloretsua

this script is using CircuitPython and MiniMQTT

install

  • flash an ESP card with CircuitPython (i used a Wemos S2 mini)
  • put the files from the koloretsua/lib directory in the lib directory of your ESP card
  • put the code.py file in the root of your ESP
  • copy the settings.toml.example file into the root of your ESP, rename it to settings.toml and configure it