TeslaTibberCharger 1.1.0
dotnet add package TeslaTibberCharger --version 1.1.0
NuGet\Install-Package TeslaTibberCharger -Version 1.1.0
<PackageReference Include="TeslaTibberCharger" Version="1.1.0" />
paket add TeslaTibberCharger --version 1.1.0
#r "nuget: TeslaTibberCharger, 1.1.0"
// Install TeslaTibberCharger as a Cake Addin #addin nuget:?package=TeslaTibberCharger&version=1.1.0 // Install TeslaTibberCharger as a Cake Tool #tool nuget:?package=TeslaTibberCharger&version=1.1.0
Tesla Tibber Charger
This package will offer you an option to charge your car if enough solar power is available. We will use the TibberSDK to get your current home power usage trough Tibber Pulse. Tibber Pulse is installed on your energy meter. If we detect a negative power consumption above 'MinProductionPower' in W we will try to start charging if your cable is conneted to the car and your are at your home position. If the connection to tibber fails we will reconnect the realtime subscription.
Usage
var httpClient = new HttpClient();
var teslaAccessToken = "";
var homeLatitude = "";
var homeLongitude = "";
var tibberToken = "";
var teslaProvider = new TeslaAdapter(httpClient, teslaAccessToken, homeLatitude, homeLongitude);
var tibberRrovider = new TibberAdapter(tibberToken);
var curentHomePower = await tibberRrovider.ListenToCurrentHomerPowerAsync();
var teslaObserver = new TeslaRealtimeTibberCharger(teslaProvider);
teslaObserver.OnConnectionClosed += TeslaObserver_OnConnectionIssue;
curentHomePower.Subscribe(teslaObserver);
void TeslaObserver_OnConnectionIssue()
{
curentHomePower = tibberProvider.ListenToCurrentHomerPowerAsync().Result;
curentHomePower.Subscribe(teslaObserver);
}
Contribution
Feel free to help to make it better
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Microsoft.Extensions.Caching.Memory (>= 7.0.0)
- System.Net.Http (>= 4.3.4)
- System.Text.Json (>= 7.0.2)
- Tibber.Sdk (>= 0.5.1-beta)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.