I have a bunch of clients who wants async updates via GET /messages?deviceId={id} using the OBSERVE option. But these messages are addressed to a single device, identified via deviceId (passed along as a query option in the GET). When the server receives a message intended for device foo, I don't want device bar to be alerted.
It's not clear to me how I would do this using ObservableResource since the updated_state() method will alert ALL observers. Redesigning it so that there is one proper endpoint per device would be doable, but if possible I'd MUCH prefer using the query option method.
It looks somwhat trivial to implement by overriding updated_state method but if aiocoap can do this natively then I'd obviously prefer that :)
I have a bunch of clients who wants async updates via
GET /messages?deviceId={id}
using the OBSERVE option. But these messages are addressed to a single device, identified viadeviceId
(passed along as a query option in the GET). When the server receives a message intended for devicefoo
, I don't want devicebar
to be alerted.It's not clear to me how I would do this using
ObservableResource
since theupdated_state()
method will alert ALL observers. Redesigning it so that there is one proper endpoint per device would be doable, but if possible I'd MUCH prefer using the query option method.It looks somwhat trivial to implement by overriding
updated_state
method but if aiocoap can do this natively then I'd obviously prefer that :)