Custom events from device to widget

hi I’m trying to update my widget based on an event from the device.
In the device I have this.homey.emit(“myEvent”); (which works just fine if I call this.homey.on(“myEvent”) in the same device.

When I call this from the widget I don’t get any event:
Homey.on(“myEvent”, () => doSomething());

does anybody have a tip? I couldn’t find this in the docs, it seems it could be here: Custom Pairing Views | Homey Apps SDK
but that link is not working

Poorly (read: not) documented:

this.homey.api.realtime('myEvent', ...);
1 Like

Will try it later, thx!

You are gold! thanks!
For future reference:
in the device:
this.homey.api.realtime(“myEvent”, …);
in the widget.html:
Homey.on(“myEvent”, () => doSomething());