diff --git a/IoT/Connector/Data/Mosquitto/Mosquitto.cs b/IoT/Connector/Data/Mosquitto/Mosquitto.cs index 34beb6a..aa43517 100644 --- a/IoT/Connector/Data/Mosquitto/Mosquitto.cs +++ b/IoT/Connector/Data/Mosquitto/Mosquitto.cs @@ -17,6 +17,7 @@ namespace BlubbFish.Utils.IoT.Connector.Data { this.message = ""; this.p = new Process(); this.p.StartInfo.FileName = "mosquitto_sub"; + String topic = "#"; String args = "-h " + this.settings["server"]+" "; if(this.settings.ContainsKey("port")) { args += "-p "+ this.settings["port"]+" "; @@ -30,7 +31,10 @@ namespace BlubbFish.Utils.IoT.Connector.Data { if (this.settings.ContainsKey("key")) { args += "--key " + this.settings["key"] + " "; } - this.p.StartInfo.Arguments = args+"-t \"#\" -v -d"; + if(this.settings.ContainsKey("topic")) { + topic = this.settings["topic"]; + } + this.p.StartInfo.Arguments = args+"-t \""+ topic + "\" -v -d"; this.p.StartInfo.CreateNoWindow = true; this.p.StartInfo.UseShellExecute = false; this.p.StartInfo.RedirectStandardOutput = true; diff --git a/IoT/Connector/Data/Mosquitto/bin/Release/ConnectorDataMosquitto.dll b/IoT/Connector/Data/Mosquitto/bin/Release/ConnectorDataMosquitto.dll index ff14b9a..a259e02 100644 Binary files a/IoT/Connector/Data/Mosquitto/bin/Release/ConnectorDataMosquitto.dll and b/IoT/Connector/Data/Mosquitto/bin/Release/ConnectorDataMosquitto.dll differ diff --git a/IoT/Connector/Data/Mosquitto/bin/Release/Utils-IoT.dll b/IoT/Connector/Data/Mosquitto/bin/Release/Utils-IoT.dll index 2461c96..13dfc9b 100644 Binary files a/IoT/Connector/Data/Mosquitto/bin/Release/Utils-IoT.dll and b/IoT/Connector/Data/Mosquitto/bin/Release/Utils-IoT.dll differ diff --git a/IoT/bin/Release/Utils-IoT.dll b/IoT/bin/Release/Utils-IoT.dll index 2461c96..13dfc9b 100644 Binary files a/IoT/bin/Release/Utils-IoT.dll and b/IoT/bin/Release/Utils-IoT.dll differ diff --git a/Utils/bin/Release/Utils.dll b/Utils/bin/Release/Utils.dll index 0682160..fe15676 100644 Binary files a/Utils/bin/Release/Utils.dll and b/Utils/bin/Release/Utils.dll differ