philipdaubmeier / graphiot Goto Github PK
View Code? Open in Web Editor NEWVisualizes IoT sensor data in time series graphs. Includes .NET Core clients for Digitalstrom, Viessmann, Netatmo, Sonnen and WeConnect APIs.
License: MIT License
Visualizes IoT sensor data in time series graphs. Includes .NET Core clients for Digitalstrom, Viessmann, Netatmo, Sonnen and WeConnect APIs.
License: MIT License
Hi,
Firt of all thank you for your fantastic work!
I would like to add my Vitovalor PT2 (Fuelcell WKK) to my monitoring, but how can I find which parameters are available in the Viessmann API, so I can add the fuelcell specific parameters?
With kind regards,
Thijs
Hi Philip
First of all great work on that library specially for Viessmann API . However there is sthing wrong with serialization and schedule Type, have you seen that before
Exception has occurred: CLR/System.Text.Json.JsonException
An exception of type 'System.Text.Json.JsonException' occurred in System.Private.CoreLib.dll but was not handled in user code: 'The JSON value could not be converted to PhilipDaubmeier.ViessmannClient.Model.Features.Schedule.'
at System.Text.Json.ThrowHelper.ThrowJsonException_DeserializeUnableToConvertValue(Type propertyType)
at System.Text.Json.JsonSerializer.HandleStartArray(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack)
at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader)
at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at PhilipDaubmeier.ViessmannClient.Network.ViessmannAuthBase.<CallViessmannApi>d__10`2.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at PhilipDaubmeier.ViessmannClient.ViessmannPlatformClient.<GetDeviceFeatures>d__6.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at viessmantest.Program.<Main>d__0.MoveNext() in C:\Projects\viessmantest\Program.cs:line 28
Line which throws that is
var features = await client.GetDeviceFeatures(installationId, gatewayId);
Have you seen that before ?
Im just testing connector
ViessmannAuth viessmannAuth = new ViessmannAuth("sesecret", "secret");
var viessmannConnProvider = new ViessmannConnectionProvider<ViessmannPlatformClient>(viessmannAuth);
viessmannConnProvider.PlattformApiClientId="myclientid";
viessmannConnProvider.PlattformApiClientSecret="mysecret";
var client = new ViessmannPlatformClient(viessmannConnProvider);
var installationId = (await client.GetInstallations()).First().LongId;
Console.WriteLine(installationId);
var gatewayId = (await client.GetGateways(installationId)).First().LongId;
Console.WriteLine(gatewayId);
var devices = (await client.GetDevices(installationId, gatewayId)).ToList();
var features = await client.GetDeviceFeatures(installationId, gatewayId);
Hi,
First of thanks a lot for your work and effort.
I added the nuget and followed the readme in order to get the first results.
It looks like the NetatmoConnectionProvider is not included in the Nuget.
var netatmoConnProvider = new NetatmoConnectionProvider()
I included the following namespaces and it should be included in .Network if I'm right?
@using PhilipDaubmeier.NetatmoClient
@using PhilipDaubmeier.NetatmoClient.Model.Auth
@using PhilipDaubmeier.NetatmoClient.Model.WeatherStation
@using PhilipDaubmeier.NetatmoClient.Model.Core
@using PhilipDaubmeier.NetatmoClient.Model.HomeData
@using PhilipDaubmeier.NetatmoClient.Network
Could you please check?
Thanks
Hi,
First I would like to thank you for this amazing project! I am using the NetatmoWebClient in a project and it works really well.
One thing I would like is more information in the exception about why the call the the api is failing. I created a pull request, #4, that shows what I have in mind.
Hi again,
Thanks for the Nuget update yesterday. One other minor thing that I found out is that the reported CO2 by the weather base station is null.
weatherStation.Devices[0].DashboardData.CO2 -> results in null.
Other data is coming through just fine.
This is info that I'm getting from my weather base station.
Replace all currently hard-coded german strings by appropriate localization references and add string resources for storing the actual translations.
I get a 'Login retry unsucessful, API response could not be parsed, see inner exception.' exception when running the simple test snippet given in the README for WeConnect:
var auth = new WeConnectAuth("<omitted>", "<omitted>");
using var connectionProvider = new WeConnectConnectionProvider(auth);
var client = new WeConnectPortalClient(connectionProvider);
foreach (var vehicle in await client.GetVehicleList())
Console.WriteLine($"VIN: {vehicle.Vin} name: {vehicle.Name}");
I tested this with the NuGet package PhilipDaubmeier.WeConnectClient version 1.1.0.
The root cause is an 'Could not authenticate, see inner exception for details' exception with stack trace:
at PhilipDaubmeier.WeConnectClient.Network.WeConnectAuthBase.<Authenticate>d__15.MoveNext()
at PhilipDaubmeier.WeConnectClient.Network.WeConnectAuthBase.<RequestApi>d__13`1.MoveNext()
at PhilipDaubmeier.WeConnectClient.Network.WeConnectAuthBase.<RequestApi>d__12.MoveNext()
at PhilipDaubmeier.WeConnectClient.Network.WeConnectAuthBase.<CallApiNoRetry>d__11`2.MoveNext()
at PhilipDaubmeier.WeConnectClient.Network.WeConnectAuthBase.<CallApi>d__10`2.MoveNext()
Inner exception 'Invalid URI: The URI is empty.' with stack trace:
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString)
at PhilipDaubmeier.WeConnectClient.Model.Auth.AuthState.get_BaseUri()
at PhilipDaubmeier.WeConnectClient.Network.WeConnectAuthBase.ClearCookies(AuthState state)
at PhilipDaubmeier.WeConnectClient.Network.WeConnectAuthBase.<Authenticate>d__15.MoveNext()
Seems the AuthState BaseUri is never being set.
I tried to upgrade NetatmoWebClient to 1.6.0 in my .Net Core 3.1 application and got the following error message. I also tested to create an empty project and install 1.6.0 but got the same error.
Severity Code Description Project File Line Suppression State
Error NU1202 Package PhilipDaubmeier.NetatmoClient 1.6.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package PhilipDaubmeier.NetatmoClient 1.6.0 supports: netstandard2.1 (.NETStandard,Version=v2.1) NetatmoTest C:\Users\Mackan\source\repos\NetatmoTest\NetatmoTest\NetatmoTest.csproj 1
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("[email protected]", "xxx");
var netatmoConnProvider = new NetatmoConnectionProvider(AuthData)
{
AuthData = new NetatmoAuth("[email protected]", "xxx"),
AppId = "xyz123",
AppSecret = "anothercode",
Scope = "read_station read_presence access_presence"
};
var netatmoClient = new NetatmoWebClient(netatmoConnProvider);
To track mileage, consumption, charging quantities and other time series of Volkswagen vehicles with GraphIoT, a class library with a c# strongly typed api client shall be added to GraphIoT.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.