[APP][Pro] Peblar EV Charger - Plug in. Power up. Automate

Sended you an invite on GitHub.
Please be my guest!

To continue working on this. When you have tested enough just open a PR and I’ll merge it and I’ll upload a new test version.

Hi,

I’m looking into buying a Peblar Business charger for the my future EV (Company lease) and want to know if I can use this app while the charger is connected to the e-flux backend.

Also, am I correct in assuming that having a Homewizard P1 Dongle is all that’s needed for load balancing?

Lastly I was planning to add an Eastron SDM630Modbus Energy meter to get the usage of the charger into Homey but I guess this is not needed with this charger and using this app, am I right?

The backend is not relevant I have the business charger too with GroenDus as Backend.

And yes I also have a HomeWizard P1 for load balancing the people who installed the EV charger actually linked that for me.

1 Like

Thanks for your swift reply!

Any chance this was added? I’m looking for this as well to automate my solar only charging.

I cannot use the default solar method as my home battery discharge is being handled as solar power which is undesirable

Uhm no but you can set it to solar only charging mode is that not good enough?

Unfortunately not. As my home battery discharges during high prices, the negative electricity flow is seen as solar power and the car starts charging.

Obviously undesired. :laughing:

I could solve this by buying a separate P1 device and plugging it directly into the solar inverter. But that seems a bit redundant as the API allows for switching to single phase. This would bring much better flexibility.

What do you expect from the homey app?
A toggle for “Force 1 phase” with Yes and No?

Yes, something like that.

HA has this in a switch:

Force single phase: This switch can be used to force the charger to use a single phase for charging your electric vehicle. This can be useful if you want to limit your current draw from the charger to a single phase, for example, to prevent overloading your electrical installation.

So here is my wish list:

Missing the capabilities:
L1+L2+L3 Volts, Watts, Amperes next to your current totals.
Alarms

UI:
Limits
1F/3F toggle
Light brightness (sounds is nice)

I found the add web ui password option in device settings, and it enabled the mode selection, nice. Adding it to the wizard would have prevented my confusion :blush:

I know it requires both the device password and api key, but I think thats fine.

Flows:
Set limits to A WITH the direct true fals to limit to 1F charging
Switch to Fase limit 1F or 3F
Start charging get an version with limit and fase mode for easy of use (same PUT anyway)

Than the overall management is offcourse nice also (reboot etc, firmware checks etc).
Since Peblar doesnt have an App I want the Homey device to replace the overall device management of the Peblar.
So having the measurements, and those controls I can override the behavior the way I want it.

I can help you, I worked out Homey scripts to do all of this, so I can integrate this easely into your app if you accept contributes (I created 10 Homey apps already, so I know what I am doing ;)). Just share your github url and ill create pull requests.

1 Like

This sounds awesome.

Maybe share your Homey scripts in the meantime? :grinning_face_with_smiling_eyes:

No need, Implemented this all today will put an update out soon

2 Likes

Maybe this can help. I only have 2 scripts, because the amps slider doesn’t work for me (403 error), perhaps because it’s a white label and they changed something to the software. Otherwise I use the Peblar app.

To set a specific Amp; use (I’ve put 10 amps, but you can put whatever you want):

// ===== CONFIG =====

const chargerIP = “192.168.x.x”;   // your charger IP

const apiToken = “xxxx”;  // your Peblar API token

const amps = 10;                    // desired current

// ===== CONVERT =====

const milliamps = amps * 1000;

// ===== REQUEST =====

const url = `http://${chargerIP}/api/wlac/v1/evinterface`;

const response = await fetch(url, {

method: “PATCH”,

headers: {

"Authorization": apiToken,

"Content-Type": "application/json"

},

body: JSON.stringify({

ChargeCurrentLimit: milliamps

})

});

// ===== ERROR HANDLING =====

if (!response.ok) {

const text = await response.text();

throw new Error(`Failed: ${response.status} - ${text}`);

}

console.log(`✅ Peblar set to ${amps}A`);

And because Peblar has no ‘pause’ function, I set it to 0 Amps:

/ ── CONFIGURATION ─────────────────────────────────────────

const PEBLAR_IP = “192.168.X.X”;   // ← Change to your Peblar’s local IP

const API_TOKEN = “xxxx”;  // ← Change to your Peblar API token

// ──────────────────────────────────────────────────────────

// Setting ChargeCurrentLimit to 0 mA pauses charging

// (values 0–5999 mA are below the EN-IEC 61851-1 minimum and pause the charger)

const response = await fetch(`http://${PEBLAR_IP}/api/wlac/v1/evinterface`, {

method: “PATCH”,

headers: {

"Accept": "application/json",

"Content-Type": "application/json",

"Authorization": API_TOKEN

},

body: JSON.stringify({ ChargeCurrentLimit: 0 })

});

if (response.ok) {

const data = await response.json();

log(“✅ Charging paused successfully”);

log(data);

} else {

log(`❌ Failed to pause charging. Status: ${response.status}`);

}

Make 2 scripts, copy paste them, change the IP address, put your token, include them in a flow and done.

have fun.

PS, a side note:

this works perfect in ‘default’ mode. And in ‘smart charging’ you set the charging limit higher than in the script. In my use case the script is a fall back in case I haven’t enough solar production. If you put the charging limit below the limit in the script, the charging limit will apply.

If you use ‘pure solar’ in smart charging, the script won’t work, at least not with my white label version. The ‘pure solar’ will have priority over the script.

You can see what is happening in system/diagnostics - ‘current limiting source’. If it says local rest API, the script is working as intended.

This behavior might be the result of the specific sw of the white label peblar charger, not sure.

Alright! Update 4 is live for testing:

This is a major update with a much broader charger control and monitoring surface.

New capabilities

  • Added Force 1 phase control and a readable phase mode value.
  • Added separate live charge limit and configured maximum charge limit values.
  • The live charge limit is now a slider in the normal Homey device UI.
  • Added per-phase voltage measurements for L1, L2, and L3.
  • Added per-phase current measurements for L1, L2, and L3.
  • Added per-phase power measurements for L1, L2, and L3.
  • Added separate fault and warning capabilities.
  • Added a readable alarm code list.
  • Added LED brightness and buzzer volume capabilities when the Peblar web password is configured.
  • Added firmware and customization version capabilities when the Peblar web password is configured.
  • Added firmware update available status.

New widgets

  • Added a Charger Management Widget for live charging control.
  • The widget can update the live charge limit, switch between 1F and 3F mode, start charging, and pause charging.
  • Updated the Smart Charging Mode Selector widget styling.
  • Updated widget previews to Homey’s 1024x1024 transparent preview format.

New Flow cards

  • Added charger online, offline, and authentication failed triggers and conditions.
  • Added charging started and charging stopped triggers.
  • Added cable plugged in and unplugged triggers.
  • Added smart mode changed trigger.
  • Added warning received, fault cleared, and warning cleared triggers.
  • Added alarm warning, alarm fault, and alarm-code conditions.
  • Added phase mode condition.
  • Added charge-limit-with-phase action.
  • Added phase mode action.
  • Added start-charging-with-limit-and-phase action.
  • Added LED brightness and buzzer volume actions.
  • Added reboot charger action.
  • Added firmware update available condition.

Improved behavior

  • Improved offline, retry, and authentication-failure handling.
  • The app now marks the charger unavailable when polling fails repeatedly or authentication fails.
  • Charge-limit writes now preserve the current phase mode.
  • Force 1 phase writes now preserve the current charge limit.
  • Charge-limit ranges now follow Peblar’s configured limit ceiling instead of using a hardcoded 48 A range.
  • CurrentCtrlFixedChargeCurrentLimit is treated as the leading ceiling for configured charge-limit ranges.
  • Hidden web-login-only capabilities are only added when the web password is available.
  • The app now supports a per-device Peblar web password with fallback to the legacy app-wide password setting.
  • General alarm timeline text is now more descriptive.
2 Likes

Nice developments!
I will receive my Peblar Business next week, so not using the app yet but following this topic with much interest.
My car won’t actually arrive untill august, so I will have to be patient :wink:

Please try V4 and let me know what you think or what is missing

Cool love it, great set of data to play with :slight_smile:

I did notice that it states there is a firmware update, and the web UI diagrees with that :slight_smile:
And the available firmware === running firmware so must be a check issue.

I believe everything else is there, great job, nice icons etc :slight_smile:

So far I only see one issue:
The firmware available.
The new values dont seem to generate Insights? For most of those that is the primairy use case :wink:

I wanted to validate how the active A limit works but without the inisghts that was not possible.
I hope it follows the set A that I use the flow cards for for example but also the 0A when the stop session was executed.

One more thing that is on my wish list. The state: there is no car connected.
I know the Homey implements this as Not plugged in.
But what I need is to know if there is an authorized session from the backoffice.
As far as I understand it now;
not pluged is: no car connected.
plugged in: connected, not authorized
paused: connected and authorized but not charging
charging/discharging: obviously

So you have the condition now Cable connected (love that since it solves my Not Not plugged in cards into more readable flows) so the same for authorized session: Session authorized that is true when all the paused and charing states results into true and the other two infot false.

Do you know if it is possible to retrieve the authorized rfid card from the API? the official app does that.

And for people with local managed Peblars the authorize endpoint is a must I assume, for me that is not usefull since I need to do so through the backoffice.

Would also be nice to have the cable conntected and the authorized as capability sensors.

Oh and for more control, support the A steps as 0.5 steps?

But amazing progress and near perfect already :slight_smile:

@Kyle_Michiels I see a real issue, the meter_power.charged is now reset regarly. This is not the Homey standard for the meter_power.charged, it is ment to just increase. It will break dashboards and the capability to calculate usage in certain periods.

Before the update it did increase only.

I wanted to say I have an update but uhm I will look into this now