I am using an MQTT block and a Sparkplug block as subscribers as shown below.
I am trying to publish .json data onto the broker and use these two blocks as subscribers to receive the payload.
In case of the MQTT block, the debug is successful and it shows up in the debug pane as
In case of the Sparkplugplus block, the debug is not successful and I get an error message saying
Could someone help me fix this error? Thank you.
Is this a continuation of your
previous post? If so then please continue it there.
I recommend you read the node documentation, to send data you need use this kind of format, for example:
"name": "Node Control/Rebirth",
You can find instruction to use and test an example in the
mqtt sparkplug documentation make sure that change your MQTT topic before used it:
I think that you had already found the solution:
@Steve-Mcl its working now without any errors. I figured out a fix for it and while the .json format was fine by itself , msg.payload could only be used with as a function block. when I try to use the same .json code in the inject node as a .json input itr gives me error unless I remove the msg.paylaod line and return.msg line.
error in payload
I need solution not a monitoring on my posts in here. I am trying my best to learn with limited resources and fyi no this is not the same. Also, I am not limited to making a single post in here.
Let's focus out time and efforts on the question here.
@MecatronicaMADE if I did I have no reason to make another post. Thank you for tagging my previous post but assess them before you tag them in my future posts cause they are not both the same.
The example you mentioned in there only talks about mqtt sparkplug block inside the node red. That is not my question.
I had previously focused on trying to help you with your problem in the
previous post , but you abandoned that post without telling us what the solution was. In what way does that encourage us to try to help with this one?
I do not want to discuss about a previous post which i fixed by myself in here. The question here is confined to this space.
@sn19 as a common courtesy, if you manage to resolve a problem for yourself, you could just add a post on the thread to say so - that lets the community know they don't need to keep trying to help and it can be closed.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.