Great piece of work @zxdavb! Had I seen yours before, I wouldn't have bothered doing the evolistener script, and would have just used yours as the basis for what I need!

Would you consider hooking it up to MQTT, so that other home automation systems (e.g. openHAB) can also use it?