Easee binding

You should remove all easee things and start from scatch.
Once the bridge is added using the auto discovery is the most convenient option to add circuits and chargers.

Currently the circuit will remain in status unknown as I have not yet found an easy way to sync the status with the master charger status. As the circuit only has a few channels I consider removing the circuit again and merge the channels into the charger thing.

I have, so setDynamicCurrents dont work yet.

Thanks look forward!

I double checked and it seems that

config#lockCablePermanently

is exactly what you are looking for. At least according to the API documentation it should be the same:

Hi,
I just tries to setup the bridge with my credentials and site id.
But the thing is not created.
" HANDLER_INITIALIZING_ERROR
com/google/gson/ToNumberStrategy"

Could it be a problem, that I run OpenHab 3.2 ?

Michael

Unfortunately it does not work with openhab 3.2.
It seems that the gson lib which is used for JSON transformation was updated in openhab 3.3 and there are some breaking changes.

Hi Alex,
thank you very much for sharing this ā€œearlyā€ version of this bindingā€¦this is really awesome !!! I will start experimenting with it :slight_smile: I had some problems setting up the thing configuration manuallyā€¦isnā€™t there a ā€œbridgeā€ missing in your READMEā€™s ā€œfull exampleā€ ? For me it only worked with the following syntax:

Bridge easee:site:mysite1 [ username="abc@def.net", password="secret", siteId="471111", dataPollingInterval=1 ] {
        Thing mastercharger myCharger1 [ id="EHXXXXX1", circuitId="1234567" ]
        Thing charger myCharger2 [ id="EHXXXXX2" ]
}

Via the official API documentation I did also figure out what the different chargerOpModes mean (updated 23.04.2023):

// Modes of Operation (op Modes) | Source: Error Codes / Enumerations
// 0 = Offline
// 1 = Disconnected
// 2 = AwaitingStart
// 3 = Charging
// 4 = Completed
// 5 = Error
// 6 = ReadyToCharge
// 7 = AwaitingAuthentication
// 8 = Deauthenticating

Regards,
Hendrik

Awesome! I just manage to pause and resume charging from openhab.

However, the polling interval seems to work bad. I set the interval to 1 min for testing but still the Latest Pulse timestamp is 15 minutes old. It seems some random how the polling frequent works

Indeed there is a ā€œBridgeā€ missing in the Readme, I will add this.

I will also adopt the charger state mapping.

Latest Pulse does not refer to the latest API call but to the latest update send by the charger to the cloud. I do not have any chance to change this. I also observed that this might be up to 15min old even if the charger is ā€œonlineā€.

Can somebody share an example of .items configuration?
Iā€™m quite new to OH and would like to create the following items (and expose to homekit):

  1. A switch to start and pause charging
  2. A lock to lock/unlock cable
  3. A dimmer to specify the charging kWh and display current charging KWh.

Also would like to ask to increase the polling interval - right now the minimal is 1min, is there any way to lower it to 20-30seconds? My current script is polling every 20 seconds without issue.

Appreciate your help in advance!

I already ran into issues with too frequent API calls. There is a couple of calls done every minute I do not know if all these calls are count into one limit. I will investigateā€¦

Im implemented something like this but it currently works write only:

items

Number                  Easee_Charger_Power                   "Wallbox Leistung [%d]"                                         <energy>            (gWallbox_General)
Number:ElectricCurrent  Easee_Circuit_Phase1                  "Phase 1"                                                       <energy>            (gWallbox_General)                                   { channel="easee:mastercharger:straelen:charger:dynamic_current#phase1" }
Number:ElectricCurrent  Easee_Circuit_Phase2                  "Phase 2"                                                       <energy>            (gWallbox_General)                                   { channel="easee:mastercharger:straelen:charger:dynamic_current#phase2" }
Number:ElectricCurrent  Easee_Circuit_Phase3                  "Phase 3"                                                       <energy>            (gWallbox_General)                                   { channel="easee:mastercharger:straelen:charger:dynamic_current#phase3" }
String                  Easee_Circuit_Dynamic_Phase_Command   "Dynamic Phase Command"                                                             (gWallbox_General)                                   { channel="easee:mastercharger:straelen:charger:dynamic_current#setDynamicCurrents" }

rules

rule "Easee Power Control"
when
    Item Easee_Charger_Power changed
then
	logDebug("easee.trigger", "[TRIGGER] Easee Power Control")
	if (Easee_Charger_Status.state == 3) {
		if (Easee_Charger_Power.state == 48) {
			Easee_Circuit_Dynamic_Phase_Command.sendCommand("16;16;16")
		} else {
			Easee_Circuit_Dynamic_Phase_Command.sendCommand(Easee_Charger_Power.state + ";0;0")
		}
	} else {
	    logInfo("easee.script", "No active charging process")
	}
end

sitemap

Switch item=Easee_Charger_Power mappings=[6="1400", 7="1600", 8="1800", 9="2100", 10="2300", 16="3700", 48="11000"] icon="energy"

I tested it and it works for me. But it will not be updated as this is a ā€œvirtualā€ item. That will require additional rules.

2 Likes

Updated version now supports more frequent updates: minimun is now set to 20 seconds.
Also I added a switch channel that allows to start/stop charging easily when authorization is required.

2 Likes

Hi, Iā€™ve been slow in publishing anything hereā€¦I have a first version of an Easee binding working since January. Still things left to do but basic integration seem to work (read only so far). Need to check if any updates needed for latest release (developed on 3.2) but otherwise testable. Supports multiple chargers but havenā€™t tested as I run only one. Have the same thing left as @AlexF regarding making too many API calls in too short time but I think it can be solved by implementing a queue handler before invoking the HTTP client for API calls.

I already have a queue implemented. The queued tasks are handled every X seconds where X is the polling interval.
As I need to call several API functions to gather all data there is not just one call every X seconds but 5 or even more of these calls. I guess if you have 2 or 3 chargers the situation will be even worse as I believe the API calls are counted per account and not per charger.

1 Like

Yeah, I also use polling but I was thinking of implementing a message queuing mechanism in the API handler to ensure certain minimum time between calls. For instance, token refresh is also needed and in my current implementation itā€™s asynchronous to polling for changes. Spent some time understanding the Easee cloud API back in December-January but most is forgotten by now. Will recheck and also enable debugging in my binding to trace call sequence towards the API.

Hi
I did use to have a rule managing my wallbox, but since some time back in time, my token renewal fails, with error code 400 a non empty requestbody i requierd. So now I started implement this binding, but meanwhile maybe someone here knows how to send token renewals, gettings via sendHttpPost schould look like.

Binding was a total no brainer and easy to setup, but my test ,mashine does not have access to my powergrid meter, for make sure to not blow main fuse, so I have some stuff to manage yet

Just installed the binding.
After create new site thing and added the credential I get follow error:

20:25:42.464 [INFO ] [hab.event.ThingStatusInfoChangedEvent] - Thing ā€˜easee:site:83d33798b1ā€™ changed from UNKNOWN: waiting for web api login to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): com/google/gson/ToNumberStrategy
20:25:42.464 [ERROR] [.core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ā€˜easee:site:83d33798b1ā€™: com/google/gson/ToNumberStrategy
java.lang.NoClassDefFoundError: com/google/gson/ToNumberStrategy

Hi @AlexF , thanks for the update! Is the link in the 1st post still the latest version? I tried to change polling interval to 20 but in OH UI it still think in minutes:

I get the same error. Did you find a solution?

No
I still waiting for answer :slight_smile: