Home charger

State

Charging status

Declaration

getChargingStatus()

Example

val state:HomeCharger.State
assertTrue(state.chargingStatus.value == HomeCharger.ChargingStatus.CHARGING)
// Charging is active

Authentication mechanism

Declaration

getAuthenticationMechanism()

Example

val state:HomeCharger.State
assertTrue(state.authenticationMechanism.value == HomeCharger.AuthenticationMechanism.APP)
// Authentication mechanism is an app

Plug type

Declaration

getPlugType()

Example

val state:HomeCharger.State
assertTrue(state.plugType.value == HomeCharger.PlugType.TYPE_2)
// Plug type is 'Type 2'

Charging power kw

Declaration

getChargingPowerKW()

Discussion

Charging power

Example

val state:HomeCharger.State
assertTrue(state.chargingPowerKW.value?.value == 11.5)
assertTrue(state.chargingPowerKW.value?.unit == Power.Unit.KILOWATTS)
// Charging power is 11.5kW

Solar charging

Declaration

getSolarCharging()

Example

val state:HomeCharger.State
assertTrue(state.solarCharging.value == ActiveState.ACTIVE)
// Solar charging is active

Wi fi hotspot enabled

Declaration

getWifiHotspotEnabled()

Example

val state:HomeCharger.State
assertTrue(state.wifiHotspotEnabled.value == EnabledState.ENABLED)
// WiFi hotspot is enabled

Wi fi hotspot ssid

Declaration

getWifiHotspotSSID()

Discussion

The Wi-Fi Hotspot SSID

Example

val state:HomeCharger.State
assertTrue(state.wifiHotspotSSID.value == "Charger 7612")
// WiFi hotspot SSID is 'Charger 7612'

Wi fi hotspot security

Declaration

getWiFiHotspotSecurity()

Example

val state:HomeCharger.State
assertTrue(state.wiFiHotspotSecurity.value == NetworkSecurity.WPA2_PERSONAL)
// WiFi hotspot security uses the WPA2-Personal algorithm

Wi fi hotspot password

Declaration

getWiFiHotspotPassword()

Discussion

The Wi-Fi Hotspot password

Example

val state:HomeCharger.State
assertTrue(state.wiFiHotspotPassword.value == "ZW3vARNUBe")
// WiFi hotspot password is 'ZW3vARNUBe'

Authentication state

Declaration

getAuthenticationState()

Example

val state:HomeCharger.State
assertTrue(state.authenticationState.value == HomeCharger.AuthenticationState.AUTHENTICATED)
// Is authenticated to the charger

Charge current

Declaration

getChargeCurrent()

Discussion

The charge current

Example

val state:HomeCharger.State
assertTrue(state.chargeCurrent.value?.value == 0.5)
assertTrue(state.chargeCurrent.value?.unit == ElectricCurrent.Unit.AMPERES)
// Charger current is 0.5A

Maximum charge current

Declaration

getMaximumChargeCurrent()

Discussion

The maximum possible charge current

Example

val state:HomeCharger.State
assertTrue(state.maximumChargeCurrent.value?.value == 1.0)
assertTrue(state.maximumChargeCurrent.value?.unit == ElectricCurrent.Unit.AMPERES)
// Maximum charger current is 1.0A

Minimum charge current

Declaration

getMinimumChargeCurrent()

Discussion

The minimal possible charge current

Example

val state:HomeCharger.State
assertTrue(state.minimumChargeCurrent.value?.value == 0.1)
assertTrue(state.minimumChargeCurrent.value?.unit == ElectricCurrent.Unit.AMPERES)
// Minimum charger current is 0.1A

Coordinates

Declaration

getCoordinates()

Example

val state:HomeCharger.State
assertTrue(state.coordinates.value?.latitude == 52.520008)
assertTrue(state.coordinates.value?.longitude == 13.404954)
// Charger is located at 52.520008:13.404954

Price tariffs

Declaration

getPriceTariffs()

Example

val state:HomeCharger.State
assertTrue(state.priceTariffs[0].value?.pricingType == PriceTariff.PricingType.STARTING_FEE)
assertTrue(state.priceTariffs[0].value?.price == 4.5)
assertTrue(state.priceTariffs[0].value?.currency == "EUR")
// Charger starting fee tariff is 4.5€

Charging power

Declaration

getChargingPower()

Discussion

Charging power output from the charger

Example

val state:HomeCharger.State
assertTrue(state.chargingPower.value?.value == 350.0)
assertTrue(state.chargingPower.value?.unit == Power.Unit.KILOWATTS)
// Charging power is 350.0kW

Setters

Set charge current

Declaration

public SetChargeCurrent(ElectricCurrent chargeCurrent)

Example

val setChargeCurrent = HomeCharger.SetChargeCurrent(ElectricCurrent(0.5, ElectricCurrent.Unit.AMPERES))    

Set price tariffs

Declaration

public SetPriceTariffs(List<PriceTariff> priceTariffs)

Example

val setPriceTariffs = HomeCharger.SetPriceTariffs(arrayListOf(
        PriceTariff(PriceTariff.PricingType.STARTING_FEE, 4.5, "EUR"), 
        PriceTariff(PriceTariff.PricingType.PER_MINUTE, 0.3, "EUR"), 
        PriceTariff(PriceTariff.PricingType.PER_KWH, 0.3, "Ripple"))
    )    

Activate deactivate solar charging

Declaration

public ActivateDeactivateSolarCharging(ActiveState solarCharging)

Example

val activateDeactivateSolarCharging = HomeCharger.ActivateDeactivateSolarCharging(ActiveState.ACTIVE)    

Enable disable wi fi hotspot

Declaration

public EnableDisableWiFiHotspot(EnabledState wifiHotspotEnabled)

Example

val enableDisableWiFiHotspot = HomeCharger.EnableDisableWiFiHotspot(EnabledState.ENABLED)    

Authenticate expire

Declaration

public AuthenticateExpire(AuthenticationState authenticationState)

Example

val authenticateExpire = HomeCharger.AuthenticateExpire(HomeCharger.AuthenticationState.AUTHENTICATED)    

Getters

Get Home Charger property availability information

Declaration

public GetStateAvailability()
public GetStateAvailability(byte... propertyIdentifiers)

Example

// get all property availabilities
val getAvailability = GetStateAvailability()
// get chargingStatus and authenticationMechanism property availabilities
val getAvailabilityProperties = GetStateAvailability(0x01, 0x02)

Get Home Charger properties

Declaration

public GetState()
public GetState(byte... propertyIdentifiers)            

Example

// get all properties
val getState = GetState()
// get chargingStatus and authenticationMechanism properties
val getStateProperties = GetState(0x01, 0x02)