Just be aware however that there is no guarentee that a context store will store the data directly, some store types have to stringify the data on store and JSON.parse it on recovery. While this normally works just fine, it can occasionally catch you out because there are some things that don't translate correctly.
I don't know that node. But I can see that deviceManager.js is a library module and so will not have the correct this context. this in the referenced docs refers to a runtime node instance. You would have to pass a reference to that into the library function.
Thanks!
and where can I find Node-RED runtime API specifications for RED.* ???
Is there any method to examine running instances RED.nodes visually from dashboard?
There is not a lot of good documentation for the internals beyond those APIs nodes are expected to use.
If you have specific questions, I'm happy to help try to point you in the right direction. But we do need to good description of what you're trying to do.