Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Run on Websocket and the first changes for Scenes #9

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -328,3 +328,4 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/
/DeconzTestConsole
6 changes: 6 additions & 0 deletions InnerCore.Api.DeConz.TestConsole/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B4B69965-2C54-4D0B-B352-9AC733893381}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>InnerCore.Api.DeConz.TestConsole</RootNamespace>
<AssemblyName>InnerCore.Api.DeConz.TestConsole</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\InnerCore.Api.DeConz.ColorConverters\InnerCore.Api.DeConz.ColorConverters.csproj">
<Project>{9dc3c64c-8c3b-4969-b47b-ba64d77627f8}</Project>
<Name>InnerCore.Api.DeConz.ColorConverters</Name>
</ProjectReference>
<ProjectReference Include="..\InnerCore.Api.deConz\InnerCore.Api.DeConz.csproj">
<Project>{f3b5930e-f106-429a-9343-9ce27ec6e0b2}</Project>
<Name>InnerCore.Api.DeConz</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
41 changes: 41 additions & 0 deletions InnerCore.Api.DeConz.TestConsole/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InnerCore.Api.DeConz.TestConsole
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Start");
Init();
Console.ReadLine();
}

public static async void Init()
{
try
{
var client = new DeConzClient("deconz.tami", 888, "463608DCF3");
Console.WriteLine("Client Init Done");
Console.WriteLine("Read Groups");
var groups = await client.GetGroupsAsync();
Console.WriteLine("Read Groups Done. Try to get Küche");
var group = groups.FirstOrDefault(x => x.Name == "Küche");
var kitchenobject = await client.GetGroupAsync(group.Id);
if (group == null)
{
Console.WriteLine("Küche nicht gefunden");
return;
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}
36 changes: 36 additions & 0 deletions InnerCore.Api.DeConz.TestConsole/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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("InnerCore.Api.DeConz.TestConsole")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InnerCore.Api.DeConz.TestConsole")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[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("b4b69965-2c54-4d0b-b352-9ac733893381")]

// 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,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
4 changes: 4 additions & 0 deletions InnerCore.Api.DeConz.TestConsole/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net48" />
</packages>
10 changes: 8 additions & 2 deletions InnerCore.Api.DeConz.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2035
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InnerCore.Api.DeConz", "InnerCore.Api.deConz\InnerCore.Api.DeConz.csproj", "{F3B5930E-F106-429A-9343-9CE27EC6E0B2}"
EndProject
Expand All @@ -25,6 +25,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{4C9FC2AC
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{BE57B81B-9A3B-4C46-BA91-908503D7992C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InnerCore.Api.DeConz.TestConsole", "InnerCore.Api.DeConz.TestConsole\InnerCore.Api.DeConz.TestConsole.csproj", "{B4B69965-2C54-4D0B-B352-9AC733893381}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -55,6 +57,10 @@ Global
{A0E9D8A6-EFF6-417C-928A-1B000BBA8B95}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0E9D8A6-EFF6-417C-928A-1B000BBA8B95}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0E9D8A6-EFF6-417C-928A-1B000BBA8B95}.Release|Any CPU.Build.0 = Release|Any CPU
{B4B69965-2C54-4D0B-B352-9AC733893381}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4B69965-2C54-4D0B-B352-9AC733893381}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4B69965-2C54-4D0B-B352-9AC733893381}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4B69965-2C54-4D0B-B352-9AC733893381}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 1 addition & 0 deletions InnerCore.Api.DeConz/DeConzClient-Groups.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using InnerCore.Api.DeConz.Interfaces;
using InnerCore.Api.DeConz.Models;
using InnerCore.Api.DeConz.Models.Groups;
using InnerCore.Api.DeConz.Models.Scenes;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
Expand Down
Loading