Wallbox pulsar plus integration?

Just ran through the sequence again and confirmed the Home Assistant lock is re-enabling after the auto-lock time out.
Another observation - when plugging in on a locked Wallbox the bridge status reports as locked then immediately changes to paused while web reports locked (which it is).

In my mind Lock is roughly equal to ā€œdo not enable charging when a car is connectedā€. Locking a charger when the car is plugged means nothing (or maybe that itā€™ll be locked when the car is unplugged?).

@yavinmaster Are you locking using the app or the bridge? Do they show the same behavior?

@jagheterfredrik Iā€™m using the bridge but monitoring what is happening on either the app or the web client as well as HomeAssistant via the bridge.
To be clear, it all appears to work except for the lock in Home Assistant (from the bridge) is turning itself on after the auto-lock timeout period. The Home Assistant logbook reflects this and the lock button changes to ā€œunlockā€.

Just tried something else. Unplugged car, made sure auto-lock engaged. Plugged back in. Unlocked and started a charge from the Wallbox web app. This was reflected in the bridge correctly. Again however, the bridge showed the lock re-enabling after the auto lock timeout period. Maybe this is ā€œnormalā€ behaviour and the Wallbox ignores locked status when it is in Paused status after a start and stop event.

Thinking about this some more, the only downside is there is no way of actually knowing if the Wallbox is locked or not. You canā€™t look at the status of the lock switch and the status switches straight from locked to paused when plugging in, even if the Wallbox is still locked. There is currently no way to differentiate between locked+paused and paused+ready to accept a charge start.

Iā€™ve made an attempt here: make paused wallbox w/o active session appear locked by jagheterfredrik Ā· Pull Request #31 Ā· jagheterfredrik/wallbox-mqtt-bridge Ā· GitHub but want to test it first.

Regarding locking, this is my current view:

Unlock is essentially a ā€œloginā€, for multi-user chargers this makes even more sense.
A session can only start when a user is logged in (the app reflects this: ā€œUnlock your charger to start a new sessionā€). Once a session has started, it is attributed to the user who launched the session.

During the session the box can be logged out (either using the lock functionality in the app, or if youā€™re using auto-lock, by timing out, i.e. ā€œauto logoutā€). Again the current session will be attributed to the user who logged in to initiate the session.

Unplugging terminates the session, and the Wallbox lock status does not change.

On my side i was talking about the native eco green feature of the wallbox itself

1 Like

Once you have plugged in and unlocked, even with the app you canā€™t then relock the wallbox, even though through the bridge it did appear that the lock was re-engaging. The only way for the lock status to come back is to unplug and either lock (or let the auto lock kick in).
Iā€™ll test your trial later tonight.

I know Iā€™ve said it before, but I must keep saying it. Thanks for all the work you have put into this. It is more than usable and so good to have local control - what I see we are trying to do here is just put some polish on it so average users wonā€™t be confused by the operation.

Interesting, my app allows me to lock while charging and while paused (on iOS). You have a Pulsar Plus, right?

Edit: I did turn off the fancy UI though in Profile ā†’ Experimental features ā†’ ā€œImprovedā€ charger control

I do have a Pulsar Plus and have the same experimental features enabled. On neither my Android nor via the web interface can I lock the charger after stopping and starting a chargeā€¦I wonder if this is because I have auto lock enabled?

in the app, is the lock still available for the pulsar plus when auto lock is disabled?
in my case (copper sb) the lock button in the app is only availalbe with auto lock enabled.
I have the latest app version wich is considerably different then the previous version.
not sure if this is an app issue or not.
it does not seem very logical to me not having the possibility to lock the wallbox without auto lock enabled?
through the bridge I can lock the wallbox with auto lock disabled (with legacy_locking = yes)

edit:
just checked my wifeā€™s phone, she still has the old app and the lock button is greyed out with auto lock disabled.

Just tried the lock-status-trickery branch and I think you are on the right track but its not quite right. I ran the bridge via the console so you can see whatā€™s happening:

Startup without cable connected:

Connected to MQTT with 0
Publishing: added_energy 30709.299999999999
Publishing: charging_enable 0
Publishing: added_range 255.0
Publishing: lock 1
Publishing: max_charging_current 32
Publishing: status Locked
Publishing: charging_power 0.0
Publishing: cumulative_added_energy 844956
Publishing: cable_connected 0

Unlocked and let auto lock re-lock:

Publishing: lock 0
Publishing: status Ready
Publishing: lock 1
Publishing: status Locked

Connected cable and unlocked:

Publishing: cable_connected 1
Setting: lock 0
Publishing: added_range 0.0
Publishing: lock 0
Publishing: status Connected waiting schedule
Publishing: lock 1
Publishing: status Ready

Disconnected cable then reconnected it - status shown as Paused but it is really Locked (as confirmed by app):

Publishing: cable_connected 0
Publishing: status Locked
Publishing: status Paused
Publishing: cable_connected 1

I then killed the bridge and unplugged the car to start again:

Connected to MQTT with 0
Publishing: cable_connected 0
Publishing: charging_power 0.0
Publishing: status Locked
Publishing: added_energy 30709.299999999999
Publishing: added_range 0.0
Publishing: max_charging_current 32
Publishing: charging_enable 0
Publishing: lock 1
Publishing: cumulative_added_energy 844956

I then plugged the cable back in (without unlocking) - it is reporting status of paused but it is still locked.

Publishing: cable_connected 1
Publishing: status Paused

I see you have found that multiple status can exist at the same time (which makes sense). If you can publish all of these (at least in the console) it might help us come up with the logic as to what should be displayed when.

There canā€™t be multiple statuses at the same time.

It would be great if you could try with the GitHub - jagheterfredrik/wallbox-mqtt-bridge at lock-status-trickery-debug branch

(Edit: there are a couple of different statuses but they are all a single value)

Edit: I sat down and mapped up the state machine state values and control pilot state values and exposed them as sensors on the debug branch

OK a lot of data for you to look at but I think this is suggesting that ā€œSession stateā€ is what we need to translate to a useable state. I have mostly provided the debug sensors you created but in some cases Iā€™ve shown the logbook entry as several events occur too fast to capture.

Startup, not plugged in:

Added energy 30,709.3 Wh
Added range 0.0 km
Cable connected Unplugged
Charging power 0.0 W
Control pilot 161: Ready
Cumulative added energy 844,956.0 Wh
M2W status 6
S2 open 1
Session start timestamp 1
Session state 209: Lock
Status Locked

Plugged in: - this is the status that currently looks wrong as it reports paused instead of locked which you can get for session state.

Added energy 30,709.3 Wh
Added range 0.0 km
Cable connected Plugged in
Charging power 0.0 W
Control pilot 177: Connected 1
Cumulative added energy 844,956.0 Wh
M2W status 4
S2 open 1
Session start timestamp 1
Session state 210: Wait Unlock
Status Paused

Unlock:

Added energy 30,709.3 Wh
Added range 0.0 km
Cable connected Plugged in
Charging power 0.0 W
Control pilot 177: Connected 1
Cumulative added energy 844,956.0 Wh
M2W status 3
S2 open 1
Session start timestamp 1.70268e+09
Session state 179: Connected 3
Status Connected waiting schedule

After auto lock reengaged (but plugged in so still should be ready to charge):

Added energy 30,709.3 Wh
Added range 0.0 km
Cable connected Plugged in
Charging power 0.0 W
Control pilot 177: Connected 1
Cumulative added energy 844,956.0 Wh
M2W status 3
S2 open 1
Session start timestamp 1.70268e+09
Session state 179: Connected 3
Status Connected waiting schedule

Charging:

Wallbox Control pilot changed to 194: Charging 2
22:44:54 - 1 minute ago
Wallbox Session state changed to 194: Charging 2
22:44:54 - 1 minute ago
Wallbox S2 open changed to 0
22:44:54 - 1 minute ago
Wallbox Control pilot changed to 178: Connected 2
22:44:53 - 1 minute ago
Wallbox M2W status changed to 1
22:44:53 - 1 minute ago
Wallbox Status changed to Charging
22:44:53 - 1 minute ago
Wallbox Session state changed to 180: Connected 4
22:44:52 - 1 minute ago
Wallbox Charging enable turned on triggered by service Switch: Turn on
22:44:52 - 1 minute ago - Paul
Wallbox M2W status changed to 2
22:44:52 - 1 minute ago
Wallbox Status changed to Connected waiting car
22:44:52 - 1 minute ago

Added energy 2.7 Wh
Added range 0.0 km
Cable connected Plugged in
Charging power 1,434.0 W
Control pilot 194: Charging 2
Cumulative added energy 844,956.0 Wh
M2W status 1
S2 open 0
Session start timestamp 1.70268e+09
Session state 194: Charging 2
Status Charging

Paused charging:

Wallbox Control pilot changed to 177: Connected 1
22:47:13 - Now
Wallbox Session state changed to 182: Connected 6
22:47:13 - Now
Wallbox S2 open changed to 1
22:47:13 - Now
Wallbox Session state changed to 178: Connected 2
22:47:12 - 1 second ago
Wallbox Charging enable turned off triggered by service Switch: Turn off
22:47:12 - 1 second ago - Paul
Wallbox M2W status changed to 4
22:47:12 - 1 second ago
Wallbox Status changed to Paused
22:47:12 - 1 second ago

Added energy 51.3 Wh
Added range 0.0 km
Cable connected Plugged in
Charging power 0.0 W
Control pilot 177: Connected 1
Cumulative added energy 845,008.0 Wh
M2W status 4
S2 open 1
Session start timestamp 1.70268e+09
Session state 182: Connected 6
Status Paused

Unplugged:
Wallbox Session state changed to 209: Lock
22:49:04 - 25 seconds ago
Wallbox M2W status changed to 6
22:49:04 - 25 seconds ago
Wallbox Status changed to Locked
22:49:04 - 25 seconds ago
Wallbox Session start timestamp changed to 1
22:49:03 - 26 seconds ago
Wallbox Control pilot changed to 161: Ready
22:49:03 - 26 seconds ago
Wallbox Session state changed to 161: Ready
22:49:03 - 26 seconds ago
Wallbox Cable connected was unplugged
22:49:02 - 27 seconds ago
Wallbox M2W status changed to 0
22:49:02 - 27 seconds ago
Wallbox Status changed to Ready
22:49:02 - 27 seconds ago

Added energy 51.3 Wh
Added range 0.0 km
Cable connected Unplugged
Charging power 0.0 W
Control pilot 161: Ready
Cumulative added energy 845,008.0 Wh
M2W status 6
S2 open 1
Session start timestamp 1
Session state 209: Lock
Status Locked

Unlocked (cable disconnected):

Wallbox Session state changed to 161: Ready
22:50:54 - In 1 second
Wallbox Lock was unlocked triggered by service Lock: Unlock
22:50:54 - In 1 second - Paul
Wallbox M2W status changed to 0
22:50:54 - In 1 second
Wallbox Status changed to Ready
22:50:54 - In 1 second

Added energy 51.3 Wh
Added range 0.0 km
Cable connected Unplugged
Charging power 0.0 W
Control pilot 161: Ready
Cumulative added energy 845,008.0 Wh
M2W status 0
S2 open 1
Session start timestamp 1
Session state 161: Ready
Status Ready

Autolock engaged (cable disconnected):

Wallbox Session state changed to 209: Lock
22:51:55 - In 1 second
Wallbox Lock was locked
22:51:55 - In 1 second
Wallbox M2W status changed to 6
22:51:55 - In 1 second
Wallbox Status changed to Locked
22:51:55 - In 1 second

Added energy 51.3 Wh
Added range 0.0 km
Cable connected Unplugged
Charging power 0.0 W
Control pilot 161: Ready
Cumulative added energy 845,008.0 Wh
M2W status 6
S2 open 1
Session start timestamp 1
Session state 209: Lock
Status Locked

1 Like

Ok, Iā€™ve updated the non-debug branch to look for the ā€œWait Unlockā€ state, I think that should match expectations?

1 Like

I think for most of us who are using this integration, the main objective is local control; the second most important objective is to improve upon the ā€˜Native Eco Greenā€™ feature of the Wallbox. For me, thatā€™s certainly the case.

My Dashboard gives much improved control compared to the Wallbox offering. For example, I have a function which prevents discharge of my house battery late in the afternoon when charging my EV. I can choose to prioritise charging the house battery, or the EV. I can also stop charging when a target kWh value is reached. Wallbox made a good start with Eco Green, but with HA, many more improvements are possible.

in my case the ECO smart functionality was the very reason to start with HA.
because I have two wallbox ev chargers with load balancing and dynamic power sharing, the ECO smart is not available.
so I made my own ECO charging with HA and at the same time I have improved it to my own liking too.
having the local control in HA makes it complete.

the only reason I use the app is for scheduling a session.

1 Like

Have a look at ev smart charging:

I use it to plan based on electricity tariffs. I works great.

For a more advanced setup (including load balancing/ battery steering) I highly recommend Emhass, not for the faint of heart but once it worksā€¦ especially when on dynamic tariff.

https://community.home-assistant.io/t/emhass-an-energy-management-for-home-assistant/

2 Likes

Iā€™m definitely going to use this as part of my EV smart charging. I already have the automation written and was using the cloud integration but this local control will improve the control significantly due to the improved reaction time. My scheme is quite simple - when enabled, it measures the the excess solar production every 30 seconds and if it meets the required threshold it sets the Wallbox charging current to use the excess (plus or minus an optional offset). Itā€™s crude but works quite well.

I have another automation that dumps the house battery into the Wallbox if I have excess power in the house battery and the next dayā€™s solar forecast is good.

I know these can be replaced by something like emhass which Iā€™m sure would do a better job but as mentioned, its quite a task to set up and no doubt a pain if it doesnā€™t give you the results you expect - my automations are simple so easy to debug. So please with having Wallbox local control, now all power control in my house is local.

1 Like

my eco automation adjusts the max charge current 1 amp at a time.
when there is +700W excess solar energy going into the grid, it goes up 1A, waits 30 sec to check again, if again +700W excess, 1A up, etcā€¦
when -200W consuming from the grid, it goes 1A down, waits 30 sec to check again, etcā€¦
when more than -4000W consuming from the grid for more than 2 minutes, the charging stops until there is enough excess solar energy to the grid again (+4000W).
I find the 30 sec adjustment and the 2 minutes threshold very useful to take into account clouds, this way the current adjustment isnā€™t jumpy and the charging doesnā€™t pause/resume all the time on a sunny/cloudy day.

1 Like