Wallbox pulsar plus integration?

EM112 and EM340 used as “powerboost” have a 0.1Hz resolution

I don’t really see the relevance but it has 0.1Hz accuracy for frequency. The data refresh interval is 1s.

1 Like

Ok i see.

On my side the ajustement seems to be done within 5 seconds.

That meens on a full green charge i Will Always have something around 3-4% of grid energy used and some exported

Its still good. And i tought it was related on a refresh on the wallbox side.

But as you and @Krivatri are pointing. This seems to be Somewhere the better that Can be done

Thanks

Yeah I read the wrong part of the datasheet. Thanks for the right data.

@anonymous63 - My Shelly EM energy meter provides readings every 1 second, but they fluctuate wildly. I find it best to use a rolling-average stack to smooth out the readings before attempting to adjust the EV charge current accordingly. In my case, a 10 second averaging time works well. You could try 5 seconds, but the system may end up oscillating as @Krivatri says,

Brief update on the mqtt-bridge, it has moved: GitHub - jagheterfredrik/wallbox-mqtt-bridge: A MQTT bridge that enables local control of your Wallbox Pulsar Plus
It can now pause/resume and exposes the charger status. Thanks to @tronikos for all his hard work on the code.

3 Likes

Great work guys, thank you @jagheterfredrik @tronikos !
I installed the new version and will test it today.

edit:
I’m making a new sensor to convert the wallbox status number to a status description following the list provided by @GrantK.
but whilst coding I was wondering about the status “disconnected” and how this would work through mqtt instead of the cloud, so I did a little test and sure enough it confirmed my suspicion, when disconnecting the ethernet connection to the wallbox, nothing happend, all sensors froze, there is nothing to indicate the connection was lost.
would it be possible to implement something to check wether the connection is still alive or not?

1 Like

I did some testing with the car connected.
pause/resume button in mqtt now works as expected.
other sensors and switches are working too.

I do have 5 remarks:

  1. availability (device online/offline) is not detected when offline
  2. added energy resets to 0 when unplugging the car (should retain value until car is plugged in again)
  3. added range resets to 0 when unplugging the car (should retain value until car is plugged in again)
  4. sensor ac voltage rms always shows a value of 0 (when charging or not)
  5. sensor ac current rms sometimes shows a value of 6.1000000000005 A
  1. Well that makes sense, what are you trying to achieve? See if the Wallbox goes offline? If that’s the case you’d need a heartbeat and detect whenever it goes missing.
  2. Fixed
  3. Fixed
  4. (and 5) Those sensors are not exposed by the bridge? :thinking:

I’m using the status and the sensors of the charger and to monitor everything on my dashboard whilst charging the car. but when the connection to the wallbox is lost, the information on my dashboard isn’t updated anymore and it will go unnoticed.
I had often status “disconnected” before, but I guess this was due to a lost connection with the cloud server, not local.
anyways, I solved it by pinging the wallbox every 5 seconds.

the ac current rms and voltage rms sensors are coming from micro2wallbox, but I don’t need them really, it was just an observation.

et voilà, I’m now officially 100% local for my wallboxes.
I adapted all my templates and automations to mqtt instead of cloud.

thank you again @jagheterfredrik and @tronikos for your hard work!
very much appreciated.

1 Like

Curious, why do you want added energy and range to retain values until car is plugged in again? Only because the cloud integration does that? In fact if I remember right the cloud integration only retains the added range, not the added energy. I haven’t tested the latest version of the local integration yet but looking at the code I think now the added energy energy and range are broken when the car is plugged in. They will show values for the last session instead of the current one. We should be able to fix this by getting values from the current session if active or the last session if inactive. But first I would like to understand your needs. Would it be better to have 2 sensors, one for the current session, one for last session?

besides the max current setting I have the added energy displayed on my dashboard as I find it very useful to know how much energy has been consumed charging the car.
with the cloud integration, it was retained until the car was plugged in again.
with the latest version of bridge.py, the value now is retained too when unplugging the car and reset to 0 when plugged in again. (I have tested this 30 mins ago)
for me all is working as expected now.

I too can confirm that MQTT enable/pause now works - thank you so much @tronikos and @jagheterfredrik. Status appears to work too. The only sensor which still isn’t working for me is the cable connected one. As previously mentioned, I don’t know if this is related to me still running firmware 5.5.11. Is there anything I can do to help debug this?

1 Like

Can you try GitHub - jagheterfredrik/wallbox-mqtt-bridge at cable_connected

@jagheterfredrik Perfect!!! Cable connected now correctly reports and I also see you have changed the status output to be descriptions. I will start to migrate my automations to use this and see if there are any issues. Apart from being free of the cloud, the speed of response is so much better - this will make my solar power excess automation work so much better. Thank you again.

1 Like

Can you try the latest version in the main branch? Cable connected will be broken but I wonder if the added energy and range will also be broken due to show current session when car is plugged by jagheterfredrik · Pull Request #4 · jagheterfredrik/wallbox-mqtt-bridge · GitHub Since cable connected via the db doesn’t work for you I’m afraid those changes need to be changed and not check the was_connected field in the db. Can you run https://github.com/jagheterfredrik/wallbox-tooling/blob/c2e925c335eefc174814634f8f589feac5b1fdb4/mycli.sh and then:
SELECT * FROM active_session; when your car is plugged in and again when the car is unplugged? It would be good for us to compare their output.

1 Like

@tronikos I hope the information below is of some use:

plugged in:

MariaDB [wallbox]> SELECT * FROM active_session;
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
| id | state | prev_state | user_action | user_id | was_charging | was_connected | energy_tms | energy_mid | energy_total | charging_power | charged_range | charging_speed | charging_time | payment_id | unique_id  | start_energy_mid | start_charging_energy_tms | start_discharging_energy_tms | start_timestamp     | mid_failed_energy | mid_failed_clock | mid_autostop_clock | mid_exceed | mid_failed | mid_resume | discharging_energy | discharging_time | soc | remote_action | accumulative_energy_mid | accumulative_charging_energy_tms | accumulative_discharging_energy_tms | start_id_token | stop_id_token | stop_reason | in_process | ocpp_state |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
|  1 |   209 |        209 |           0 |  216907 |            0 |             0 |          0 |          0 |            0 |              0 |             0 |              0 |             0 |          0 | 1160547114 |               -1 |             814097.451575 |                           -1 | 2023-12-11 19:53:38 |     814097.451575 |                0 |                  0 |          0 |          0 |          0 |                  0 |                0 |   0 |             1 |                      -1 |                    814097.451575 |                                  -1 |                |               |           4 |          0 |          2 |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
1 row in set (0.00 sec)

unplugged:

MariaDB [wallbox]> SELECT * FROM active_session;
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+-----------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
| id | state | prev_state | user_action | user_id | was_charging | was_connected | energy_tms | energy_mid | energy_total | charging_power | charged_range | charging_speed | charging_time | payment_id | unique_id | start_energy_mid | start_charging_energy_tms | start_discharging_energy_tms | start_timestamp     | mid_failed_energy | mid_failed_clock | mid_autostop_clock | mid_exceed | mid_failed | mid_resume | discharging_energy | discharging_time | soc | remote_action | accumulative_energy_mid | accumulative_charging_energy_tms | accumulative_discharging_energy_tms | start_id_token | stop_id_token | stop_reason | in_process | ocpp_state |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+-----------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
|  1 |   209 |        209 |           0 |       1 |            0 |             0 |          0 |          0 |            0 |              0 |             0 |              0 |             0 |          0 |         0 |                0 |                         0 |                            0 | 0000-00-00 00:00:00 |                 0 |                0 |                  0 |          0 |          1 |          0 |                  0 |                0 |   0 |             1 |                      -1 |                               -1 |                                  -1 |                |               |           0 |          0 |          0 |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+-----------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
1 row in set (0.01 sec)

plugged back in:

MariaDB [wallbox]> SELECT * FROM active_session;
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
| id | state | prev_state | user_action | user_id | was_charging | was_connected | energy_tms | energy_mid | energy_total | charging_power | charged_range | charging_speed | charging_time | payment_id | unique_id  | start_energy_mid | start_charging_energy_tms | start_discharging_energy_tms | start_timestamp     | mid_failed_energy | mid_failed_clock | mid_autostop_clock | mid_exceed | mid_failed | mid_resume | discharging_energy | discharging_time | soc | remote_action | accumulative_energy_mid | accumulative_charging_energy_tms | accumulative_discharging_energy_tms | start_id_token | stop_id_token | stop_reason | in_process | ocpp_state |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
|  1 |   209 |        209 |           0 |  216907 |            0 |             0 |          0 |          0 |            0 |              0 |             0 |              0 |             0 |          0 | 1568506062 |               -1 |              814100.80285 |                           -1 | 2023-12-12 07:37:48 |      814100.80285 |                0 |                  0 |          0 |          0 |          0 |                  0 |                0 |   0 |             1 |                      -1 |                     814100.80285 |                                  -1 |                |               |           4 |          0 |          2 |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
1 row in set (0.00 sec)

While charging:

MariaDB [wallbox]> SELECT * FROM active_session;
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
| id | state | prev_state | user_action | user_id | was_charging | was_connected | energy_tms | energy_mid | energy_total | charging_power | charged_range | charging_speed | charging_time | payment_id | unique_id  | start_energy_mid | start_charging_energy_tms | start_discharging_energy_tms | start_timestamp     | mid_failed_energy | mid_failed_clock | mid_autostop_clock | mid_exceed | mid_failed | mid_resume | discharging_energy | discharging_time | soc | remote_action | accumulative_energy_mid | accumulative_charging_energy_tms | accumulative_discharging_energy_tms | start_id_token | stop_id_token | stop_reason | in_process | ocpp_state |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
|  1 |   209 |        209 |           0 |  216907 |            0 |             0 |          0 |          0 |            0 |              0 |             0 |              0 |             0 |          0 | 1568506062 |               -1 |              814100.80285 |                           -1 | 2023-12-12 07:37:48 |      814100.80285 |                0 |                  0 |          0 |          0 |          0 |                  0 |                0 |   0 |             1 |                      -1 |                     814100.80285 |                                  -1 |                |               |           4 |          0 |          2 |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
1 row in set (0.00 sec)

After charging:

MariaDB [wallbox]> SELECT * FROM active_session;
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
| id | state | prev_state | user_action | user_id | was_charging | was_connected | energy_tms | energy_mid | energy_total | charging_power | charged_range | charging_speed | charging_time | payment_id | unique_id  | start_energy_mid | start_charging_energy_tms | start_discharging_energy_tms | start_timestamp     | mid_failed_energy | mid_failed_clock | mid_autostop_clock | mid_exceed | mid_failed | mid_resume | discharging_energy | discharging_time | soc | remote_action | accumulative_energy_mid | accumulative_charging_energy_tms | accumulative_discharging_energy_tms | start_id_token | stop_id_token | stop_reason | in_process | ocpp_state |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
|  1 |   209 |        209 |           0 |  216907 |            0 |             0 |          0 |          0 |            0 |              0 |             0 |              0 |             0 |          0 | 1568506062 |               -1 |              814100.80285 |                           -1 | 2023-12-12 07:37:48 |      814100.80285 |                0 |                  0 |          0 |          0 |          0 |                  0 |                0 |   0 |             1 |                      -1 |                     814100.80285 |                                  -1 |                |               |           4 |          0 |          2 |
+----+-------+------------+-------------+---------+--------------+---------------+------------+------------+--------------+----------------+---------------+----------------+---------------+------------+------------+------------------+---------------------------+------------------------------+---------------------+-------------------+------------------+--------------------+------------+------------+------------+--------------------+------------------+-----+---------------+-------------------------+----------------------------------+-------------------------------------+----------------+---------------+-------------+------------+------------+
1 row in set (0.00 sec)

Fantastic, thanks, will release a fix on main branch shortly

Thanks. As I was worried. We need to switch to unique_id or user_id to detect that there is an active session.