Wallbox pulsar plus integration?

Yes it seems to be tuned very well.

I believe it does have sort of an I component, the charger current keeps increasing or decreasing (1A per 12 seconds) as long there is an error (exported or imported power), but with a dead zone (-250 to 250 W), and independent of the size of the error.

There could be an optimization with the dead zone limits, depending if you want a balance between export/import, make sure you never export, or make sure you never import, the zone can be shifted. It should not be made smaller than 1A (about 230W).

Still fine tuning the ‘Green’ mode, to properly control the pause/resume.

Question to the community:
How to avoid a situation as described above with my son not getting the expected charge because of ‘green’ or ‘eco’ mode?

For context: I’m the only nerd in the family, my wife and two sons do not have HA on their phones and will not look at, let alone use, the tablet with HA interface in the kitchen.

Option 1: I can make a schedule that changes the charge mode to ‘max’ at 22:00, so any car connected will be charged the next day. Disadvantage, if I did not need the full charge, I miss the opportunity the next day to use my excess solar.

Option 2: I put a big button connected to HA (ESPHome) close the Wallbox to force ‘max’ charging (or multiple buttons to select the charge mode) in case I need it. Most other smart chargers I have seen have such a selector on the unit …

Other thoughts?

1 Like

Coming back to the power reporting bug (charge power not consistently reported by the Wallbox over WiFi). With the mode controller it is again of interest to see the charger power. So I have set up a work around that seems to do the job reasonably well.

I defined a sensor that takes the reported power, except when going zero while the status is ‘charging’, then it retains the previously reported value. This works well except at the end of the charge, because it takes a while before the status changes to ‘waiting for car demand’.

In the configuration file:

sensor:

        # alternative (advanced workaround as long as reported power is not solved)
        wallbox_portal_charging_power_w_tracked:
            value_template: >
                {% if states('sensor.wallbox_portal_status_description') == "Charging" %}
                    {% if states('sensor.wallbox_portal_charging_power_w') == "0" %}
                        {{ states('sensor.wallbox_portal_charging_power_w_tracked') | float(0) | round(0) }}
                    {% else %}
                        {{ states('sensor.wallbox_portal_charging_power_w') | float(0) | round(0) }}
                    {% endif %}
                {% else %}
                    {{ "0" }}
                {% endif %}
            unit_of_measurement: "W"

Can use this workaround until Wallbox has figured out how to send data over WiFi.

1 Like

For the empty car, does your car API report anything? EG distance driven since last charge or battery state? If so you could override solar mode based on one of those parameters. This is what I intend to do, if <50 switch to grey mode. Depending on the weather forecast I can, through a service call, also cap the battery at 50-100% to leave headroom for solar the following day.

What does your sensor “actual power” represent? Is this Amp? For me not much sense changing the amp, my max solar output is 7a so I cap mine at 6a (for green mode) and 16a (for grey off peak)

Currently I monitor the excess power generated, if it exceeds 2k watt for 2 minutes then a Boolean switches on, if again for 2 minutes, it moves below (in case charger is idle) or net consumption > 2k (if charger is charging) it switches off. These values are reported by my smart meter.

The 2 minute delay is to avoid switching too often. The Boolean subsequently triggers a pause/resume on the wallbox.

Realize I can do this more efficiently but the Boolean allows me to debug more easily

Neither of our cars (Polestar 2, Fiat 500e) have an API. I don’t think any logic can predict how the car should be charged, live has too many variables.

‘actual power’ in my case is what actually is delivered by the grid (or received when negative). It’s power in “W”. Could have used ‘actual current’, but in the end the meter meters power.

If your max solar is 7A , with the charger minimum being 6A, you indeed only need an on/off (pause/resume) controller for ‘green’ mode and a ‘max’ mode, no point to have ‘eco’ mode :slight_smile: .

I take it your solar is 7A three phase? You mentioned before that the charger current is minimum 6A per phase? That is a big disadvantage indeed. No useful ‘eco’ mode. But you switch the charger on at 2 kW, that is about 3A per phase. Starting to charge at 6A per phase immediately exceeds the 2 kW excess solar. I would expect the system to continuously switch on and off?

I should have expressed myself more clearly, sorry. That’s 3 phase indeed, so approx 2kw max solar output per fase, Total 5.8kw max, at this time of the year I generate 4kw or more between 10am and 15pm - total power generation of 40-45kwh per day at the moment. In winter this drops to as low as 100kwh per month. So very much need the off peak grey charge as well :grinning:

At 7amp per phase my car charger consumes nearly all my solar as long as nothing else is on. Eco-mode (wallbox style) works between 9am and 16pm at this time of year with limited on off switching. Did not try full green.

I would welcome the option to charge on 1 phase as it would allow me to use excess solar more optimally @Oriol_FP , is this feature being developed for the pulsar plus? EG allowing the 3 phase charger to switch to 1 phase?

Have another 3 years before net metering is phased out so no rush… :wink:

Hi Roland. The single and three phase WallBox Pulsar Plus are identical, except for the electrical grid connection. Mine is fitted with a 4 pole 63A change over switch. 1 phase - off - 3 phase. Reason for 4 pole is to also switch off the neutral when off - a requirement here… The charger automatically charges using the number of phases connected when it is powered on. I have this so I can charge (faster) using all 3 phases over night on cheap electricity, but during the day I can charge on 1 phase. Even though I have 3 phase solar (3 separate systems - no load balancing) - using only one phase lets me be sure I always have the required 1.4kW excess on this phase…

The WB app does not report 1 or 3 phase - I wonder if this info is in the API? Great if it is? Otherwise a switch on a ESP to select 1 or 3 phase charge active, and then you could do a eco charge on 3 phases by being sure there is more than 1.4kw (6A) available on each phase…

Currently I have a ESP with a 3 position switch mounted next to my WallBox - so I can select eco, emergency, night modes - and 3 LED’s to give conformation of mode selected.

eco = start @ 6A if >7A available for > 5min, then step up / down current or pause if needed to keep a 1A buffer (will eventually decrease this).
emergency = ignore solar excess and time of day and charge at max rate anyway
night = start charging after 9pm (when our electricity is cheaper)

I will eventually add a second switch mounted beside the charger to let me tell the system I am in 3 phase charge mode (but much better if this info is in the API, and then we know automatically - how can we check, or have it added??) - then I will monitor all 3 solar phases for >1.4Kw on each phase, etc. We don’t have net metering, so I would like to do this now :slight_smile:

Really interesting stuff… have just paid for the car - pickup in a few days - so can start testing soon.

I am doing this in Node-RED with HA - thanks @GrantK for pointing me in this direction… gives a nice visual representation of the logic flow…

BTW, even better yet - if the charger is wired to 3 phase, let the user select via WB app / HA API whether to charge using 1 or 3 phases - then we could automate this (if only one phase has > 1.4kW then single phase charge, if all 3 phases have > 1.4kW each, then 3 phase charge) - I wonder if WallBox is listening :slight_smile:

The 6A (1.4kW) limitation is (I understand) set by the car charging standard internationally - on single phase you need 1.4kW, and on 3 phase you need 1.4kW x 3.

2 Likes

I have the ‘green’ mode working properly as well now. Connected a car last night, charging started this morning as soon as there was 1.5 kW excess for 5 min and the charge power increased nicely with increased solar power. Then I realized we need the car fully charge by noon and hit the ‘max’ button.

Surely there is always some finetuning to do, but here is the full implementation:

The automation controlling the charger current limit for the ‘green’ and ‘eco’ modes has a small update to only activate when the status is ‘Charging’, this prevents the current limit from creeping to 32A before charging even started.

- id: '1654960233260'
  alias: WALLBOX - Charger current controller
  description: Controls the Wallbox charger max current setting up and down (between
    6 and 32 A), maintaining the grid power around zero, to use excess solar power
    only.
  trigger:
  - platform: time_pattern
    seconds: /12
  condition:
  - condition: state
    entity_id: input_boolean.charger_max
    state: 'off'
  - condition: state
    entity_id: sensor.wallbox_portal_status_description
    state: Charging
  action:
  - choose:
    - conditions:
      - condition: numeric_state
        entity_id: sensor.actual_power
        below: '-250'
      sequence:
      - service: number.set_value
        data:
          value: '{{ [((states(''number.wallbox_portal_max_charging_current'') | float(0)
            + 1.0) | round(0)), 32] | min }}'
        target:
          entity_id: number.wallbox_portal_max_charging_current
    - conditions:
      - condition: numeric_state
        entity_id: sensor.actual_power
        above: '250'
      sequence:
      - service: number.set_value
        data:
          value: '{{ [((states(''number.wallbox_portal_max_charging_current'') | float(0)
            - 1.0) | round(0)), 6] | max }}'
        target:
          entity_id: number.wallbox_portal_max_charging_current
  mode: single

To create the charge mode selection buttons on the HA dashboard I added the following to the configuration file:

input_boolean:

    # Wallbox
    charger_green:
        name: "Wallbox green mode"

    charger_eco:
        name: "Wallbox eco mode"
        
    charger_max:
        name: "Wallbox max mode"

Each of these have a script associated to run the actions required to change charge mode:

# Charger control scripts

charger_green:
    sequence:
    - service: input_boolean.turn_on
      entity_id: input_boolean.charger_green
      
    - service: input_boolean.turn_off
      entity_id: input_boolean.charger_eco
      
    - service: input_boolean.turn_off
      entity_id: input_boolean.charger_max
      
    - service: number.set_value
      data:
        value: "6"
        entity_id: number.wallbox_portal_max_charging_current
        
charger_eco:
    sequence:
    - service: input_boolean.turn_off
      entity_id: input_boolean.charger_green
      
    - service: input_boolean.turn_on
      entity_id: input_boolean.charger_eco
      
    - service: input_boolean.turn_off
      entity_id: input_boolean.charger_max

    - service: number.set_value
      data:
        value: "6"
        entity_id: number.wallbox_portal_max_charging_current
        
charger_max:
    sequence:
    - service: input_boolean.turn_off
      entity_id: input_boolean.charger_green
      
    - service: input_boolean.turn_off
      entity_id: input_boolean.charger_eco
      
    - service: input_boolean.turn_on
      entity_id: input_boolean.charger_max
      
    - service: number.set_value
      data:
        value: "32"
        entity_id: number.wallbox_portal_max_charging_current

And there are two additional automations to pause and resume the charger in ‘green’ mode:

- id: '1654977801663'
  alias: WALLBOX - Charger pause controller - Resume
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: sensor.actual_power
    for:
      hours: 0
      minutes: 5
      seconds: 0
    below: '-1500'
  condition:
  - condition: state
    entity_id: input_boolean.charger_green
    state: 'on'
  - condition: state
    entity_id: sensor.wallbox_portal_status_description
    state: Paused
  action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.wallbox_portal_pause_resume
  mode: single
- id: '1654978038793'
  alias: WALLBOX - Charger pause controller - Pause
  description: ''
  trigger:
  - platform: numeric_state
    entity_id: sensor.actual_power
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: '250'
  condition:
  - condition: state
    entity_id: input_boolean.charger_green
    state: 'on'
  - condition: state
    entity_id: sensor.wallbox_portal_status_description
    state: Charging
  action:
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.wallbox_portal_pause_resume
  mode: single

And finally, to put it all together, this is what is in my dashboard:

type: vertical-stack
cards:
  - show_name: true
    show_icon: false
    type: button
    tap_action:
      action: toggle
    name: CHARGER CONTROLLER
  - type: horizontal-stack
    cards:
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: call-service
          service: script.charger_green
          data: {}
          target: {}
        entity: input_boolean.charger_green
        name: Green
        icon: mdi:leaf
        icon_height: 80px
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: call-service
          service: script.charger_eco
          data: {}
          target: {}
        entity: input_boolean.charger_eco
        name: Eco
        icon: mdi:weather-sunny
        icon_height: 80px
        show_state: false
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: call-service
          service: script.charger_max
          data: {}
          target: {}
        entity: input_boolean.charger_max
        name: Max
        icon: mdi:flash
        icon_height: 80px
  - type: entities
    entities:
      - entity: number.wallbox_portal_max_charging_current
        name: Current limit
      - entity: switch.wallbox_portal_pause_resume
        name: Enabled
  - type: history-graph
    entities:
      - entity: sensor.wallbox_portal_max_charging_current
        name: Charger Current Limit
    hours_to_show: 24
  - type: history-graph
    entities:
      - entity: sensor.actual_power
        name: Mains Power
    hours_to_show: 24
  - type: history-graph
    entities:
      - entity: switch.wallbox_portal_pause_resume
        name: Enabled

Which will give you something like this:

NOTES:

The automations can be realized/edited from the HA user interface. You can copy the code above into the automations.yaml file and then edit in the HA user interface.

Surely there is a way to simplify this. Let me know.

To be clear, this setup does NOT make use of the Wallbox eco-Smart functions because these cannot be managed through the API, or even the Wallbox app on WiFi. This setup creates similar functionality and is accessible from the HA dashboard using the official HA Wallbox integration (another shoutout @hesselonline for making this possible).

Copy with pride. Give me your opinion.

11 Likes

Hi @RT1080
This is a very interesting request, thanks for sharing.
I already noted this insight/feedback in my repository of insights and also shared this to the affected Product Owner of Ecosmart function.

Interesting intermediate solution reported here with 4 pole 63A change over switch. I am listening @andypnz . Not sure for how long, but till now, you are debating really interesting “jobs to be done

1 Like

This single phase / three phase switching is indeed mighty interesting.

The Wallbox has a relay on each phase and on neutral (also the single phase units at least in the Belgium market), so it should be able to do this without additional hardware. At least using a three phase unit on a single phase. Not sure about using a single phase unit on three phase. The four relays are there, but I believe the type 2 cable on the single phase units is, guess what, single phase.

In principle you could also use 2 phases and switch from 1 to 2 to 3 phases. A three phase supply without neutral (yeah that still exists) is to be connected as 2 phases and one neutral.

I’m curious what local regulations have to say about this, and if all cars will be ok with the number of phases switching like that. But, he, why not?

I would not switch the number of phases with the car plugged in. And I would only supply a 3 phase capable car with either 1 or 3 phases - and if 1 phase, always on the L1 output…

WallBox confirmed a 1 or 3 phase selection switch was no problem :slight_smile: Of course, you need a 3 phase Type 2 lead + a 3 phase capable car to think about 3 phase charging :slight_smile: Not to mention a 3 phase supply… About to add 3 phase Eco ( >1.4kW on all 3 phases) and 3 phase semi-Eco (>1.4kw on 2 phases, and >1kw on the 3rd) to my code.

I almost have my Node-Red automation complete. And a new mode added - “Eco/Night” - this was an interesting idea I had today - I have a switch to select this mode on the dashboard (the other mode selections are on a ESP8266 with LED feedback - I might add another switch + LED here…). When active, it will eco charge using solar. Of course, as the sun sets the charge will pause. But in this mode, after night rate (cheaper electricity) starts (here @ 9pm) the charger will start again at max charge rate. So Eco, with a guaranteed fully charged car in the morning… cheap as chips :slight_smile: @ Oriol_FP Another nice mode for the WallBox OEM Eco smart :slight_smile:

2 Likes

@andypnz - Andrew, I have a question for you…

When charging at night, how do you avoid your batteries being discharged by the Pulsar Plus?

I presume your solar power system normally compensates for power used on each phase according to the house loads on that phase, thus avoiding using power from the grid. But if you have cheap night rates from 9pm, presumably you want power used during this time to come from the grid, rather than your batteries. Curious as to how you manage this.

We don’t have a battery - for us, the economics just did not stack up - unlikely to save what the battery cost before the battery is end of life… But I would be surprised if a ‘smart’ battery system did not let you decide when the battery will provide / supplement power v’s power from the grid. Those with high tech battery systems will have the answers here I am sure.

Yes, I have the ability to program a schedule, specifying whether the battery charges or discharges, the rate in Watts at which charging/discharging occurs, etc. Can also schedule import or export, along with the rate in Watts. So the tools are there, but I can’t access them from HA. I was just curious to know what you might have come up with.

For us, having a hybrid inverter with battery backup, is more about security of supply, than financial return. We are only able to export at 3.5kW max due to transformer constraints imposed by Northpower. So that severely limits how much we can earn in solar credits, hence it makes sense to store and use as much of our own power as possible. The cheapest rate we can buy power overnight is 25c per kWh, which I suspect is a lot more than you’re paying.

2 Likes

With the intermittent Charging Power issue apparently Wallbox say there is no issue so it will never be fixed.
Email from Wallbox Support just received about my complaint.

Good Morning,

We checked internally the charge and it looks like it’s acting normally.
The charging process is intermittent because most of the car decrease the charging power as soon as the car is getting charged and the battery is getting full.

Please let me know if you think something is wrong!

Kindly,

Sabrina

Wallbox Service Team

That is a pathetic answer. Hopefully your contact is only oblivious of what is going on, else it is shameful. I would say we keep pushing. Just show the delivered power and added energy tracking together and it is clear that there is a problem.

Note that the API is not official, so Wallbox can decide to support or not. But their own app has the same problem, no escape there.

They know there is a problem. I had the control board replaced in my original Pulsar Plus, then a new unit replacement and then they gave me a Commander 2 to replace the Pulsar Plus which stopped the lost connection with WiFi as it’s connected with Ethernet. The Charging Power is still intermittent in the app and with HA via internet, works with Bluetooth in the app though!

I will check this next Thursday personally @Deedzy with collaboration of our Customer Service department. Sorry for the inconvenience.

@VdR regarding this “Note that the API is not official, so Wallbox can decide to support or not.”. The current status is that we are NOT supporting this even though I try to please HA community because I believe in this open source project and I think Wallbox could create synergies with it that would be beneficial for everyone. In any case, please, be very mindful at the moment to consider which issues are due to our Wallbox systems and which HA systems (I am sure you do, but let me reinforce this). Again will check this next week.
I hope you all have a nice weekend :slight_smile:

5 Likes

Here’s my latest Pulsar Plus dashboard, with a couple of functions still to be improved, but all the important ones are working now. I want to improve the presentation with some enhanced widgets, dials, buttons etc to make it look less boring than the standard ones provided by Node-RED. But the important thing is that all the functions work now, giving me the best charging experience I’ve had so far.

In particular I want to thank @VdR for his Charge Current Adjustment algorithm, @andypnz and @Oriol_FP for their ideas and suggestions, which have helped me greatly along the way, so I’d like to return the favour to others who are looking to automate their EV charging from solar power.

The two gauges on the right for Pause and Resume timers aren’t really necessary, but they have helped me greatly with debugging and it’s fun to watch them spinning around. My Pause time is 30 seconds of insufficient solar surplus and my Resume time is 120 seconds of adequate solar surplus, exactly the same as Wallbox use for their Eco-Smart function. It’s very cloudy today, so I have adjusted the solar threshold accordingly. As you can see, I’m only getting about 50 Watts left over after the house loads take priority.

At the very top right, is a Target kWh control, which Wallbox don’t offer in their app. I find it handy, so I can stop charging when the EV reaches about 80%. Then I have a simple start/stop timer and a control called Solar-only Mode which is the same as Wallbox’s Eco-Smart Full Green Mode.

Everything else is pretty obvious, but feel free to ask any questions you may have.

3 Likes

Looks great!. I like how you visualized the timers.

1 Like

Software update for the Wallbox yesterday (5.11.13). Has the charge power reporting been fixed? No car to charge for testing now.