- My goal is to get the output from
Sys.GetInfo
for further work within the code - My actions were to follow the example from the documentation and here:
Event.on(Event.CLOUD_CONNECTED, function () {
RPC.call(device_id, 'Sys.GetInfo', null, function (resp, err_code, err_msg, ud) {
if (err_code !== 0) {
Log.debug("Error: (" + JSON.stringify(err_code) + ') ' + err_msg);
} else {
Log.debug('Result: ' + JSON.stringify(resp));
}
}, null);
}, null);
- The result I see is that I get a message with the content
{"src":"my_device_id","dst":"my_device_id","id":4069,"method":"Sys.GetInfo","params":}
at the MQTT broker in theresponse
topic. - My expectation & question is that I would get the output of the response from the RPC.LOCAL call within the callback. I suspect, that RPC-MQTT redirects the
RPC.call
method directly to the MQTT broker.
I would really love to understand how I can redirect the output into the callback function.
Thanks a lot for your support.