From a3d7c936da08d5cc71f4d81383b8bb49bc62f05f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 10 Jul 2025 12:52:45 +0200 Subject: [PATCH] Update shelly --- EgwProxy.Emmegi.sln | 43 ++++++++++++++++++++ EgwProxy.Shelly/DTO/Gen1/DiscoverDTO.cs | 47 ++++++++++++++++++++++ EgwProxy.Shelly/DTO/Gen2/DiscoverDTO.cs | 53 +++++++++++++++++++++++++ 3 files changed, 143 insertions(+) create mode 100644 EgwProxy.Emmegi.sln create mode 100644 EgwProxy.Shelly/DTO/Gen1/DiscoverDTO.cs create mode 100644 EgwProxy.Shelly/DTO/Gen2/DiscoverDTO.cs diff --git a/EgwProxy.Emmegi.sln b/EgwProxy.Emmegi.sln new file mode 100644 index 0000000..50cad8a --- /dev/null +++ b/EgwProxy.Emmegi.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32630.192 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Gomba.Test", "EgwProxy.Gomba.Test\EgwProxy.Gomba.Test.csproj", "{2B7F1536-61D1-4F05-AF8D-62A52D114479}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Gomba", "EgwProxy.Gomba\EgwProxy.Gomba.csproj", "{CC377124-1B94-40C1-B552-D6D42EB2BF27}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Emmegi", "EgwProxy.Emmegi\EgwProxy.Emmegi.csproj", "{F3C0F746-B4FB-4CBB-92BD-9C9A686A21BB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EgwProxy.Emmegi.Test", "EgwProxy.Emmegi.Test\EgwProxy.Emmegi.Test.csproj", "{A5DDEF7B-98C3-4391-B8BC-16CFC469B77E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2B7F1536-61D1-4F05-AF8D-62A52D114479}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B7F1536-61D1-4F05-AF8D-62A52D114479}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B7F1536-61D1-4F05-AF8D-62A52D114479}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B7F1536-61D1-4F05-AF8D-62A52D114479}.Release|Any CPU.Build.0 = Release|Any CPU + {CC377124-1B94-40C1-B552-D6D42EB2BF27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC377124-1B94-40C1-B552-D6D42EB2BF27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC377124-1B94-40C1-B552-D6D42EB2BF27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC377124-1B94-40C1-B552-D6D42EB2BF27}.Release|Any CPU.Build.0 = Release|Any CPU + {F3C0F746-B4FB-4CBB-92BD-9C9A686A21BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3C0F746-B4FB-4CBB-92BD-9C9A686A21BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3C0F746-B4FB-4CBB-92BD-9C9A686A21BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3C0F746-B4FB-4CBB-92BD-9C9A686A21BB}.Release|Any CPU.Build.0 = Release|Any CPU + {A5DDEF7B-98C3-4391-B8BC-16CFC469B77E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5DDEF7B-98C3-4391-B8BC-16CFC469B77E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5DDEF7B-98C3-4391-B8BC-16CFC469B77E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5DDEF7B-98C3-4391-B8BC-16CFC469B77E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DA96981F-F7D0-47A9-A51F-9BCC8D35619F} + EndGlobalSection +EndGlobal diff --git a/EgwProxy.Shelly/DTO/Gen1/DiscoverDTO.cs b/EgwProxy.Shelly/DTO/Gen1/DiscoverDTO.cs new file mode 100644 index 0000000..8f96776 --- /dev/null +++ b/EgwProxy.Shelly/DTO/Gen1/DiscoverDTO.cs @@ -0,0 +1,47 @@ +using Newtonsoft.Json; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwProxy.Shelly.DTO.Gen1 +{ + /// + /// Discover for Gen1 Shelly Dev + /// + public class DiscoverDTO + { + #region Public Properties + + [JsonProperty("auth")] + public bool Auth { get; set; } + + [JsonProperty("discoverable")] + public bool Discoverable { get; set; } + + [JsonProperty("fw")] + public string Fw { get; set; } + + [JsonProperty("longid")] + public int Longid { get; set; } + + [JsonProperty("mac")] + public string Mac { get; set; } + + [JsonProperty("num_emeters")] + public int NumEmeters { get; set; } + + [JsonProperty("num_meters")] + public int NumMeters { get; set; } + + [JsonProperty("num_outputs")] + public int NumOutputs { get; set; } + + [JsonProperty("report_period")] + public int ReportPeriod { get; set; } + + [JsonProperty("type")] + public string Type { get; set; } + + #endregion Public Properties + } +} \ No newline at end of file diff --git a/EgwProxy.Shelly/DTO/Gen2/DiscoverDTO.cs b/EgwProxy.Shelly/DTO/Gen2/DiscoverDTO.cs new file mode 100644 index 0000000..26fb8df --- /dev/null +++ b/EgwProxy.Shelly/DTO/Gen2/DiscoverDTO.cs @@ -0,0 +1,53 @@ +using Newtonsoft.Json; + +// +// This is here so CodeMaid doesn't reorganize this document +// +namespace EgwProxy.Shelly.DTO.Gen2 +{ + /// + /// Discover for Gen Shelly Dev + /// + public class DiscoverDTO + { + #region Public Properties + + [JsonProperty("app")] + public string App { get; set; } + + [JsonProperty("auth_domain")] + public object AuthDomain { get; set; } + + [JsonProperty("auth_en")] + public bool AuthEn { get; set; } + + [JsonProperty("fw_id")] + public string FwId { get; set; } + + [JsonProperty("gen")] + public int Gen { get; set; } + + [JsonProperty("id")] + public string Id { get; set; } + + [JsonProperty("mac")] + public string Mac { get; set; } + + [JsonProperty("model")] + public string Model { get; set; } + + [JsonProperty("name")] + public object Name { get; set; } + + [JsonProperty("profile")] + public string Profile { get; set; } + + [JsonProperty("slot")] + public int Slot { get; set; } + + [JsonProperty("ver")] + public string Ver { get; set; } + + #endregion Public Properties + } +} \ No newline at end of file