You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
When developing my .net core 3 web application, I can get the measure data. However, when I run the .net core on my raspberry, I get an error once it tries to run this line of code:
var weatherStation = await netatmoClient.GetWeatherStationData();
This is the error I get. Any idea what could be wrong here?
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at PhilipDaubmeier.NetatmoClient.NetatmoAuthBase.LoadAndStoreAccessToken(IEnumerable`1 postParameters)
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at PhilipDaubmeier.NetatmoClient.NetatmoAuthBase.GetInitialAccessToken()
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at PhilipDaubmeier.NetatmoClient.NetatmoAuthBase.Authenticate()
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at PhilipDaubmeier.NetatmoClient.NetatmoAuthBase.RequestNetatmoApi(Uri uri, IEnumerable`1 parameters)
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at PhilipDaubmeier.NetatmoClient.NetatmoAuthBase.CallNetatmoApi[TWiremessage,TData](Uri uri, IEnumerable1 parameters)
May 08 12:58:46 PI dotnet-sgw-blazor[24417]: at PhilipDaubmeier.NetatmoClient.NetatmoWebClient.GetWeatherStationData(ModuleId deviceId, Nullable1 getFavorites)
This is the code that goes before it:
var AuthData = new NetatmoAuth("info@xxx.be", "xxx");
var netatmoConnProvider = new NetatmoConnectionProvider(AuthData)
{
AuthData = new NetatmoAuth("info@xxx.be", "xxx"),
AppId = "xyz123",
AppSecret = "anothercode",
Scope = "read_station read_presence access_presence"
};
var netatmoClient = new NetatmoWebClient(netatmoConnProvider);
The text was updated successfully, but these errors were encountered:
First of all: thanks for your interest and for using my library!
What you describe does not seem like a bug in the NetatmoClient library but looks like you have a connection issue. Does your raspberry Pi have unrestricted access to the internet?
The GetInitialAccessToken method is the first internal method that does a request to the netatmo server, that is why it is failing here.
Could you also provide the exact exception message you are getting? You only posted the stack trace.
Hi Philip,
No, no thank you for your effort on this! Sorry for the late reply here..
The RPi has full access to the outside world, but I forgot to set legit DNS servers... totally stupid as a network engineer 👎 Just taking things for granted..
Problem solved & sorry to bother you for nothing! Thanks for pointing in the right direction!
Hi,
When developing my .net core 3 web application, I can get the measure data. However, when I run the .net core on my raspberry, I get an error once it tries to run this line of code:
This is the error I get. Any idea what could be wrong here?
This is the code that goes before it:
The text was updated successfully, but these errors were encountered: