Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
e5eb4c8740 | |||
9a94ff97d2 | |||
51bfd52095 | |||
d7f2ccd4af | |||
47cdef0959 | |||
35ba2b8135 |
37
Changelog.md
Normal file
37
Changelog.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Changelog
|
||||
|
||||
## 1.4.0 - 2022-01-09 - Cleanup
|
||||
### New Features
|
||||
* On first startup, not try to disconnect first
|
||||
### Bugfixes
|
||||
* Fixing nullpointer exception
|
||||
### Changes
|
||||
* Cleanup project and fixes version numbers
|
||||
|
||||
## 1.3.0 - 2021-01-09 - Default netcore
|
||||
### New Features
|
||||
* Create toString, so in logfiles the used Server is visible
|
||||
* add changelog.md
|
||||
### Bugfixes
|
||||
### Changes
|
||||
* Netcore is now the default projekt
|
||||
|
||||
## 1.2.0 - 2019-11-28 - Add netcore
|
||||
### New Features
|
||||
* add Licence, readme.md and contribute.md
|
||||
* add netcore version
|
||||
### Bugfixes
|
||||
### Changes
|
||||
* Using newer C# language version
|
||||
|
||||
## 1.1.0 - 2019-05-27 - Rewrite Module to reconnect itselfs, so you dont need to watch over the the state of the connection
|
||||
### New Features
|
||||
* Keep the connection alive and reconnect internally
|
||||
### Bugfixes
|
||||
### Changes
|
||||
|
||||
## 1.0.0.0 - 2019-02-14 - Init
|
||||
### New Features
|
||||
* Init release
|
||||
### Bugfixes
|
||||
### Changes
|
43
ConnectorDataMqtt-4.7.1.sln
Normal file
43
ConnectorDataMqtt-4.7.1.sln
Normal file
@ -0,0 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.136
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectorDataMqtt", "ConnectorDataMqtt\ConnectorDataMqtt-4.7.1.csproj", "{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils-IoT", "..\Utils-IoT\Utils-IoT\Utils-IoT-4.7.1.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
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "litjson_4.7.1", "..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj", "{91A14CD2-2940-4500-8193-56D37EDDDBAA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{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
|
||||
{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
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B90F7B1F-FDD8-4B59-AAA5-218655C2716C}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,15 +1,17 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.136
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29519.87
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConnectorDataMqtt", "ConnectorDataMqtt\ConnectorDataMqtt.csproj", "{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConnectorDataMqtt", "ConnectorDataMqtt\ConnectorDataMqtt.csproj", "{5D7A8892-6687-4FE2-85D1-12B49782EDF0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils-IoT", "..\Utils-IoT\Utils-IoT\Utils-IoT.csproj", "{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils-IoT", "..\Utils-IoT\Utils-IoT\Utils-IoT.csproj", "{45837342-5906-4906-AB49-971767D9E180}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "M2Mqtt_4.7.1", "..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_4.7.1.csproj", "{A11AEF5A-B246-4FE8-8330-06DB73CC8074}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "M2Mqtt", "..\..\Librarys\mqtt\M2Mqtt\M2Mqtt.csproj", "{05B829EF-6F4F-496D-8936-35D7F2179DF0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "litjson_4.7.1", "..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj", "{91A14CD2-2940-4500-8193-56D37EDDDBAA}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "litjson", "..\..\Librarys\litjson\litjson\litjson.csproj", "{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils", "..\Utils\Utils\Utils.csproj", "{19424C4A-D024-484A-BE65-09C7C529A2C4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -17,27 +19,31 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{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
|
||||
{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
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B90F7B1F-FDD8-4B59-AAA5-218655C2716C}
|
||||
SolutionGuid = {92985FD1-A967-4AE1-B2E0-5E938C0A7D6A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
57
ConnectorDataMqtt/ConnectorDataMqtt-4.7.1.csproj
Normal file
57
ConnectorDataMqtt/ConnectorDataMqtt-4.7.1.csproj
Normal file
@ -0,0 +1,57 @@
|
||||
<?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>{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BlubbFish.Utils.IoT.Connector.Data</RootNamespace>
|
||||
<AssemblyName>ConnectorDataMqtt</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<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' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Mqtt.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="..\CHANGELOG.md" />
|
||||
<Content Include="..\CONTRIBUTING.md" />
|
||||
<Content Include="..\LICENSE" />
|
||||
<Content Include="..\README.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_4.7.1.csproj">
|
||||
<Project>{a11aef5a-b246-4fe8-8330-06db73cc8074}</Project>
|
||||
<Name>M2Mqtt_4.7.1</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT.csproj">
|
||||
<Project>{b870e4d5-6806-4a0b-b233-8907eedc5afc}</Project>
|
||||
<Name>Utils-IoT</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -1,56 +1,46 @@
|
||||
<?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')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{EE6C8F68-ED46-4C1C-ABDD-CFCDF75104F2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<RootNamespace>BlubbFish.Utils.IoT.Connector.Data</RootNamespace>
|
||||
<AssemblyName>ConnectorDataMqtt</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<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' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Company>BlubbFish</Company>
|
||||
<Authors>BlubbFish</Authors>
|
||||
<Version>1.4.0</Version>
|
||||
<Copyright>Copyright © BlubbFish 2017 - 09.01.2022</Copyright>
|
||||
<Description>ADataBackend Connector that connects to mqtt using M2Mqtt</Description>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<PackageProjectUrl>http://git.blubbfish.net/vs_utils/ConnectorDataMqtt</PackageProjectUrl>
|
||||
<RepositoryUrl>http://git.blubbfish.net/vs_utils/ConnectorDataMqtt.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageReleaseNotes>
|
||||
1.4.0 Cleanup
|
||||
1.3.0 Default netcore
|
||||
1.2.0 Add netcore
|
||||
1.1.0 Rewrite Module to reconnect itselfs, so you dont need to watch over the the state of the connection
|
||||
1.0.0.0 Init
|
||||
</PackageReleaseNotes>
|
||||
<NeutralLanguage>de-DE</NeutralLanguage>
|
||||
<PackageId>Mqtt.Data.Connector.IoT.Utils.BlubbFish</PackageId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Mqtt.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<ProjectReference Include="..\..\..\Librarys\mqtt\M2Mqtt\M2Mqtt.csproj" />
|
||||
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\CONTRIBUTING.md" />
|
||||
<Content Include="..\LICENSE" />
|
||||
<Content Include="..\README.md" />
|
||||
<Content Include="../CHANGELOG.md" />
|
||||
<Content Include="../CONTRIBUTING.md" />
|
||||
<Content Include="../LICENSE" />
|
||||
<Content Include="../README.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_4.7.1.csproj">
|
||||
<Project>{a11aef5a-b246-4fe8-8330-06db73cc8074}</Project>
|
||||
<Name>M2Mqtt_4.7.1</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT.csproj">
|
||||
<Project>{b870e4d5-6806-4a0b-b233-8907eedc5afc}</Project>
|
||||
<Name>Utils-IoT</Name>
|
||||
</ProjectReference>
|
||||
<None Include="..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
</Project>
|
@ -1,38 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<RootNamespace>BlubbFish.Utils.IoT.Connector.Data</RootNamespace>
|
||||
<AssemblyName>ConnectorDataMqtt</AssemblyName>
|
||||
<Company>BlubbFish</Company>
|
||||
<Authors>BlubbFish</Authors>
|
||||
<Version>1.1.0</Version>
|
||||
<Copyright>Copyright © BlubbFish 2017 - 27.05.2019</Copyright>
|
||||
<Description>ADataBackend Connector that connects to mqtt using M2Mqtt</Description>
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<PackageProjectUrl>http://git.blubbfish.net/vs_utils/ConnectorDataMqtt</PackageProjectUrl>
|
||||
<RepositoryUrl>http://git.blubbfish.net/vs_utils/ConnectorDataMqtt.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageReleaseNotes>1.1.0 Rewrite Module to reconnect itselfs, so you dont need to watch over the the state of the connection</PackageReleaseNotes>
|
||||
<NeutralLanguage>de-DE</NeutralLanguage>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_Core.csproj" />
|
||||
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="../CONTRIBUTING.md" />
|
||||
<Content Include="../LICENSE" />
|
||||
<Content Include="../README.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -11,9 +11,11 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
||||
public class Mqtt : ADataBackend, IDisposable {
|
||||
private MqttClient client;
|
||||
private Thread connectionWatcher;
|
||||
private Boolean connectionWatcherRunning;
|
||||
private Boolean firstStart = true;
|
||||
|
||||
public Mqtt(Dictionary<String, String> settings) : base(settings) {
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Mqtt.Mqtt()");
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Mqtt(" + this.ToString()+")");
|
||||
Int32 port = 1883;
|
||||
if(this.settings.ContainsKey("port")) {
|
||||
port = Int32.Parse(this.settings["port"]);
|
||||
@ -22,35 +24,59 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
||||
this.ConnectionWatcher();
|
||||
}
|
||||
|
||||
public override String ToString() {
|
||||
String ret = "mqtt://";
|
||||
if (this.settings.ContainsKey("user")) {
|
||||
ret += this.settings["user"];
|
||||
if (this.settings.ContainsKey("pass")) {
|
||||
ret += ":" + this.settings["pass"];
|
||||
}
|
||||
ret += "@";
|
||||
}
|
||||
ret += this.settings["server"];
|
||||
if (this.settings.ContainsKey("port")) {
|
||||
ret += ":" + this.settings["port"];
|
||||
}
|
||||
if (this.settings.ContainsKey("topic")) {
|
||||
ret += "/" + this.settings["topic"];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#region ConectionManage
|
||||
private void ConnectionWatcher() {
|
||||
this.connectionWatcher = new Thread(this.ConnectionWatcherRunner);
|
||||
this.connectionWatcherRunning = true;
|
||||
this.connectionWatcher.Start();
|
||||
}
|
||||
|
||||
private void ConnectionWatcherRunner() {
|
||||
while(true) {
|
||||
while(this.connectionWatcherRunning) {
|
||||
try {
|
||||
if(!this.IsConnected) {
|
||||
this.Reconnect();
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
Thread.Sleep(500);
|
||||
Thread.Sleep(10);
|
||||
} catch(Exception) { }
|
||||
}
|
||||
}
|
||||
|
||||
private void Reconnect() {
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Mqtt.Reconnect()");
|
||||
if(this.IsConnected) {
|
||||
this.Disconnect(true);
|
||||
if(!this.firstStart) {
|
||||
if(this.IsConnected) {
|
||||
this.Disconnect(true);
|
||||
} else {
|
||||
this.Disconnect(false);
|
||||
}
|
||||
} else {
|
||||
this.Disconnect(false);
|
||||
this.firstStart = false;
|
||||
}
|
||||
this.Connect();
|
||||
}
|
||||
|
||||
private void Disconnect(Boolean complete) {
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Mqtt.Disconnect()");
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Disconnect(" + this.ToString() + ")");
|
||||
this.client.MqttMsgPublishReceived -= this.Client_MqttMsgPublishReceived;
|
||||
this.Unsubscripe();
|
||||
if(complete) {
|
||||
@ -59,7 +85,7 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
||||
}
|
||||
|
||||
private void Connect() {
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Mqtt.Connect()");
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Connect(" + this.ToString() + ")");
|
||||
this.client.MqttMsgPublishReceived += this.Client_MqttMsgPublishReceived;
|
||||
_ = this.settings.ContainsKey("user") && this.settings.ContainsKey("pass")
|
||||
? this.client.Connect(Guid.NewGuid().ToString(), this.settings["user"], this.settings["pass"])
|
||||
@ -102,15 +128,17 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
||||
#region IDisposable Support
|
||||
private Boolean disposedValue = false;
|
||||
|
||||
public override Boolean IsConnected => this.client != null ? this.client.IsConnected : false;
|
||||
public override Boolean IsConnected => this.client != null && this.client.IsConnected;
|
||||
|
||||
protected virtual void Dispose(Boolean disposing) {
|
||||
if(!this.disposedValue) {
|
||||
if(disposing) {try {
|
||||
try {
|
||||
this.connectionWatcher.Abort();
|
||||
this.connectionWatcher = null;
|
||||
} catch { }
|
||||
if(disposing) {
|
||||
try {
|
||||
this.connectionWatcherRunning = false;
|
||||
while(this.connectionWatcher != null && this.connectionWatcher.IsAlive) {
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
this.connectionWatcher = null;
|
||||
this.Disconnect(true);
|
||||
} catch (Exception) { }
|
||||
}
|
||||
|
@ -1,49 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29519.87
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConnectorDataMqtt_Core", "ConnectorDataMqtt\ConnectorDataMqtt_Core.csproj", "{5D7A8892-6687-4FE2-85D1-12B49782EDF0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils-IoT_Core", "..\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj", "{45837342-5906-4906-AB49-971767D9E180}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "M2Mqtt_Core", "..\..\Librarys\mqtt\M2Mqtt\M2Mqtt_Core.csproj", "{05B829EF-6F4F-496D-8936-35D7F2179DF0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "litjson_Core", "..\..\Librarys\litjson\litjson\litjson_Core.csproj", "{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils_Core", "..\Utils\Utils\Utils_Core.csproj", "{19424C4A-D024-484A-BE65-09C7C529A2C4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5D7A8892-6687-4FE2-85D1-12B49782EDF0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{45837342-5906-4906-AB49-971767D9E180}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{05B829EF-6F4F-496D-8936-35D7F2179DF0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CA22D3E9-4195-453D-9CE0-3EBC672E6D06}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{19424C4A-D024-484A-BE65-09C7C529A2C4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {92985FD1-A967-4AE1-B2E0-5E938C0A7D6A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,9 +1,11 @@
|
||||
# BlubbFish.Utils.IoT.Connector.Data.Mqtt (ConnectorDataMqtt)
|
||||
Library that connects to Mqtt using M2Mqtt
|
||||
|
||||
Maybe you find this Repo on Github. This is a mirror from [here](https://git.blubbfish.net/vs_utils/ConnectorDataMqtt).
|
||||
|
||||
## Linking to
|
||||
### Internal
|
||||
* BlubbFish.Utils.IoT ([Utils-IoT](http://git.blubbfish.net/vs_utils/Utils-IoT))
|
||||
|
||||
### External
|
||||
* M2Mqtt
|
||||
* M2Mqtt ([Used Fork](https://github.com/blubbfish/mqtt), [Original](https://github.com/eclipse/paho.mqtt.m2mqtt))
|
Loading…
Reference in New Issue
Block a user