diff --git a/.vs/MyCore/DesignTimeBuild/.dtbcache b/.vs/MyCore/DesignTimeBuild/.dtbcache
index e42343d..94c1a51 100644
Binary files a/.vs/MyCore/DesignTimeBuild/.dtbcache and b/.vs/MyCore/DesignTimeBuild/.dtbcache differ
diff --git a/.vs/MyCore/v15/Server/sqlite3/storage.ide b/.vs/MyCore/v15/Server/sqlite3/storage.ide
index 816b59b..798d40a 100644
Binary files a/.vs/MyCore/v15/Server/sqlite3/storage.ide and b/.vs/MyCore/v15/Server/sqlite3/storage.ide differ
diff --git a/.vs/MyCore/v15/Server/sqlite3/storage.ide-shm b/.vs/MyCore/v15/Server/sqlite3/storage.ide-shm
index b28f1bd..8360d2b 100644
Binary files a/.vs/MyCore/v15/Server/sqlite3/storage.ide-shm and b/.vs/MyCore/v15/Server/sqlite3/storage.ide-shm differ
diff --git a/.vs/MyCore/v15/Server/sqlite3/storage.ide-wal b/.vs/MyCore/v15/Server/sqlite3/storage.ide-wal
index ac50bd8..23a2bd2 100644
Binary files a/.vs/MyCore/v15/Server/sqlite3/storage.ide-wal and b/.vs/MyCore/v15/Server/sqlite3/storage.ide-wal differ
diff --git a/MyCore/Controllers/DeviceController.cs b/MyCore/Controllers/DeviceController.cs
index 85a4916..b0ddbbf 100644
--- a/MyCore/Controllers/DeviceController.cs
+++ b/MyCore/Controllers/DeviceController.cs
@@ -27,7 +27,6 @@ namespace MyCore.Controllers
///
///
///
- /// Id of the device you want to get informatiun
[HttpGet]
public ActionResult> GetAllDevices()
{
diff --git a/MyCore/Controllers/OddController.cs b/MyCore/Controllers/OddController.cs
index bcd0321..008a2bd 100644
--- a/MyCore/Controllers/OddController.cs
+++ b/MyCore/Controllers/OddController.cs
@@ -41,7 +41,7 @@ namespace MyCore.Controllers
}
catch (Exception ex)
{
- return new ObjectResult("The league you mentionned not exists") { StatusCode = 404 };
+ return new ObjectResult($"The league you mentionned not exists Exception : {ex}") { StatusCode = 404 };
}
var result = await GetOddsForCountry(id, oddRequest);
@@ -59,7 +59,6 @@ namespace MyCore.Controllers
///
/// Get odds for one country and one odd value maximum
///
- /// id of country, e.g = BE for Belgium
/// Odd Maximum value
[AllowAnonymous]
[ProducesResponseType(typeof(List), 200)]
diff --git a/MyCore/Controllers/ValuesController.cs b/MyCore/Controllers/ValuesController.cs
index c1295c2..1a44654 100644
--- a/MyCore/Controllers/ValuesController.cs
+++ b/MyCore/Controllers/ValuesController.cs
@@ -23,7 +23,6 @@ namespace MyCore.Controllers
///
/// It's a test ! :)
///
- /// id test
[AllowAnonymous]
[HttpGet]
public ActionResult> Get()
diff --git a/MyCore/Models/Aqara/Cube.cs b/MyCore/Models/Aqara/Cube.cs
new file mode 100644
index 0000000..93671b6
--- /dev/null
+++ b/MyCore/Models/Aqara/Cube.cs
@@ -0,0 +1,19 @@
+using MongoDB.Bson;
+using MongoDB.Bson.Serialization.Attributes;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace MyCore.Models.Aqara
+{
+ public class Cube
+ {
+ public double Angle { get; set; }
+ public int LinkQuality { get; set; }
+ public int Side { get; set; }
+ public int Battery { get; set; }
+ public int Voltage { get; set; }
+ public string Action { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/MyCore/Models/Ikea/LightBulb.cs b/MyCore/Models/Ikea/LightBulb.cs
new file mode 100644
index 0000000..3d949b0
--- /dev/null
+++ b/MyCore/Models/Ikea/LightBulb.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace MyCore.Models.Ikea
+{
+ public class LightBulb
+ {
+ public string State { get; set; }
+ public int Brightness { get; set; }
+ }
+}
diff --git a/MyCore/Models/LightState.cs b/MyCore/Models/LightState.cs
new file mode 100644
index 0000000..2d16653
--- /dev/null
+++ b/MyCore/Models/LightState.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace MyCore.Models
+{
+ public enum LightState
+ {
+ Off,
+ On,
+ Undefined
+ }
+}
diff --git a/MyCore/MyCore.csproj b/MyCore/MyCore.csproj
index 34fa4e7..59f9c9b 100644
--- a/MyCore/MyCore.csproj
+++ b/MyCore/MyCore.csproj
@@ -25,6 +25,7 @@
+
diff --git a/MyCore/Services/BookService.cs b/MyCore/Services/BookService.cs
index 3ce214e..93e445b 100644
--- a/MyCore/Services/BookService.cs
+++ b/MyCore/Services/BookService.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using System.Collections.Generic;
-using System.Linq;
using MyCore.Models;
using Microsoft.Extensions.Configuration;
using MongoDB.Driver;
diff --git a/MyCore/Services/DeviceService.cs b/MyCore/Services/DeviceService.cs
index 5b82283..88ad96f 100644
--- a/MyCore/Services/DeviceService.cs
+++ b/MyCore/Services/DeviceService.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using System.Collections.Generic;
-using System.Linq;
using MyCore.Models;
using Microsoft.Extensions.Configuration;
using MongoDB.Driver;
diff --git a/MyCore/Services/IoTDeviceService.cs b/MyCore/Services/IoTDeviceService.cs
index 0d6dffe..9d953e6 100644
--- a/MyCore/Services/IoTDeviceService.cs
+++ b/MyCore/Services/IoTDeviceService.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using System.Collections.Generic;
-using System.Linq;
using MyCore.Models;
using Microsoft.Extensions.Configuration;
using MongoDB.Driver;
diff --git a/MyCore/Services/MQTTService.cs b/MyCore/Services/MQTTService.cs
index c860f6c..c007da9 100644
--- a/MyCore/Services/MQTTService.cs
+++ b/MyCore/Services/MQTTService.cs
@@ -1,12 +1,17 @@
using MQTTnet;
using MQTTnet.Client;
using MQTTnet.Client.Options;
+using MyCore.Models;
+using MyCore.Models.Aqara;
+using MyCore.Models.Ikea;
+using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
+using YeelightAPI;
namespace MyCore.Services
{
@@ -19,12 +24,26 @@ namespace MyCore.Services
private string _user = "mqtt";
private string _password = "mqtt";
+ private LightState lightStateIkeaBulb = LightState.Undefined;
+
// It's here to have the mqtt initialisation + logic for payload..
// Related to which event occurs, a specific action is done.
+ private YeelightService yeelightService = new YeelightService();
+
public MQTTService()
{
+ try
+ {
+ yeelightService.GetDevices();
+ }
+ catch (Exception ex)
+ {
+
+ }
+
+
try
{
// Create a new MQTT client.
@@ -73,7 +92,6 @@ namespace MyCore.Services
Console.WriteLine("### SUBSCRIBED ###");
});
-
_client.UseApplicationMessageReceivedHandler(e =>
{
Console.WriteLine("### RECEIVED APPLICATION MESSAGE ###");
@@ -82,8 +100,55 @@ namespace MyCore.Services
Console.WriteLine($"+ QoS = {e.ApplicationMessage.QualityOfServiceLevel}");
Console.WriteLine($"+ Retain = {e.ApplicationMessage.Retain}");
Console.WriteLine();
- });
+ var topic = e.ApplicationMessage.Topic;
+ var payload = Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
+
+ switch (topic)
+ {
+ case "zigbee2mqtt/0x00158d00029a7b65":
+ try
+ {
+ var test = JsonConvert.DeserializeObject(payload);
+ if (test.Action == "shake")
+ {
+ var labLamp = yeelightService.devices.Where(d => d.Hostname == "192.168.31.74").FirstOrDefault();
+ Task.Run(async () => { await yeelightService.Toggle(labLamp); });
+ }
+ if (test.Action == "slide")
+ {
+ if (lightStateIkeaBulb == LightState.Undefined || lightStateIkeaBulb == LightState.Off)
+ PublishMessage("zigbee2mqtt/0x14b457fffe7628fa/set", "{\"state\": \"ON\"}");
+ else
+ PublishMessage("zigbee2mqtt/0x14b457fffe7628fa/set", "{\"state\": \"OFF\"}");
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Error cube ! Exception: {ex}");
+ }
+ break;
+ case "zigbee2mqtt/0x14b457fffe7628fa":
+ try
+ {
+ var lightState = JsonConvert.DeserializeObject(payload);
+
+ if (lightState.State == "ON")
+ lightStateIkeaBulb = LightState.On;
+ else
+ lightStateIkeaBulb = LightState.Off;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Error IkeaLightBulb ! Exception: {ex}");
+ }
+ break;
+ default:
+ Console.WriteLine("Hello nothing to do here..");
+ break;
+ }
+
+ });
}
catch (Exception e)
@@ -102,7 +167,8 @@ namespace MyCore.Services
.WithRetainFlag()
.Build();
- await _client.PublishAsync(mqttMessage);
+ if (_client.IsConnected)
+ await _client.PublishAsync(mqttMessage);
}
/*protected async Task Start()
diff --git a/MyCore/Services/UserService.cs b/MyCore/Services/UserService.cs
index 0e58c0a..bc81406 100644
--- a/MyCore/Services/UserService.cs
+++ b/MyCore/Services/UserService.cs
@@ -2,8 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using System.Collections.Generic;
-using System.Linq;
using MyCore.Models;
using Microsoft.Extensions.Configuration;
using MongoDB.Driver;
diff --git a/MyCore/Services/YeelightService.cs b/MyCore/Services/YeelightService.cs
new file mode 100644
index 0000000..b7d9c44
--- /dev/null
+++ b/MyCore/Services/YeelightService.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using YeelightAPI;
+
+namespace MyCore.Services
+{
+ public class YeelightService
+ {
+ public List devices = new List();
+
+ public async Task> GetDevices()
+ {
+ devices = await DeviceLocator.Discover();
+ return devices;
+ }
+
+ public async Task Toggle(Device device)
+ {
+ await device.Connect();
+ return await device.Toggle();
+ }
+ }
+}
diff --git a/MyCore/bin/Debug/netcoreapp2.1/MyCore.deps.json b/MyCore/bin/Debug/netcoreapp2.1/MyCore.deps.json
index c93aeea..22b3ff0 100644
--- a/MyCore/bin/Debug/netcoreapp2.1/MyCore.deps.json
+++ b/MyCore/bin/Debug/netcoreapp2.1/MyCore.deps.json
@@ -1,7 +1,7 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v2.1",
- "signature": "ed4bfd850661b8103b19e7b3da8cfe9ea4910f9c"
+ "signature": "d26cca79cda2132cadadbd4ca0c1aa71b6d1a90d"
},
"compilationOptions": {
"defines": [
@@ -33,7 +33,8 @@
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets": "1.0.2105168",
"Microsoft.VisualStudio.Web.CodeGeneration.Design": "2.1.1",
"MongoDB.Driver": "2.8.0",
- "Swashbuckle.AspNetCore": "4.0.1"
+ "Swashbuckle.AspNetCore": "4.0.1",
+ "YeelightAPI": "1.7.0"
},
"runtime": {
"MyCore.dll": {}
@@ -49,7 +50,7 @@
"Microsoft.Extensions.Configuration": "2.1.1",
"Microsoft.Extensions.Configuration.Binder": "2.1.1",
"Microsoft.IdentityModel.Clients.ActiveDirectory": "4.4.0",
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"Swashbuckle.AspNetCore": "4.0.1",
"System.IdentityModel.Tokens.Jwt": "5.3.0"
},
@@ -170,7 +171,7 @@
"Microsoft.IdentityModel.JsonWebTokens/5.3.0": {
"dependencies": {
"Microsoft.IdentityModel.Tokens": "5.3.0",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"runtime": {
"lib/netstandard2.0/Microsoft.IdentityModel.JsonWebTokens.dll": {
@@ -202,7 +203,7 @@
"Microsoft.IdentityModel.Tokens/5.3.0": {
"dependencies": {
"Microsoft.IdentityModel.Logging": "5.3.0",
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"System.Collections": "4.3.0",
"System.Diagnostics.Tools": "4.3.0",
"System.Reflection": "4.3.0",
@@ -411,7 +412,7 @@
},
"Microsoft.VisualStudio.Web.CodeGeneration.Contracts/2.1.1": {
"dependencies": {
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"runtime": {
"lib/netstandard2.0/Microsoft.VisualStudio.Web.CodeGeneration.Contracts.dll": {
@@ -427,7 +428,7 @@
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "2.1.1",
"Microsoft.VisualStudio.Web.CodeGeneration.Templating": "2.1.1",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"runtime": {
"lib/netstandard2.0/Microsoft.VisualStudio.Web.CodeGeneration.Core.dll": {
@@ -487,7 +488,7 @@
"dependencies": {
"Microsoft.CodeAnalysis.CSharp.Workspaces": "2.8.0",
"Microsoft.VisualStudio.Web.CodeGeneration.Contracts": "2.1.1",
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"NuGet.Frameworks": "4.7.0"
},
"runtime": {
@@ -601,6 +602,17 @@
"Microsoft.NETCore.Platforms": "2.1.0"
}
},
+ "Newtonsoft.Json/12.0.2": {
+ "runtime": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {
+ "assemblyVersion": "12.0.0.0",
+ "fileVersion": "12.0.2.23222"
+ }
+ },
+ "compile": {
+ "lib/netstandard2.0/Newtonsoft.Json.dll": {}
+ }
+ },
"NuGet.Frameworks/4.7.0": {
"dependencies": {
"NETStandard.Library": "2.0.3"
@@ -768,7 +780,7 @@
"Microsoft.AspNetCore.Routing": "2.1.1",
"Microsoft.AspNetCore.StaticFiles": "2.1.1",
"Microsoft.Extensions.FileProviders.Embedded": "2.1.1",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"runtime": {
"lib/netstandard2.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
@@ -1010,7 +1022,7 @@
"dependencies": {
"Microsoft.IdentityModel.JsonWebTokens": "5.3.0",
"Microsoft.IdentityModel.Tokens": "5.3.0",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"runtime": {
"lib/netstandard2.0/System.IdentityModel.Tokens.Jwt.dll": {
@@ -1064,6 +1076,47 @@
}
}
},
+ "System.Net.NetworkInformation/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "2.1.0",
+ "Microsoft.Win32.Primitives": "4.3.0",
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Tracing": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.IO.FileSystem": "4.3.0",
+ "System.IO.FileSystem.Primitives": "4.3.0",
+ "System.Linq": "4.3.0",
+ "System.Net.Primitives": "4.3.0",
+ "System.Net.Sockets": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Security.Principal.Windows": "4.5.0",
+ "System.Threading": "4.3.0",
+ "System.Threading.Overlapped": "4.3.0",
+ "System.Threading.Tasks": "4.3.0",
+ "System.Threading.Thread": "4.3.0",
+ "System.Threading.ThreadPool": "4.3.0",
+ "runtime.native.System": "4.3.0"
+ },
+ "runtimeTargets": {
+ "runtime/linux/lib/_._": {
+ "rid": "linux",
+ "assetType": "runtime"
+ },
+ "runtime/osx/lib/_._": {
+ "rid": "osx",
+ "assetType": "runtime"
+ },
+ "runtime/win/lib/_._": {
+ "rid": "win",
+ "assetType": "runtime"
+ }
+ }
+ },
"System.Net.Security/4.3.2": {
"dependencies": {
"Microsoft.NETCore.Platforms": "2.1.0",
@@ -1283,6 +1336,24 @@
}
}
},
+ "System.Threading.Overlapped/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "2.1.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Handles": "4.3.0"
+ },
+ "runtimeTargets": {
+ "runtime/unix/lib/_._": {
+ "rid": "unix",
+ "assetType": "runtime"
+ },
+ "runtime/win/lib/_._": {
+ "rid": "win",
+ "assetType": "runtime"
+ }
+ }
+ },
"System.Threading.ThreadPool/4.3.0": {
"dependencies": {
"System.Runtime": "4.3.0",
@@ -1317,9 +1388,24 @@
"System.Xml.XmlDocument": "4.3.0"
}
},
+ "YeelightAPI/1.7.0": {
+ "dependencies": {
+ "Newtonsoft.Json": "12.0.2",
+ "System.Net.NetworkInformation": "4.3.0"
+ },
+ "runtime": {
+ "lib/netstandard2.0/YeelightAPI.dll": {
+ "assemblyVersion": "1.7.0.0",
+ "fileVersion": "1.7.0.0"
+ }
+ },
+ "compile": {
+ "lib/netstandard2.0/YeelightAPI.dll": {}
+ }
+ },
"Microsoft.AspNet.WebApi.Client/5.2.6": {
"dependencies": {
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"Newtonsoft.Json.Bson": "1.0.1"
},
"compile": {
@@ -1574,7 +1660,7 @@
"Microsoft.AspNetCore.Authentication.OAuth/2.1.1": {
"dependencies": {
"Microsoft.AspNetCore.Authentication": "2.1.2",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netstandard2.0/Microsoft.AspNetCore.Authentication.OAuth.dll": {}
@@ -1840,7 +1926,7 @@
"Microsoft.AspNetCore.Http.Connections.Common": "1.0.1",
"Microsoft.AspNetCore.Routing": "2.1.1",
"Microsoft.AspNetCore.WebSockets": "2.1.1",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netcoreapp2.1/Microsoft.AspNetCore.Http.Connections.dll": {}
@@ -1850,7 +1936,7 @@
"Microsoft.AspNetCore.Http.Connections.Common/1.0.1": {
"dependencies": {
"Microsoft.AspNetCore.Connections.Abstractions": "2.1.1",
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"System.Buffers": "4.5.0"
},
"compile": {
@@ -1943,7 +2029,7 @@
"Microsoft.AspNetCore.JsonPatch/2.1.1": {
"dependencies": {
"Microsoft.CSharp": "4.5.0",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netstandard2.0/Microsoft.AspNetCore.JsonPatch.dll": {}
@@ -2174,7 +2260,7 @@
"dependencies": {
"Microsoft.AspNetCore.Hosting.Abstractions": "2.1.1",
"Microsoft.Extensions.Logging.Console": "2.1.1",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netstandard2.0/Microsoft.AspNetCore.NodeServices.dll": {}
@@ -2406,7 +2492,7 @@
"dependencies": {
"Microsoft.AspNetCore.Connections.Abstractions": "2.1.1",
"Microsoft.Extensions.Options": "2.1.1",
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"System.Buffers": "4.5.0"
},
"compile": {
@@ -2432,7 +2518,7 @@
"Microsoft.AspNetCore.SignalR.Protocols.Json/1.0.1": {
"dependencies": {
"Microsoft.AspNetCore.SignalR.Common": "1.0.1",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netstandard2.0/Microsoft.AspNetCore.SignalR.Protocols.Json.dll": {}
@@ -2756,7 +2842,7 @@
"dependencies": {
"Microsoft.Extensions.Configuration": "2.1.1",
"Microsoft.Extensions.Configuration.FileExtensions": "2.1.1",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netstandard2.0/Microsoft.Extensions.Configuration.Json.dll": {}
@@ -2811,7 +2897,7 @@
"Microsoft.Extensions.DependencyModel/2.1.0": {
"dependencies": {
"Microsoft.DotNet.PlatformAbstractions": "2.1.0",
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"System.Diagnostics.Debug": "4.3.0",
"System.Dynamic.Runtime": "4.3.0",
"System.Linq": "4.3.0"
@@ -3001,7 +3087,7 @@
"Microsoft.Extensions.Logging.EventSource/2.1.1": {
"dependencies": {
"Microsoft.Extensions.Logging": "2.1.1",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netstandard2.0/Microsoft.Extensions.Logging.EventSource.dll": {}
@@ -3084,7 +3170,7 @@
"dependencies": {
"Microsoft.IdentityModel.Protocols": "5.2.0",
"NETStandard.Library": "2.0.3",
- "Newtonsoft.Json": "11.0.2",
+ "Newtonsoft.Json": "12.0.2",
"System.Dynamic.Runtime": "4.3.0",
"System.IdentityModel.Tokens.Jwt": "5.3.0"
},
@@ -3147,16 +3233,10 @@
},
"compileOnly": true
},
- "Newtonsoft.Json/11.0.2": {
- "compile": {
- "lib/netstandard2.0/Newtonsoft.Json.dll": {}
- },
- "compileOnly": true
- },
"Newtonsoft.Json.Bson/1.0.1": {
"dependencies": {
"NETStandard.Library": "2.0.3",
- "Newtonsoft.Json": "11.0.2"
+ "Newtonsoft.Json": "12.0.2"
},
"compile": {
"lib/netstandard1.3/Newtonsoft.Json.Bson.dll": {}
@@ -4272,6 +4352,13 @@
"path": "netstandard.library/2.0.3",
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
},
+ "Newtonsoft.Json/12.0.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-mtweBXPWhp1CMQATtBT7ZfMZrbZBTKfjGwz6Y75NwGjx/GztDaUnfw8GK9KZ2T4fDIqKJyDjc9Rxlw5+G2FcVA==",
+ "path": "newtonsoft.json/12.0.2",
+ "hashPath": "newtonsoft.json.12.0.2.nupkg.sha512"
+ },
"NuGet.Frameworks/4.7.0": {
"type": "package",
"serviceable": true,
@@ -4496,6 +4583,13 @@
"path": "system.net.nameresolution/4.3.0",
"hashPath": "system.net.nameresolution.4.3.0.nupkg.sha512"
},
+ "System.Net.NetworkInformation/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-MKLDZXuBZOS348egaxkMgwSUHIIhykVf0pudpfSdzjKmkRpVCzqkpysPHHp8HfckYAhuXRM+UgxWPgFTHF8Trg==",
+ "path": "system.net.networkinformation/4.3.0",
+ "hashPath": "system.net.networkinformation.4.3.0.nupkg.sha512"
+ },
"System.Net.Security/4.3.2": {
"type": "package",
"serviceable": true,
@@ -4587,6 +4681,13 @@
"path": "system.security.securestring/4.3.0",
"hashPath": "system.security.securestring.4.3.0.nupkg.sha512"
},
+ "System.Threading.Overlapped/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-JWEtWIoYBHzMmgt2I/1e4FFG6veDL4yzA1Y7iuEY2G+GyZyrzqx/GQlM92M+d81D1cH2dp2KRhbZdQebn8Q+RA==",
+ "path": "system.threading.overlapped/4.3.0",
+ "hashPath": "system.threading.overlapped.4.3.0.nupkg.sha512"
+ },
"System.Threading.ThreadPool/4.3.0": {
"type": "package",
"serviceable": true,
@@ -4608,6 +4709,13 @@
"path": "system.xml.xmlserializer/4.3.0",
"hashPath": "system.xml.xmlserializer.4.3.0.nupkg.sha512"
},
+ "YeelightAPI/1.7.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-tRTh/2gI12Wqx4lEvx94rhufIymVnmY+C/HLUSRKy12VfOa5G7wKoOacKyb+GVFGHBXLNoUH3rHBa+n57xgGZA==",
+ "path": "yeelightapi/1.7.0",
+ "hashPath": "yeelightapi.1.7.0.nupkg.sha512"
+ },
"Microsoft.AspNet.WebApi.Client/5.2.6": {
"type": "package",
"serviceable": true,
@@ -5686,13 +5794,6 @@
"path": "microsoft.win32.registry/4.5.0",
"hashPath": "microsoft.win32.registry.4.5.0.nupkg.sha512"
},
- "Newtonsoft.Json/11.0.2": {
- "type": "package",
- "serviceable": true,
- "sha512": "sha512-znZGbws7E4BA9jxNZ7FuiIRI3C9hrgatVQSTKhIYZYNOud4M5VfGlTYi6RdYO5sQrebFuF/g9UEV3hOxDMXF6Q==",
- "path": "newtonsoft.json/11.0.2",
- "hashPath": "newtonsoft.json.11.0.2.nupkg.sha512"
- },
"Newtonsoft.Json.Bson/1.0.1": {
"type": "package",
"serviceable": true,
diff --git a/MyCore/bin/Debug/netcoreapp2.1/MyCore.xml b/MyCore/bin/Debug/netcoreapp2.1/MyCore.xml
index 1229835..442f56f 100644
--- a/MyCore/bin/Debug/netcoreapp2.1/MyCore.xml
+++ b/MyCore/bin/Debug/netcoreapp2.1/MyCore.xml
@@ -8,7 +8,6 @@
- Id of the device you want to get informatiun
@@ -67,7 +66,6 @@
Get odds for one country and one odd value maximum
- id of country, e.g = BE for Belgium
Odd Maximum value
@@ -95,7 +93,6 @@
It's a test ! :)
- id test
diff --git a/MyCore/obj/Debug/netcoreapp2.1/MyCore.xml b/MyCore/obj/Debug/netcoreapp2.1/MyCore.xml
index 1229835..442f56f 100644
--- a/MyCore/obj/Debug/netcoreapp2.1/MyCore.xml
+++ b/MyCore/obj/Debug/netcoreapp2.1/MyCore.xml
@@ -8,7 +8,6 @@
- Id of the device you want to get informatiun
@@ -67,7 +66,6 @@
Get odds for one country and one odd value maximum
- id of country, e.g = BE for Belgium
Odd Maximum value
@@ -95,7 +93,6 @@
It's a test ! :)
- id test
diff --git a/MyCore/obj/project.assets.json b/MyCore/obj/project.assets.json
index c51ba1b..b1c151f 100644
--- a/MyCore/obj/project.assets.json
+++ b/MyCore/obj/project.assets.json
@@ -2896,7 +2896,7 @@
"build/netstandard2.0/NETStandard.Library.targets": {}
}
},
- "Newtonsoft.Json/11.0.2": {
+ "Newtonsoft.Json/12.0.2": {
"type": "package",
"compile": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {}
@@ -4071,6 +4071,51 @@
}
}
},
+ "System.Net.NetworkInformation/4.3.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "Microsoft.Win32.Primitives": "4.3.0",
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Tracing": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.IO.FileSystem": "4.3.0",
+ "System.IO.FileSystem.Primitives": "4.3.0",
+ "System.Linq": "4.3.0",
+ "System.Net.Primitives": "4.3.0",
+ "System.Net.Sockets": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Security.Principal.Windows": "4.3.0",
+ "System.Threading": "4.3.0",
+ "System.Threading.Overlapped": "4.3.0",
+ "System.Threading.Tasks": "4.3.0",
+ "System.Threading.Thread": "4.3.0",
+ "System.Threading.ThreadPool": "4.3.0",
+ "runtime.native.System": "4.3.0"
+ },
+ "compile": {
+ "ref/netstandard1.3/System.Net.NetworkInformation.dll": {}
+ },
+ "runtimeTargets": {
+ "runtimes/linux/lib/netstandard1.3/System.Net.NetworkInformation.dll": {
+ "assetType": "runtime",
+ "rid": "linux"
+ },
+ "runtimes/osx/lib/netstandard1.3/System.Net.NetworkInformation.dll": {
+ "assetType": "runtime",
+ "rid": "osx"
+ },
+ "runtimes/win/lib/netstandard1.3/System.Net.NetworkInformation.dll": {
+ "assetType": "runtime",
+ "rid": "win"
+ }
+ }
+ },
"System.Net.Primitives/4.3.0": {
"type": "package",
"dependencies": {
@@ -4973,6 +5018,28 @@
"lib/netcoreapp2.1/System.Threading.Channels.dll": {}
}
},
+ "System.Threading.Overlapped/4.3.0": {
+ "type": "package",
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "1.1.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Handles": "4.3.0"
+ },
+ "compile": {
+ "ref/netstandard1.3/_._": {}
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/netstandard1.3/System.Threading.Overlapped.dll": {
+ "assetType": "runtime",
+ "rid": "unix"
+ },
+ "runtimes/win/lib/netstandard1.3/System.Threading.Overlapped.dll": {
+ "assetType": "runtime",
+ "rid": "win"
+ }
+ }
+ },
"System.Threading.Tasks/4.3.0": {
"type": "package",
"dependencies": {
@@ -5199,6 +5266,19 @@
"runtime": {
"lib/netstandard1.3/System.Xml.XPath.XDocument.dll": {}
}
+ },
+ "YeelightAPI/1.7.0": {
+ "type": "package",
+ "dependencies": {
+ "Newtonsoft.Json": "12.0.2",
+ "System.Net.NetworkInformation": "4.3.0"
+ },
+ "compile": {
+ "lib/netstandard2.0/YeelightAPI.dll": {}
+ },
+ "runtime": {
+ "lib/netstandard2.0/YeelightAPI.dll": {}
+ }
}
}
},
@@ -8473,10 +8553,10 @@
"netstandard.library.nuspec"
]
},
- "Newtonsoft.Json/11.0.2": {
- "sha512": "znZGbws7E4BA9jxNZ7FuiIRI3C9hrgatVQSTKhIYZYNOud4M5VfGlTYi6RdYO5sQrebFuF/g9UEV3hOxDMXF6Q==",
+ "Newtonsoft.Json/12.0.2": {
+ "sha512": "mtweBXPWhp1CMQATtBT7ZfMZrbZBTKfjGwz6Y75NwGjx/GztDaUnfw8GK9KZ2T4fDIqKJyDjc9Rxlw5+G2FcVA==",
"type": "package",
- "path": "newtonsoft.json/11.0.2",
+ "path": "newtonsoft.json/12.0.2",
"files": [
".nupkg.metadata",
".signature.p7s",
@@ -8499,7 +8579,7 @@
"lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.xml",
"lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll",
"lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.xml",
- "newtonsoft.json.11.0.2.nupkg.sha512",
+ "newtonsoft.json.12.0.2.nupkg.sha512",
"newtonsoft.json.nuspec"
]
},
@@ -11082,6 +11162,81 @@
"system.net.nameresolution.nuspec"
]
},
+ "System.Net.NetworkInformation/4.3.0": {
+ "sha512": "MKLDZXuBZOS348egaxkMgwSUHIIhykVf0pudpfSdzjKmkRpVCzqkpysPHHp8HfckYAhuXRM+UgxWPgFTHF8Trg==",
+ "type": "package",
+ "path": "system.net.networkinformation/4.3.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "ThirdPartyNotices.txt",
+ "dotnet_library_license.txt",
+ "lib/MonoAndroid10/_._",
+ "lib/MonoTouch10/_._",
+ "lib/net45/_._",
+ "lib/net46/System.Net.NetworkInformation.dll",
+ "lib/portable-net45+win8+wp8+wpa81/_._",
+ "lib/win8/_._",
+ "lib/wp80/_._",
+ "lib/wpa81/_._",
+ "lib/xamarinios10/_._",
+ "lib/xamarinmac20/_._",
+ "lib/xamarintvos10/_._",
+ "lib/xamarinwatchos10/_._",
+ "ref/MonoAndroid10/_._",
+ "ref/MonoTouch10/_._",
+ "ref/net45/_._",
+ "ref/net46/System.Net.NetworkInformation.dll",
+ "ref/netcore50/System.Net.NetworkInformation.dll",
+ "ref/netcore50/System.Net.NetworkInformation.xml",
+ "ref/netcore50/de/System.Net.NetworkInformation.xml",
+ "ref/netcore50/es/System.Net.NetworkInformation.xml",
+ "ref/netcore50/fr/System.Net.NetworkInformation.xml",
+ "ref/netcore50/it/System.Net.NetworkInformation.xml",
+ "ref/netcore50/ja/System.Net.NetworkInformation.xml",
+ "ref/netcore50/ko/System.Net.NetworkInformation.xml",
+ "ref/netcore50/ru/System.Net.NetworkInformation.xml",
+ "ref/netcore50/zh-hans/System.Net.NetworkInformation.xml",
+ "ref/netcore50/zh-hant/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/System.Net.NetworkInformation.dll",
+ "ref/netstandard1.0/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/de/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/es/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/fr/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/it/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/ja/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/ko/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/ru/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/zh-hans/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.0/zh-hant/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/System.Net.NetworkInformation.dll",
+ "ref/netstandard1.3/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/de/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/es/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/fr/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/it/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/ja/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/ko/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/ru/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/zh-hans/System.Net.NetworkInformation.xml",
+ "ref/netstandard1.3/zh-hant/System.Net.NetworkInformation.xml",
+ "ref/portable-net45+win8+wp8+wpa81/_._",
+ "ref/win8/_._",
+ "ref/wp80/_._",
+ "ref/wpa81/_._",
+ "ref/xamarinios10/_._",
+ "ref/xamarinmac20/_._",
+ "ref/xamarintvos10/_._",
+ "ref/xamarinwatchos10/_._",
+ "runtimes/linux/lib/netstandard1.3/System.Net.NetworkInformation.dll",
+ "runtimes/osx/lib/netstandard1.3/System.Net.NetworkInformation.dll",
+ "runtimes/win/lib/net46/System.Net.NetworkInformation.dll",
+ "runtimes/win/lib/netcore50/System.Net.NetworkInformation.dll",
+ "runtimes/win/lib/netstandard1.3/System.Net.NetworkInformation.dll",
+ "system.net.networkinformation.4.3.0.nupkg.sha512",
+ "system.net.networkinformation.nuspec"
+ ]
+ },
"System.Net.Primitives/4.3.0": {
"sha512": "qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==",
"type": "package",
@@ -13494,6 +13649,36 @@
"version.txt"
]
},
+ "System.Threading.Overlapped/4.3.0": {
+ "sha512": "JWEtWIoYBHzMmgt2I/1e4FFG6veDL4yzA1Y7iuEY2G+GyZyrzqx/GQlM92M+d81D1cH2dp2KRhbZdQebn8Q+RA==",
+ "type": "package",
+ "path": "system.threading.overlapped/4.3.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "ThirdPartyNotices.txt",
+ "dotnet_library_license.txt",
+ "lib/net46/System.Threading.Overlapped.dll",
+ "ref/net46/System.Threading.Overlapped.dll",
+ "ref/netstandard1.3/System.Threading.Overlapped.dll",
+ "ref/netstandard1.3/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/de/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/es/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/fr/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/it/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/ja/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/ko/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/ru/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/zh-hans/System.Threading.Overlapped.xml",
+ "ref/netstandard1.3/zh-hant/System.Threading.Overlapped.xml",
+ "runtimes/unix/lib/netstandard1.3/System.Threading.Overlapped.dll",
+ "runtimes/win/lib/net46/System.Threading.Overlapped.dll",
+ "runtimes/win/lib/netcore50/System.Threading.Overlapped.dll",
+ "runtimes/win/lib/netstandard1.3/System.Threading.Overlapped.dll",
+ "system.threading.overlapped.4.3.0.nupkg.sha512",
+ "system.threading.overlapped.nuspec"
+ ]
+ },
"System.Threading.Tasks/4.3.0": {
"sha512": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"type": "package",
@@ -14127,6 +14312,26 @@
"system.xml.xpath.xdocument.4.3.0.nupkg.sha512",
"system.xml.xpath.xdocument.nuspec"
]
+ },
+ "YeelightAPI/1.7.0": {
+ "sha512": "tRTh/2gI12Wqx4lEvx94rhufIymVnmY+C/HLUSRKy12VfOa5G7wKoOacKyb+GVFGHBXLNoUH3rHBa+n57xgGZA==",
+ "type": "package",
+ "path": "yeelightapi/1.7.0",
+ "files": [
+ ".nupkg.metadata",
+ ".signature.p7s",
+ "README.txt",
+ "lib/net45/YeelightAPI.dll",
+ "lib/net45/YeelightAPI.xml",
+ "lib/net46/YeelightAPI.dll",
+ "lib/net46/YeelightAPI.xml",
+ "lib/net47/YeelightAPI.dll",
+ "lib/net47/YeelightAPI.xml",
+ "lib/netstandard2.0/YeelightAPI.dll",
+ "lib/netstandard2.0/YeelightAPI.xml",
+ "yeelightapi.1.7.0.nupkg.sha512",
+ "yeelightapi.nuspec"
+ ]
}
},
"projectFileDependencyGroups": {
@@ -14140,7 +14345,8 @@
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets >= 1.0.2105168",
"Microsoft.VisualStudio.Web.CodeGeneration.Design >= 2.1.1",
"MongoDB.Driver >= 2.8.0",
- "Swashbuckle.AspNetCore >= 4.0.1"
+ "Swashbuckle.AspNetCore >= 4.0.1",
+ "YeelightAPI >= 1.7.0"
]
},
"packageFolders": {
@@ -14227,6 +14433,10 @@
"Swashbuckle.AspNetCore": {
"target": "Package",
"version": "[4.0.1, )"
+ },
+ "YeelightAPI": {
+ "target": "Package",
+ "version": "[1.7.0, )"
}
},
"imports": [