ubus-listen.py import ubus ubus.connect("/var/run/ubus.sock") if not ubus: print("ubus is empty or broken") exit() def callback(event, data): print("===== event %s received with value: %s" % (event, data)) ubus.listen(("mevent", callback)) ubus.loop() ubus.disconnect() ubus-send.py import ubus ubus.connect("/var/run/ubus.sock") if not ubus: print('ubus empty') exit(); print("sending event mevent..