diff --git a/Mqtt-Dashboard/Connector/Mosquitto.cs b/Mqtt-Dashboard/Connector/Mosquitto.cs index bb399ec..7483c9f 100644 --- a/Mqtt-Dashboard/Connector/Mosquitto.cs +++ b/Mqtt-Dashboard/Connector/Mosquitto.cs @@ -13,7 +13,7 @@ namespace Dashboard.Connector { public Mosquitto(Dictionary mqtt_settings) { this.settings = mqtt_settings; - //mosquitto_sub --cafile ca.pem --cert cert.pem --key cert.key -h swb.broker.flex4grid.eu -p 8883 -t /# -v + //mosquitto_sub --cafile ca.pem --cert cert.pem --key cert.key -h swb.broker.flex4grid.eu -p 8883 -t "#" -v -d this.message = ""; this.p = new Process(); this.p.StartInfo.FileName = "mosquitto_sub"; @@ -76,7 +76,7 @@ namespace Dashboard.Connector { if (e.Data != null) { if (e.Data.StartsWith("Client mosqsub")) { if (this.message != "" && this.message.IndexOf(" received PUBLISH ") > 0) { - MatchCollection matches = (new Regex("^Client mosqsub\\|.*received PUBLISH \\(.*,.*,.*,.*, '(.*)'.*\\)\\)\n[^ ]* (.*)$", RegexOptions.IgnoreCase | RegexOptions.Singleline)).Matches(this.message); + MatchCollection matches = (new Regex("^Client mosqsub[\\|/].*received PUBLISH \\(.*,.*,.*,.*, '(.*)'.*\\)\\)\n[^ ]* (.*)$", RegexOptions.IgnoreCase | RegexOptions.Singleline)).Matches(this.message); String topic = matches[0].Groups[1].Value; String message = matches[0].Groups[2].Value.Trim(); this.MessageIncomming?.Invoke(this, new MqttEventArgs(message, topic)); diff --git a/Mqtt-Dashboard/bin/Release/Dashboard.exe b/Mqtt-Dashboard/bin/Release/Dashboard.exe index 01ceecb..a013305 100644 Binary files a/Mqtt-Dashboard/bin/Release/Dashboard.exe and b/Mqtt-Dashboard/bin/Release/Dashboard.exe differ