Easee binding

The binding tries to parse the data retrieved from easse API. In your case “4.0” is retrieved for channel “state#dynamicChargerCurrent”. The binding should try to convert it into a double value. I also do not understand the issue.

EDIT: Found the issue. Will apply a fix.

1 Like

Hi Alex,

I charge two different EVs with the Easee charging station. Is it possible to retrieve the charging sessions per car (different authorization tags) in OpenHAB?

Kind regards,

Hi all

Recently I have experienced trouble of charger not allways starts charging when power dynamicchargercurrent gets set to >6, I do not think I made any changes in my code but one never know. Currently on 3.3 version.

I’ve been in touch wit Easse and the say the issue might be thirdparty integration, but the still try to help me solwe the problem.

Heres my rules just in case.

var lastIncTimer = now
var lastDecTimer = now
var loadInc = 6
var loadDec = 6




rule "EaseeBox Charging start/stop"
  

when
 
 
//Item EaseeBox_chargerOpMode changed
 
 Time cron "45 */2 * * * ?"

then
 

//CarChargerAllowed.sendCommand(OFF)
logInfo("Easee", "Cron based rule started")
logInfo("test", "Tidpunkt" +Evconnected.state)
if((CarChargerAllowed.state != OFF && evTarget.state == "Tomorrow" && spotPriceRange.state == "Tomorrow") || (CarChargerAllowed.state != OFF && evTarget.state == "Today") || (evTarget.state == "Now")){
  logInfo("Easee", "Ready to charge or completed step 0")
  if (EaseeBox_chargerOpMode.state as Number == 2 || EaseeBox_chargerOpMode.state as Number == 6){
    logInfo("Easee", "Ready to charge or completed step 1")

    
              
    if  (EaseeBox_output_current.state as Number !=6){ // && availableCurrent.state >=12.0 && now.minusMinutes(30).isAfter(timestampHigh)){
              logInfo("Easee", "Ready to charge or completed step 2")
              Easee_DynamicCircuitCurrentsPhase123.sendCommand("6;6;6")
            //Easee_SmartCharging.sendCommand(ON)
            newDynamicCurrent.postUpdate(6)
              logInfo("Easee", "Ready to charge or completed step 3")
                logInfo("Easee", "Laddstatus 283 ==2 6A")
              }
  }
}


if ((EaseeBox_chargerOpMode.state as Number == 1 && Easee_DynamicCircuitCurrentsPhase123.state !="0;0;0") || (EaseeBox_chargerOpMode.state as Number == 4 && Easee_DynamicCircuitCurrentsPhase123.state !="0;0;0")){
            
              Easee_DynamicCircuitCurrentsPhase123.sendCommand ("0;0;0")
              newDynamicCurrent.postUpdate(0)
              logInfo("Easee", "Laddstatus 306 =1 0A")

}
//if(newDynamicCurrent.state != EaseeBox_dynamicChargingCurrentL1.state){
  //sendBroadcastNotification("Easee: Dynamic current doesn't match")
//}
else (logInfo("Easee", "Cronregel avslutad utan åtgärd"))
if(evTarget.state != "Tomorrow"){
logInfo("Test", "Tomorrow == true")}
if(evTarget.state == "Now"){
logInfo("Test", "Now == true")}
if(evTarget.state == "Today"){
logInfo("Test", "Today == true")}
end



rule "Easee op mode docking"

when 
Item EaseeBox_chargerOpMode changed from 1 to 2
then
CarChargerAllowed.sendCommand(OFF)
Evconnected.postUpdate(now.withMinute(0).withSecond(0).withNano(0).toLocalDateTime.toString)
//Evconnected.postUpdate(new DateTimeType)
//EvCarReady.postUpdate(now.plusDays(1).withHour(6).withMinute(0).withSecond(0).withNano(0).toLocalDateTime.toString)
//EvCarReady.postUpdate(new DateTimeType(now.with(LocalTime.MIDNIGHT).plusHours(30)))
Ev_docking_finished.sendCommand(ON)

end








rule "EaseeBox loadbalancing"

  when

  Item EaseeBox_output_current changed  or Item gridloadmax changed     //Time cron "45 */1 * * * ?"  or Item gridloadmax changed  //"0 */1 * * * ?"
  //Item gridload changed //powergridCurrentConsumptionL1 changed or Item powergridCurrentConsumptionL2 changed or Item powergridCurrentConsumptionL3 changed

then
var oldDynamicCurrent = easeeMaxCurrent.state as Number
if(EaseeBox_chargerOpMode.state as Number==3){
logInfo("Easee", "eventbased rule started")
if (newDynamicCurrent.state==NULL){
    newDynamicCurrent.postUpdate(6)
}
logInfo("Easee","Set new variable")

if(oldDynamicCurrent >=7 && oldDynamicCurrent <=15){
loadDec = oldDynamicCurrent -1
loadInc = oldDynamicCurrent +1
//var loadDecx2 = (newDynamicCurrent.state) as Number -4
}}

if(oldDynamicCurrent <=6){
loadDec = 0
loadInc = oldDynamicCurrent +1
//var loadDecx2 = (newDynamicCurrent.state) as Number -4
}
if(oldDynamicCurrent ==0){
loadDec = 0
loadInc = 6
//var loadDecx2 = (newDynamicCurrent.state) as Number -4
}





 
  if (availableCurrentCriticalTimestamp.state == NULL) {
  availableCurrentCriticalTimestamp.postUpdate(new DateTimeType())  
  }
  if(availableCurrentLowTimestamp.state == NULL){
    availableCurrentLowTimestamp.postUpdate(new DateTimeType())
  }
  if(availableCurrentMedTimestamp.state == NULL){
    availableCurrentMedTimestamp.postUpdate(new DateTimeType())
  }

  if(availableCurrentHighTimestamp.state == NULL){
    availableCurrentHighTimestamp.postUpdate(new DateTimeType())
  }
  if(currentOverloadTimestamp.state == NULL){
    currentOverloadTimestamp.postUpdate(new DateTimeType())
  }
if(EaseeBox_chargerOpMode.state as Number != 1){
 

  // increase dynamic charging power
  
  var stringLoadInc = (loadInc + ";" + loadInc + ";" + loadInc)
  var stringLoadDec = (loadDec + ";" + loadDec + ";" + loadDec)
  logInfo("Easee", "Easee loadInc 3 phase: " + stringLoadInc)
  logInfo("Easee", "Easee loadDec 3 phase: " + stringLoadDec )

}

val timestampCritical = (availableCurrentCriticalTimestamp.state as DateTimeType).getZonedDateTime()
 val timestampLow = (availableCurrentLowTimestamp.state as DateTimeType).getZonedDateTime()
 val timestampMed = (availableCurrentMedTimestamp.state as DateTimeType).getZonedDateTime()
 val timestampHigh = (availableCurrentHighTimestamp.state as DateTimeType).getZonedDateTime()
  //Easee_DynamicCircuitCurrentsPhase123.sendCommand ("10;10;10")
  //Easee_DynamicCircuitCurrentsPhase123.sendCommand (loadInc + ";" + loadInc + ";" + loadInc)
            if (EaseeBox_chargerOpMode.state as Number == 3){
             logInfo("EV charger", "Loadbalancing started")
             logInfo("EV charger", "Increase step 2 Timestamp high: "+timestampHigh+" Timestamp med: "+timestampMed+ "Last inc timer: " +lastIncTimer)
            if (availableCurrentHighProxy.state ==ON && easeeMaxCurrent.state >= loadDec && now.minusMinutes(5).isAfter(lastIncTimer) || availableCurrentMedProxy.state ==ON && easeeMaxCurrent.state >= loadDec  && now.minusMinutes(5).isAfter(lastIncTimer)) { //(powergridCurrentConsumptionL1.state <=0 && powergridCurrentConsumptionL1.state >=-5 || powergridCurrentConsumptionL2.state <=0 && powergridCurrentConsumptionL2.state >=-5 || powergridCurrentConsumptionL3.state <=0 && powergridCurrentConsumptionL3.state >=-5){
             logInfo("EV charger", "Increase step 2 Timestamp high: "+timestampHigh+" Timestamp med: "+timestampMed+ "Last inc timer: " +lastIncTimer)
                 if (now.minusMinutes(30).isAfter(timestampHigh) || now.minusMinutes(30).isAfter(timestampMed)){
                //if (availableCurrent.state >=8.4 && easeeMaxCurrent.state >= loadDec && now.minusMinutes(5).isAfter(lastIncTimer) || availableCurrent.state >=8.4 && easeeMaxCurrent.state >= loadDec  && lastIncTimer == NULL) { //(powergridCurrentConsumptionL1.state <=0 && powergridCurrentConsumptionL1.state >=-5 || powergridCurrentConsumptionL2.state <=0 && powergridCurrentConsumptionL2.state >=-5 || powergridCurrentConsumptionL3.state <=0 && powergridCurrentConsumptionL3.state >=-5){
                logInfo("EV charger", "Increase step 3")
               if (newDynamicCurrent.state >=0 && newDynamicCurrent.state <=16){
                Easee_DynamicCircuitCurrentsPhase123.sendCommand (loadInc + ";" + loadInc + ";" + loadInc)
                //EaseeBox_dynamicChargingCurrentL1.sendCommand (loadInc)
                //EaseeBox_dynamicChargingCurrentL2.sendCommand (loadInc)
                //EaseeBox_dynamicChargingCurrentL3.sendCommand (loadInc)             
                logInfo("Easee", "Tillgänglig ström ökad till: "+loadInc+" Amp")
                postUpdate(newDynamicCurrent,loadInc)
                lastIncTimer = now
     }
    }
  }          





// sänk laddningsström
if (availableCurrentLowProxy.state ==ON && now.minusSeconds(90).isAfter(lastDecTimer) || availableCurrentCriticalProxy.state ==ON && now.minusSeconds(90).isAfter(lastDecTimer)){  // if (powergridCurrentConsumptionL1.state <=-6 || powergridCurrentConsumptionL2.state <=-6 || powergridCurrentConsumptionL3.state <=-6){
  if (now.minusSeconds(60).isAfter(timestampCritical) || now.minusMinutes(10).isAfter(timestampLow)){
      logInfo ("EV charger", "decend step 2")
       //if (availableCurrent.state <3.5 && now.minusSeconds(90).isAfter(lastDecTimer) || availableCurrent.state <3.5 && lastDecTimer == NULL){  // if (powergridCurrentConsumptionL1.state <=-6 || powergridCurrentConsumptionL2.state <=-6 || powergridCurrentConsumptionL3.state <=-6){
        logInfo ("EV charger", "decend step 3")
        if (newDynamicCurrent.state <=17 && newDynamicCurrent.state >=1){
              //easeeRequestBody = '{"dynamicCircuitCurrentP1":'+loadDec+',"dynamicCircuitCurrentP2":'+loadDec+',"dynamicCircuitCurrentP3":'+loadDec+'}'
            logInfo("Easee", "Tillgänglig ström sänkt till: "+loadDec+" Amp")
           Easee_DynamicCircuitCurrentsPhase123.sendCommand (loadDec + ";" + loadDec + ";" + loadDec)
            //EaseeBox_dynamicChargingCurrentL1.sendCommand (loadDec)
            //EaseeBox_dynamicChargingCurrentL2.sendCommand (loadDec)
            //EaseeBox_dynamicChargingCurrentL3.sendCommand (loadDec)
              postUpdate(newDynamicCurrent,loadDec)
              lastDecTimer = now
              }
              
        }
        
    }}
    else
              logInfo("Easee", "Loadbalancing performed but not charging")      
end

Hi again a little uppdate, I just saw that I was on 3.4 version and that my previos channel dissapeard among channels.

Amazing it works sometimes, but wich channel should I use now for loadbalancing

easee:mastercharger:55d540b590:123456:state#dynamicChargerCurrent
or
easee:mastercharger:55d540b590:123456:dynamic_current#phase1
easee:mastercharger:55d540b590:123456:dynamic_current#phase2
easee:mastercharger:55d540b590:123456:dynamic_current#phase3

old item config that doesn’t have a channel any more where I used to sedn for example 10;10;10 for 10 amps on each phase.

String Easee_DynamicCircuitCurrentsPhase123 "Dynamisk laddström" {channel="easee:mastercharger:55d540b590:12345:dynamic_current#setDynamicCurrents"}

Update again

It seems like the channel exist but not showing in UI

String Easee_DynamicCircuitCurrentsPhase123 "Dynamisk laddström" {channel="easee:mastercharger:55d540b590:12345:dynamic_current#setDynamicCurrents"}

For me it looks like this:

Maybe you should uninstall the binding and reinstall it. I also had the situation in the past where parts of an old version got mixed up with the current version and thus channels were missing.

easee:mastercharger:55d540b590:12345:dynamicCurrent#dynamicCurrents

This should be the correct channel name in the final version of the binding.

I will consider this but currently I do not have any time to work on further features.