diff --git a/Lora-Bot.sln b/Lora-Bot.sln index 1d97089..2c7c031 100644 --- a/Lora-Bot.sln +++ b/Lora-Bot.sln @@ -7,6 +7,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lora-Bot", "Lora-Bot\Lora-B EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lora", "..\Lora\Lora\Lora.csproj", "{85A78B05-5843-4E4D-8C56-4BCB12613750}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Iot-Interfaces", "..\Utils\IoT\Interfaces\Iot-Interfaces.csproj", "{4DAADA29-C600-4CF3-8AD3-9C97C8D7F632}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "litjson_4.7.1", "..\Librarys\litjson\litjson\litjson_4.7.1.csproj", "{91A14CD2-2940-4500-8193-56D37EDDDBAA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot-Utils", "..\Utils\Bot-Utils\Bot-Utils.csproj", "{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "..\Utils\Utils\Utils.csproj", "{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectorDataMqtt", "..\Utils\IoT\Connector\Data\Mqtt\ConnectorDataMqtt.csproj", "{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils-IoT", "..\Utils\IoT\Utils-IoT.csproj", "{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2Mqtt_4.7.1", "..\Librarys\mqtt\M2Mqtt\M2Mqtt_4.7.1.csproj", "{A11AEF5A-B246-4FE8-8330-06DB73CC8074}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +35,34 @@ Global {85A78B05-5843-4E4D-8C56-4BCB12613750}.Debug|Any CPU.Build.0 = Debug|Any CPU {85A78B05-5843-4E4D-8C56-4BCB12613750}.Release|Any CPU.ActiveCfg = Release|Any CPU {85A78B05-5843-4E4D-8C56-4BCB12613750}.Release|Any CPU.Build.0 = Release|Any CPU + {4DAADA29-C600-4CF3-8AD3-9C97C8D7F632}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4DAADA29-C600-4CF3-8AD3-9C97C8D7F632}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DAADA29-C600-4CF3-8AD3-9C97C8D7F632}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4DAADA29-C600-4CF3-8AD3-9C97C8D7F632}.Release|Any CPU.Build.0 = Release|Any CPU + {91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.Build.0 = Release|Any CPU + {BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.Build.0 = Release|Any CPU + {FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.Build.0 = Release|Any CPU + {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}.Release|Any CPU.Build.0 = Release|Any CPU + {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.Build.0 = Release|Any CPU + {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A11AEF5A-B246-4FE8-8330-06DB73CC8074}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Lora-Bot/Lora-Bot.csproj b/Lora-Bot/Lora-Bot.csproj index 9f4c937..dc41609 100644 --- a/Lora-Bot/Lora-Bot.csproj +++ b/Lora-Bot/Lora-Bot.csproj @@ -31,6 +31,9 @@ prompt 4 + + app.manifest + @@ -42,14 +45,69 @@ + + + + + + {ee6c8f68-ed46-4c1c-abdd-cfcdf75104f2} + ConnectorDataMqtt + + + {b870e4d5-6806-4a0b-b233-8907eedc5afc} + Utils-IoT + + + {fac8ce64-bf13-4ece-8097-aeb5dd060098} + Utils + + + {91a14cd2-2940-4500-8193-56d37edddbaa} + litjson_4.7.1 + {85a78b05-5843-4e4d-8c56-4bcb12613750} Lora + + {bb7bfcb5-3db0-49e1-802a-3ce3eecc59f9} + Bot-Utils + + + {4daada29-c600-4cf3-8ad3-9c97c8d7f632} + Iot-Interfaces + + + + + Designer + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + \ No newline at end of file diff --git a/Lora-Bot/Moduls/Googlelocation.cs b/Lora-Bot/Moduls/Googlelocation.cs new file mode 100644 index 0000000..c463338 --- /dev/null +++ b/Lora-Bot/Moduls/Googlelocation.cs @@ -0,0 +1,87 @@ +/*using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Text; +using System.Threading; +using BlubbFish.Utils; +using BlubbFish.Utils.IoT.Bots.Moduls; +using Fraunhofer.Fit.Iot.Lora; +using Fraunhofer.Fit.Iot.Lora.Devices; +using LitJson; + +namespace Fraunhofer.Fit.IoT.Bots.LoraBot.Moduls_broken { + class Googlelocation : AModul { + private readonly HttpListener _listener = new HttpListener(); + private readonly Dictionary> locations = new Dictionary>(); + + public override event ModulEvent Update; + + public Googlelocation(LoraController lib, InIReader settings) : base(lib, settings) { + this._listener.Prefixes.Add("http://+:8080/"); + this._listener.Start(); + this.Run(); + } + + private void Run() { + ThreadPool.QueueUserWorkItem((o) => { + Console.WriteLine("Webserver is Running..."); + try { + while(this._listener.IsListening) { + ThreadPool.QueueUserWorkItem((c) => { + HttpListenerContext ctx = c as HttpListenerContext; + try { + String rstr = this.SendResponse(ctx.Request); + Byte[] buf = Encoding.UTF8.GetBytes(rstr); + ctx.Response.ContentLength64 = buf.Length; + ctx.Response.OutputStream.Write(buf, 0, buf.Length); + } + catch { } + finally { + ctx.Response.OutputStream.Close(); + } + }, this._listener.GetContext()); + } + } + catch { }; + }); + } + + private String SendResponse(HttpListenerRequest request) { + if(request.Url.PathAndQuery == "/") { + if(File.Exists("resources/google.html")) { + try { + String file = File.ReadAllText("resources/google.html"); + file = file.Replace("{%YOUR_API_KEY%}", this.config["google"]["api_key"]); + return file; + } + catch { return "500"; } + } + return "404"; + } + if(request.Url.PathAndQuery == "/loc") { + Dictionary ret = new Dictionary(); + foreach (KeyValuePair> devices in this.locations) { + Dictionary subret = new Dictionary(); + Int32 i = 0; + foreach (LoraClient item in devices.Value) { + subret.Add(i++.ToString(), item.ToDictionary()); + } + ret.Add(devices.Key, subret); + } + return JsonMapper.ToJson(ret); + } + return "

Works

"+ request.Url.PathAndQuery; + } + + public override void Dispose() { + this._listener.Stop(); + this._listener.Close(); + } + + protected override void UpdateConfig() { + } + + } +} +*/ \ No newline at end of file diff --git a/Lora-Bot/Moduls/Mqtt.cs b/Lora-Bot/Moduls/Mqtt.cs new file mode 100644 index 0000000..ceffc8c --- /dev/null +++ b/Lora-Bot/Moduls/Mqtt.cs @@ -0,0 +1,49 @@ +using System; +using BlubbFish.Utils; +using BlubbFish.Utils.IoT.Bots; +using BlubbFish.Utils.IoT.Bots.Events; +using BlubbFish.Utils.IoT.Bots.Moduls; +using BlubbFish.Utils.IoT.Connector; +using BlubbFish.Utils.IoT.Interfaces; +using Fraunhofer.Fit.Iot.Lora; +using Fraunhofer.Fit.Iot.Lora.Events; + +namespace Fraunhofer.Fit.IoT.Bots.LoraBot.Moduls { + class Mqtt : Mqtt { + public override event ModulEvent Update; + + public Mqtt(LoraController lib, InIReader settings) : base(lib, settings) { } + + protected override void Connect() { + this.mqtt = ABackend.GetInstance(this.config["settings"], ABackend.BackendType.Data); + //this.mqtt.MessageIncomming += this.EventInput; + this.library.Update += this.EventOutput; + Console.WriteLine("Connect!"); + } + + protected override void Disconnect() { + this.library.Update -= this.EventOutput; + if (this.mqtt != null) { + this.mqtt.Dispose(); + } + this.mqtt = null; + Console.WriteLine("Disconnect!"); + } + + protected virtual void EventOutput(Object sender, DeviceUpdateEvent e) { + String topic = ""; + String data = ""; + if (e.Parent.GetType().HasInterface(typeof(IMqtt))) { + IMqtt sensor = (IMqtt)e.Parent; + topic = "lora/" + sensor.MqttTopic(); + data = sensor.ToJson(); + } + Console.WriteLine(topic); + Console.WriteLine(data); + if (topic != "" && data != "") { + ((ADataBackend)this.mqtt).Send(topic, data); + this.Update?.Invoke(this, new MqttEvent(topic, data)); + } + } + } +} diff --git a/Lora-Bot/Moduls/Scral.cs b/Lora-Bot/Moduls/Scral.cs new file mode 100644 index 0000000..f1dcb8e --- /dev/null +++ b/Lora-Bot/Moduls/Scral.cs @@ -0,0 +1,130 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using BlubbFish.Utils; +using BlubbFish.Utils.IoT.Bots; +using BlubbFish.Utils.IoT.Bots.Moduls; +using Fraunhofer.Fit.Iot.Lora; +using Fraunhofer.Fit.Iot.Lora.Devices; +using LitJson; + +namespace Fraunhofer.Fit.IoT.Bots.LoraBot.Moduls +{ + public class Scral : AModul + { + private readonly List nodes = new List(); + public override event ModulEvent Update; + private Object getLock = new Object(); + private String server = "https://portal.monica-cloud.eu/"; + public Scral(LoraController lib, InIReader settings) : base(lib, settings) + { + lib.Update += Lib_Update; + } + + private void Lib_Update(object sender, Iot.Lora.Events.DeviceUpdateEvent e) + { + LoraClient l = (LoraClient)e.Parent; + if (!nodes.Contains(l.Name)) + { + this.Register(l); + this.nodes.Add(l.Name); + } + this.SendUpdate(l); + + } + + private void SendUpdate(LoraClient l) { + if (l.Gps.Fix) { + Dictionary d = new Dictionary { + { "type", "uwb"}, + { "tagId", l.Name}, + { "timestamp", DateTime.Now.ToString("o") }, + { "lat", l.Gps.Latitude}, + { "lon", l.Gps.Longitude}, + { "bearing", l.Rssi }, + { "herr",l.Gps.Hdop}, + { "battery_level",l.Snr} + }; + this.RequestString("scral/puetz/dexels/wearable/localization", JsonMapper.ToJson(d), false, RequestMethod.PUT); + this.Update?.Invoke(this, new BlubbFish.Utils.IoT.Bots.Events.ModulEventArgs("scral/puetz/dexels/wearable/localization", "PUT", JsonMapper.ToJson(d), "SCRAL")); + } + } + + private void Register(LoraClient l) { + Dictionary d = new Dictionary { + { "device", "wearable" }, + { "sensor", "tag" }, + { "type", "uwb" }, + { "tagId", l.Name}, + { "timestamp", DateTime.Now.ToString("o") }, + { "unitOfMeasurements", "meters" }, + { "observationType", "propietary" }, + { "state", "active" } + }; + this.RequestString("scral/puetz/dexels/wearable", JsonMapper.ToJson(d), false, RequestMethod.POST); + this.Update?.Invoke(this, new BlubbFish.Utils.IoT.Bots.Events.ModulEventArgs("scral/puetz/dexels/wearable", "POST", JsonMapper.ToJson(d), "SCRAL")); + } + + public override void Dispose() + { + //throw new NotImplementedException(); + } + + protected override void UpdateConfig() { } + + private String RequestString(String address, String json = "", Boolean withoutput = true, RequestMethod method = RequestMethod.GET) + { + String ret = null; + lock (this.getLock) + { + HttpWebRequest request = WebRequest.CreateHttp(this.server + address); + request.Timeout = 5000; + if (method == RequestMethod.POST || method == RequestMethod.PUT) + { + Byte[] requestdata = Encoding.ASCII.GetBytes(json); + request.ContentLength = requestdata.Length; + request.Method = method.ToString(); + request.ContentType = "application/json"; + using (Stream stream = request.GetRequestStream()) + { + stream.Write(requestdata, 0, requestdata.Length); + } + } + try + { + using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) + { + if (response.StatusCode == HttpStatusCode.Unauthorized) + { + Console.Error.WriteLine("Benutzer oder Passwort falsch!"); + throw new Exception("Benutzer oder Passwort falsch!"); + } + if (withoutput) + { + StreamReader reader = new StreamReader(response.GetResponseStream()); + ret = reader.ReadToEnd(); + } + } + } + catch (Exception e) + { + Helper.WriteError("Konnte keine Verbindung zum Razzbery Server herstellen. Resource: \"" + this.server + address + "\" Fehler: " + e.Message); + return null; + //throw new Exceptions.ConnectionException("Konnte keine Verbindung zum Razzbery Server herstellen: " + e.Message); + } + } + return ret; + } + + private enum RequestMethod + { + GET, + POST, + PUT + } + } +} diff --git a/Lora-Bot/Moduls/Txtout.cs b/Lora-Bot/Moduls/Txtout.cs new file mode 100644 index 0000000..809cfba --- /dev/null +++ b/Lora-Bot/Moduls/Txtout.cs @@ -0,0 +1,41 @@ +using System; +using System.IO; +using BlubbFish.Utils; +using BlubbFish.Utils.IoT.Bots.Events; +using BlubbFish.Utils.IoT.Bots.Moduls; +using Fraunhofer.Fit.Iot.Lora; +using Fraunhofer.Fit.Iot.Lora.Devices; +using Fraunhofer.Fit.Iot.Lora.Events; + +namespace Fraunhofer.Fit.IoT.Bots.LoraBot.Moduls { + public class Txtout : AModul { + public override event ModulEvent Update; + + private readonly String filename; + private readonly StreamWriter file; + + public Txtout(LoraController lib, InIReader settings) : base(lib, settings) { + if (this.config.ContainsKey("general") && this.config["general"].ContainsKey("path")) { + this.filename = this.config["general"]["path"]; + this.file = new StreamWriter(this.filename); + this.library.Update += this.Library_Update; + } + } + + private void Library_Update(Object sender, DeviceUpdateEvent e) { + if (sender is LoraClient l) { + String s = l.Name + "," + l.Receivedtime.ToString("o") + "," + l.Gps.Latitude + "," + l.Gps.Longitude + ",https://www.google.de/maps?q=" + l.Gps.Latitude + "%2C" + l.Gps.Longitude + "," + l.Rssi + "," + l.PacketRssi + "," + l.Snr; + this.file.WriteLine(s); + this.file.Flush(); + this.Update?.Invoke(this, new ModulEventArgs(this.filename, "Line", s, "TXTOUT")); + } + } + + public override void Dispose() { + this.file.Flush(); + this.file.Close(); + } + + protected override void UpdateConfig() {} + } +} \ No newline at end of file diff --git a/Lora-Bot/Program.cs b/Lora-Bot/Program.cs index 8883bdf..76e340f 100644 --- a/Lora-Bot/Program.cs +++ b/Lora-Bot/Program.cs @@ -1,14 +1,37 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using BlubbFish.Utils; +using BlubbFish.Utils.IoT.Bots; +using BlubbFish.Utils.IoT.Interfaces; using Fraunhofer.Fit.Iot.Lora; -namespace LoraDisplay { - class Program { - static void Main(String[] args) { - LoraController l = new LoraController(); +namespace Fraunhofer.Fit.IoT.Bots.LoraBot { + class Program : Bot { + static void Main(String[] args) => new Program(args); + public Program(String[] args) { + InIReader.SetSearchPath(new List() { "/etc/lorabot", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\lorabot" }); + if (!InIReader.ConfigExist("settings")) { + Helper.WriteError("No settings.ini found. Abord!"); + return; + } + InIReader settings = InIReader.GetInstance("settings"); + this.logger.SetPath(settings.GetValue("logging", "path")); + LoraController lora = new LoraController(settings.GetSection("lora")); + this.ModulLoader("Fraunhofer.Fit.IoT.Bots.LoraBot.Moduls", lora); + this.ModulInterconnect(); + this.ModulEvents(); + lora.Update += this.LoraDataUpdate; + this.WaitForShutdown(); + Console.WriteLine("after wait"); + this.ModulDispose(); + Console.WriteLine("after dispose"); + lora.Dispose(); + Console.WriteLine("after loradisp"); } + + private void LoraDataUpdate(Object sender, Iot.Lora.Events.DeviceUpdateEvent e) { + Console.WriteLine("-> Lora [" + e.UpdateTime + "]: " + e.Parent.ToString()); + } + } } diff --git a/Lora-Bot/Properties/AssemblyInfo.cs b/Lora-Bot/Properties/AssemblyInfo.cs index 4b59ca4..07f824a 100644 --- a/Lora-Bot/Properties/AssemblyInfo.cs +++ b/Lora-Bot/Properties/AssemblyInfo.cs @@ -1,36 +1,39 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die einer Assembly zugeordnet sind. -[assembly: AssemblyTitle("LoraDisplay")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("LoraDisplay")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly -// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von -// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("fb11b997-af4d-427f-96fd-4c84143057cf")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, -// übernehmen, indem Sie "*" eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("LoraDisplay")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LoraDisplay")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("fb11b997-af4d-427f-96fd-4c84143057cf")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.1.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] +/* + * 1.1.0.0 Update Scral addresses + */ \ No newline at end of file diff --git a/Lora-Bot/app.manifest b/Lora-Bot/app.manifest new file mode 100644 index 0000000..f21a980 --- /dev/null +++ b/Lora-Bot/app.manifest @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Lora-Bot/bin/Release/Bot-Utils.dll b/Lora-Bot/bin/Release/Bot-Utils.dll new file mode 100644 index 0000000..3bd46d5 Binary files /dev/null and b/Lora-Bot/bin/Release/Bot-Utils.dll differ diff --git a/Lora-Bot/bin/Release/ConnectorDataMqtt.dll b/Lora-Bot/bin/Release/ConnectorDataMqtt.dll new file mode 100644 index 0000000..6779a24 Binary files /dev/null and b/Lora-Bot/bin/Release/ConnectorDataMqtt.dll differ diff --git a/Lora-Bot/bin/Release/Iot-Interfaces.dll b/Lora-Bot/bin/Release/Iot-Interfaces.dll new file mode 100644 index 0000000..1172216 Binary files /dev/null and b/Lora-Bot/bin/Release/Iot-Interfaces.dll differ diff --git a/Lora-Bot/bin/Release/Lora-Bot.exe b/Lora-Bot/bin/Release/Lora-Bot.exe new file mode 100644 index 0000000..1b8e182 Binary files /dev/null and b/Lora-Bot/bin/Release/Lora-Bot.exe differ diff --git a/Lora-Bot/bin/Release/Lora.dll b/Lora-Bot/bin/Release/Lora.dll new file mode 100644 index 0000000..20afb71 Binary files /dev/null and b/Lora-Bot/bin/Release/Lora.dll differ diff --git a/Lora-Bot/bin/Release/M2Mqtt.dll b/Lora-Bot/bin/Release/M2Mqtt.dll new file mode 100644 index 0000000..4d872de Binary files /dev/null and b/Lora-Bot/bin/Release/M2Mqtt.dll differ diff --git a/Lora-Bot/bin/Release/Unosquare.RaspberryIO.dll b/Lora-Bot/bin/Release/Unosquare.RaspberryIO.dll new file mode 100644 index 0000000..95d6c16 Binary files /dev/null and b/Lora-Bot/bin/Release/Unosquare.RaspberryIO.dll differ diff --git a/Lora-Bot/bin/Release/Unosquare.Swan.Lite.dll b/Lora-Bot/bin/Release/Unosquare.Swan.Lite.dll new file mode 100644 index 0000000..5eb0d5f Binary files /dev/null and b/Lora-Bot/bin/Release/Unosquare.Swan.Lite.dll differ diff --git a/Lora-Bot/bin/Release/Unosquare.Swan.dll b/Lora-Bot/bin/Release/Unosquare.Swan.dll new file mode 100644 index 0000000..b20276b Binary files /dev/null and b/Lora-Bot/bin/Release/Unosquare.Swan.dll differ diff --git a/Lora-Bot/bin/Release/Utils-IoT.dll b/Lora-Bot/bin/Release/Utils-IoT.dll new file mode 100644 index 0000000..6d3a46e Binary files /dev/null and b/Lora-Bot/bin/Release/Utils-IoT.dll differ diff --git a/Lora-Bot/bin/Release/Utils.dll b/Lora-Bot/bin/Release/Utils.dll new file mode 100644 index 0000000..3193878 Binary files /dev/null and b/Lora-Bot/bin/Release/Utils.dll differ diff --git a/Lora-Bot/bin/Release/config-example/mqtt.conf.example b/Lora-Bot/bin/Release/config-example/mqtt.conf.example new file mode 100644 index 0000000..5477ead --- /dev/null +++ b/Lora-Bot/bin/Release/config-example/mqtt.conf.example @@ -0,0 +1,6 @@ +[modul] +config=private + +[settings] +type=mqtt +server=localhost diff --git a/Lora-Bot/bin/Release/config-example/settings.conf.example b/Lora-Bot/bin/Release/config-example/settings.conf.example new file mode 100644 index 0000000..9ee7bb3 --- /dev/null +++ b/Lora-Bot/bin/Release/config-example/settings.conf.example @@ -0,0 +1,8 @@ +[logging] +path=/var/log/lorabot.log + +[lora] +frequency=868100000 +spreadingfactor=8 +signalbandwith=125000 +codingrate=6 \ No newline at end of file diff --git a/Lora-Bot/bin/Release/config-example/txtout.conf.example b/Lora-Bot/bin/Release/config-example/txtout.conf.example new file mode 100644 index 0000000..5a41aad --- /dev/null +++ b/Lora-Bot/bin/Release/config-example/txtout.conf.example @@ -0,0 +1,2 @@ +[general] +path=/home/pi/coords.txt \ No newline at end of file diff --git a/Lora-Bot/bin/Release/gpio.2.44 b/Lora-Bot/bin/Release/gpio.2.44 new file mode 100644 index 0000000..573c114 Binary files /dev/null and b/Lora-Bot/bin/Release/gpio.2.44 differ diff --git a/Lora-Bot/bin/Release/litjson.dll b/Lora-Bot/bin/Release/litjson.dll new file mode 100644 index 0000000..fec89ca Binary files /dev/null and b/Lora-Bot/bin/Release/litjson.dll differ diff --git a/Lora-Bot/bin/Release/lora.sh b/Lora-Bot/bin/Release/lora.sh new file mode 100644 index 0000000..394f67e --- /dev/null +++ b/Lora-Bot/bin/Release/lora.sh @@ -0,0 +1,5 @@ +for(( ; ; )) +do + sudo mono --debug Lora-Bot.exe +done + \ No newline at end of file diff --git a/Lora-Bot/config-example/googlelocation.conf.example b/Lora-Bot/config-example/googlelocation.conf.example new file mode 100644 index 0000000..d19d33a --- /dev/null +++ b/Lora-Bot/config-example/googlelocation.conf.example @@ -0,0 +1,2 @@ +[google] +api_key = 12345345345673645 \ No newline at end of file diff --git a/Lora-Bot/config-example/mqtt.conf.example b/Lora-Bot/config-example/mqtt.conf.example new file mode 100644 index 0000000..5477ead --- /dev/null +++ b/Lora-Bot/config-example/mqtt.conf.example @@ -0,0 +1,6 @@ +[modul] +config=private + +[settings] +type=mqtt +server=localhost diff --git a/Lora-Bot/config-example/settings.conf.example b/Lora-Bot/config-example/settings.conf.example new file mode 100644 index 0000000..9ee7bb3 --- /dev/null +++ b/Lora-Bot/config-example/settings.conf.example @@ -0,0 +1,8 @@ +[logging] +path=/var/log/lorabot.log + +[lora] +frequency=868100000 +spreadingfactor=8 +signalbandwith=125000 +codingrate=6 \ No newline at end of file diff --git a/Lora-Bot/config-example/txtout.conf.example b/Lora-Bot/config-example/txtout.conf.example new file mode 100644 index 0000000..5a41aad --- /dev/null +++ b/Lora-Bot/config-example/txtout.conf.example @@ -0,0 +1,2 @@ +[general] +path=/home/pi/coords.txt \ No newline at end of file diff --git a/Lora-Bot/gpio.2.44 b/Lora-Bot/gpio.2.44 new file mode 100644 index 0000000..573c114 Binary files /dev/null and b/Lora-Bot/gpio.2.44 differ diff --git a/Lora-Bot/lora.sh b/Lora-Bot/lora.sh new file mode 100644 index 0000000..394f67e --- /dev/null +++ b/Lora-Bot/lora.sh @@ -0,0 +1,5 @@ +for(( ; ; )) +do + sudo mono --debug Lora-Bot.exe +done + \ No newline at end of file diff --git a/Lora-Bot/resources/google.html b/Lora-Bot/resources/google.html new file mode 100644 index 0000000..918ca16 --- /dev/null +++ b/Lora-Bot/resources/google.html @@ -0,0 +1,44 @@ + + + + + + Google Map + + + +

Google Map

+
+ + + + \ No newline at end of file