eclipse-aaspe / package-explorer

AASX Package Explorer
Other
55 stars 20 forks source link

MQTT Plugin #85

Closed ferremientos closed 6 months ago

ferremientos commented 3 years ago

Describe the bug Hi,

I want to use the MQTT Plugin with the AASx Package Explorer.

When I try to use the cmd line to enable the plugin with " C:\user....\AasxPackageExplorer -dll AasxMqttServer.dll" or " C:\user....\AasxPackageExplorer -dll AasxMqtt\bin\Debug\AasxMqttServer.dll", it doesn't work.

It just open the AASx Package Explorer again.

I appreciate if you can help with this problem.

Thank you! Ferremientos

MichaelHoffmeisterFesto commented 2 years ago

Hello, thanks for try using it! The currently maintained functionality is available via Menu: "File / Server / Publish AAS via MQTT ..". This activates an modal dialogue, where important properties can be set (see JSON below). Starting it will try to connect (as client) to the specified broker. So, in any case, you need a MQTT Broker; either in the internet, your local PC (exisitng for Win 10 also) or e.g. on a Raspberry Pi (I use the 2 latter options). You can monitor the server or you can use the MQTT Explorer privided by the Windows App Store, e.g.

You are right: the "AasxMqtt"-Project in the solution provides some of of lug-in-code, but I think it is rather empty and not maintained (I think it was an example, but the MQTT client code superseded it and is directly in the main application).

Therefore, please try usig the above descrive "AasxMqttClient"-Project by the above described menu comment. We don't have a command-line only tool for it. In the future, we want to join the code base of "aasx-server" and "aasx-package-explorer", then a command-line only tool is an option. Alternatively, feel free to integrate such command into the "AasxToolkit" (should be rather simple).

If you want, I have a node-red / python script for the Raspberry Pi which allows some AAS Event tringgered "blinkenlight" on a 8x8 RGB Matrix.

Best, Michael

Here my snippet from the JSON options of the AasxPackageExplorer: "MqttPublisherOptions": { "BrokerUrl": "192.168.178.97:1883", "MqttRetain": false, "EnableFirstPublish": true, "FirstTopicAAS": "AAS", "FirstTopicSubmodel": "{aas}/Submodel_{sm}", "EnableEventPublish": true, "EventTopic": "Events/aas/{aas}/sm/{sm}/{path}", "SingleValuePublish": true, "SingleValueFirstTime": true, "SingleValueTopic": "Values/aas/{aas}/sm/{sm}/{path}" },

juileetikekar commented 6 months ago

Hi @ferremientos,

We hope the information provided above has helped you solve the issue. Please reopen the issue, if you face it again.