Alpaca issues
I tested ASCOM Alpaca but I found there are some properties are not supported correctly.
For example, Telescope SiteElevation is float type but NINA only tried to convert it Int and threw exception.
I didn’t test all properties but RightAscensionRate and DeclinationRate are also showing the same issue.
https://ascom-standards.org/alpyca/alpaca.telescope.html#alpaca.telescope.Telescope.DeclinationRate
2024-05-17T20:51:32.6330|ERROR|AscomDevice.cs|GetProperty|380|An unexpected exception occurred during GET of AlpacaTelescope.SiteElevation:
System.Text.Json.JsonException: '0xEF' is an invalid end of a number. Expected a delimiter. Path: $.Value | LineNumber: 0 | BytePositionInLine: 11.
---> System.Text.Json.JsonReaderException: '0xEF' is an invalid end of a number. Expected a delimiter. LineNumber: 0 | BytePositionInLine: 11.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes) at System.Text.Json.Utf8JsonReader.TryGetNumber(ReadOnlySpan
1 data, Int32& consumed)
at System.Text.Json.Utf8JsonReader.ConsumeNumber()
at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter
1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex) at System.Text.Json.Serialization.JsonConverter
1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 json, JsonTypeInfo
1 jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at ASCOM.Alpaca.Clients.DynamicClientDriver.SendToRemoteDevice[T](UInt32 clientNumber, HttpClient client, Int32 timeout, String uriBase, Boolean strictCasing, ILogger logger, String method, Dictionary`2 parameters, HttpMethod httpMethod, ImageArrayTransferType imageArrayTransferType, ImageArrayCompression imageArrayCompression, MemberTypes memberType) in J:\ASCOMLibrary\ASCOM.Alpaca\ASCOM.Alpaca.Clients\DynamicClientDriver.cs:line 854
at ASCOM.Alpaca.Clients.DynamicClientDriver.GetValue[T](UInt32 clientNumber, HttpClient client, Int32 timeout, String URIBase, Boolean strictCasing, ILogger logger, String method, ImageArrayTransferType imageArrayTransferType, ImageArrayCompression imageArrayCompression, MemberTypes memberType) in J:\ASCOMLibrary\ASCOM.Alpaca\ASCOM.Alpaca.Clients\DynamicClientDriver.cs:line 492
at ASCOM.Alpaca.Clients.DynamicClientDriver.GetValue[T](UInt32 clientNumber, HttpClient client, Int32 timeout, String URIBase, Boolean strictCasing, ILogger logger, String method, MemberTypes memberType) in J:\ASCOMLibrary\ASCOM.Alpaca\ASCOM.Alpaca.Clients\DynamicClientDriver.cs:line 471
at ASCOM.Alpaca.Clients.AlpacaTelescope.get_SiteElevation() in J:\ASCOMLibrary\ASCOM.Alpaca\ASCOM.Alpaca.Clients\AlpacaDevices\AlpacaTelescope.cs:line 1186
at InvokeStub_AlpacaTelescope.get_SiteElevation(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Comments (3)
-
reporter -
repo owner Hi Kim,
N.I.N.A. is using the ASCOM.Alpaca package which is doing the serialization, so for any issues in that part you’d have to reach out to the ascom developer group. https://ascomtalk.groups.io/g/Developer/topics
-
repo owner - changed status to closed
Closing as this is related to the ascom client library
- Log in to comment
This is a JSON result when I run the Python reference code.
b'{"Value":94.0,"ClientTransactionID":10,"ServerTransactionID":8874,"ErrorNumber":0,"ErrorMessage":""}'