WildernessLabs / Meadow_Issues

Public repo for bugs and issues with Meadow
15 stars 0 forks source link

Microsoft.Azure.Devices.Client dependancy implementations #255

Open mpinkus opened 1 year ago

mpinkus commented 1 year ago

Additional context without this and (maybe) AWS IOT implemented, there is very little argument for enterprise use.

Or a clear, full implementation "Lite"... if every developer has manually implement cloud management/twin, messaging and direct methods you will loose them before they see any success ...

Level of effort to accomplish?

mpinkus commented 1 year ago

{System.NotImplementedException: The method or operation is not implemented. at System.Globalization.CompareInfo.IndexOfCore (System.String source, System.String target, System.Int32 startIndex, System.Int32 count, System.Globalization.CompareOptions options, System.Int32 matchLengthPtr) [0x00006] in /root/myagent/_work/3/s/monobcl/mcs/class/corlib/corefx/CompareInfo.cs:89 at System.Globalization.CompareInfo.IndexOf (System.String source, System.String value, System.Int32 startIndex, System.Int32 count, System.Globalization.CompareOptions options, System.Int32 matchLengthPtr) [0x00072] in /root/myagent/_work/3/s/monobcl/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs:961 at System.String.ReplaceCore (System.String oldValue, System.String newValue, System.Globalization.CultureInfo culture, System.Globalization.CompareOptions options) [0x00052] in /root/myagent/_work/3/s/monobcl/external/corefx/src/Common/src/CoreLib/System/String.Manipulation.cs:969 at System.String.Replace (System.String oldValue, System.String newValue, System.StringComparison comparisonType) [0x0004d] in /root/myagent/_work/3/s/monobcl/external/corefx/src/Common/src/CoreLib/System/String.Manipulation.cs:931 at Microsoft.Azure.Devices.Client.StringValidationHelper.IsBase64String (System.String value) <0xc1698510 + 0x00016> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.DeviceAuthenticationWithRegistrySymmetricKey.SetKeyFromBase64String (System.String key) <0xc168c1a8 + 0x00020> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.DeviceAuthenticationWithRegistrySymmetricKey..ctor (System.String deviceId, System.String key) <0xc168c080 + 0x0001a> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.AuthenticationMethodFactory.GetAuthenticationMethod (Microsoft.Azure.Devices.Client.IotHubConnectionStringBuilder csBuilder) <0xc168bd68 + 0x000bc> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.IotHubConnectionStringBuilder.CreateWithIAuthenticationOverride (System.String iotHubConnectionString, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod) <0xc14ea660 + 0x00040> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.ClientFactory.CreateFromConnectionString (System.String connectionString, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.ITransportSettings[] transportSettings, Microsoft.Azure.Devices.Client.IDeviceClientPipelineBuilder pipelineBuilder, Microsoft.Azure.Devices.Client.ClientOptions options) <0xc14ed828 + 0x000b8> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.ClientFactory.CreateFromConnectionString (System.String connectionString, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.TransportType transportType, Microsoft.Azure.Devices.Client.IDeviceClientPipelineBuilder pipelineBuilder, Microsoft.Azure.Devices.Client.ClientOptions options) <0xc14ca6c8 + 0x00024> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.ClientFactory.CreateFromConnectionString (System.String connectionString, Microsoft.Azure.Devices.Client.TransportType transportType, Microsoft.Azure.Devices.Client.ClientOptions options) <0xc14ca558 + 0x0002c> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.DeviceClient+<>c__DisplayClass10_0.b__0 () <0xc14ca450 + 0x00012> in <1e96886a23e94429bf7d672e32c5aae4>:0 at (wrapper delegate-invoke) System.Func1[Microsoft.Azure.Devices.Client.InternalClient].invoke_TResult() at Microsoft.Azure.Devices.Client.DeviceClient.Create (System.Func1[TResult] internalClientCreator) <0xc14ca1f8 + 0x0000c> in <1e96886a23e94429bf7d672e32c5aae4>:0 at Microsoft.Azure.Devices.Client.DeviceClient.CreateFromConnectionString (System.String connectionString, Microsoft.Azure.Devices.Client.TransportType transportType, Microsoft.Azure.Devices.Client.ClientOptions options) <0xc14ca008 + 0x00032> in <1e96886a23e94429bf7d672e32c5aae4>:0 at HelloWorldV1.MeadowApp.Initialize () [0x000bd] in C:\src\Meadow\HelloWorldV1\HelloWorldV1\MeadowApp.cs:128 }

mpinkus commented 1 year ago

my code:

in init()

region Azure IOT Hubs

            azureIOTSettings = new AzureIOTSettings();

            deviceClient = DeviceClient.CreateFromConnectionString(azureIOTSettings.DeviceConnectionString, TransportType.Mqtt);

            deviceClient.SetMethodHandlerAsync("OnPrint", OnPrintHandler, null).Wait();

            #endregion Azure IOT Hubs

AzureIOT: DeviceConnectionString: HostName=***** as settings... i can provide a real connection string if anybody wants to debug it ...

adrianstevens commented 1 year ago

Absolutely agreed - improved Azure, GCP and AWS support are very high on the priority list

rido-min commented 11 months ago

maybe this alt. implementation might help to create a IoTHub DeviceClient for Meadow using MqttNet

https://github.com/iotmodels/MQTTnet.Client.Extensions.AzureIoT

DarkNoir commented 8 months ago

This would be nice....

adrianstevens commented 5 months ago

@jorgedevs let's priortize