-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke direct Method and configure OPC Publisher through MQTT topic #2039
Comments
This is correct. Can you provide me with the --mtt value you used so I can repro this? Did you make sure you provide a response topic in the MQTT v5 message sent to the topic? Samples are on the list of most requested feature. I hope I can get around to it after 2.9.1 is out. |
Thanks marcshier for your response. |
The mtt option allows setting the root path for all methods. Using a templating model. When you use it though the actual topic to call for a method is the configured path, plus the method name. So if you use --mtt x/y/z to call the method a, you send the payload to /x/y/z/a. If using mqtt 5 the payload needs to also specify the response topic. That can be any tpoc you have already subscribed to on the broker. Although I recommend to use a unique one per call. Your client library will allow you to specify that topic during publish, typically on the message object you publish. In mqttnet you do this as a property of the applocationmessage object you pass to Publish method. |
Thanks marcschier, I'm sharing my snippet for better understanding. Iam running the sample project from Industrial-IoT Repo and play with it to fits my needs. Below snippet of my opcpublisher with I simple tried to invoke below my simple python mqttclient using paho with that publish payload
But the terminal not showing any response on the response topic Also I implemented the same mqtt client using dotnet mqttnet library but still getting the same results. |
I have tried the same and found a hole in our testing. I also wrote a quick sample using mqttnet while at it. |
Samples showing several calls via mqtt are now in the samples folder (in main). They only work with 2.9.1 which will be released soon. |
Thanks marcshier |
I am publishing my telemetry successsfully from opcpublisher to MQTT broker using --ttt (telemetrytopictemplate).
Since MQTT v5 supports RPC which allows a client to call the OPC Publisher over MQTT. I want to Invoke and configure OPC Publisher through MQTT topic.
As mentioned in the doc here:
In addition to calling the API through HTTP REST calls (Preview) you can call the configuration API through MQTT v5 (Preview) in OPC Publisher 2.9.
Following commandline.md , I configured my opcpublisher by adding --mtt(method topic tempelate) flag and append the method name after the topic template: xx/xxxx/methods/GetConfiguredEndpoints_V2.
However I wasn't able to invoke/Configure the opcpublisher
I need a demo or simple example showing end-to-end how to invoke and configure opcpublisher module using mqtt topic
thanks
The text was updated successfully, but these errors were encountered: