OpenMarine

Full Version: Retrieving stale signal k data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to retrieve some data from the defaults plugin. Like design.draft and design.length. These data points are only updated on restart so the Subscribe node will not receive the data. Is there any way to query the data using Signal K Node Red plugins.
I am not aware of an easy way to do that. Please add an issue about this at https://github.com/SignalK/node-red-embedded/issues/new.

PS. The data is not really stale, just not available via subscription. And I believe you are referring to defaults.json, not to any plugin.
Thanks for the response. I will add an issue as requested. Not sure if it is defaults.json. I only know in Signal K's data browser it has a source named defaults.
Got a fast response on github.

It seems the only way is to use a function with the following code.

let app = global.get('app')
let draft = app.getSelfPath('design.draft.value')
msg.draft = draft
return msg;