From e3bafaf014205763dc4f55c1711931f0416a6b13 Mon Sep 17 00:00:00 2001 From: BlubbFish Date: Sun, 24 Sep 2017 10:51:44 +0000 Subject: [PATCH] [BF] for Linux mosquitto_sub --- Mqtt-Dashboard/Connector/Mosquitto.cs | 4 ++-- Mqtt-Dashboard/bin/Release/Dashboard.exe | Bin 32768 -> 32768 bytes 2 files changed, 2 insertions(+), 2 deletions(-) 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 01ceecb59e86aac1c01dfe6b5a1780386d5455a7..a013305252c351dacf526924e29d21efab801a9b 100644 GIT binary patch delta 342 zcmZo@U}|V!n$W={*f+6Dj&ah&mEnvIlNlM+SvjUKFvv{aSf(>Ml2M&;#^grEdd8B; zj7-A3F76Br%nVEn+zbqCGd3$S9Z;5M;9w}w*v`PfRcpw=z@o*(R1Kn8@*e|*iWoRH zso63yv2aYb*VqK4Hh3RCr}@Q&gPA}du8HuyXJVOnzIZ4-CUF1!=)qGcRUiP59ke`HyIfi zRDj-9DPv#=3U&$p`npyly;Rj_#-=|n&PsalZZ;|7U=+%j3Q`XNO(3?yL`5-RkffF` V-ON|1M&Y_ly$_*a0VwS2_Ry delta 337 zcmZo@U}|V!n$W?tzGq^W9An?amEnvwlNlM+Sy`qqFvv{aSf(>Ml2M&;%H&4Idd7mu zj7-A34(<#L%nVEn+zbqCQ#LCy9Z;74#m-Qmv7Lc|tJaW#fklgnsTxGHz@4f+^>{{e{g9**#o3>wAtz0`&mB0Q4dw1A_w4 zs|sZd3_-yz!9`QJg5#F2aPHRbbUXOyU%+OIG7d)Gl&K)~5KuSSw_F++6q)5qCmOJ9 U=BxO{$~3`rvtZqO#)$^(0IVrmzyJUM