Skip to content

Commit 5cf3b0b

Browse files
committed
v3.22
1 parent 0d2e4e7 commit 5cf3b0b

File tree

6 files changed

+32
-26
lines changed

6 files changed

+32
-26
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,19 @@ or to show the help page
144144
If everything works properly, you will see something like this:
145145

146146
```
147-
rscp2mqtt [v3.21]
147+
rscp2mqtt [v3.22]
148148
E3DC system >192.168.178.111:5033< user: >your E3DC user<
149149
MQTT broker >localhost:1883< qos = >0< retain = >false< client id >✗< prefix >e3dc<
150150
Fetching data every second.
151151
Requesting PVI ✓ | PM (0) | DCB ✓ (1 battery string) | Wallbox (0) ✗ | Autorefresh ✓
152152
Log level = 0
153153
Stdout to terminal
154154
155-
[2024-04-28 09:00:00] pid=30210 ppid=1 RscpMqttMain.cpp(2805) Connecting to server 192.168.178.111:5033
156-
[2024-04-28 09:00:00] pid=30210 ppid=1 RscpMqttMain.cpp(2812) Success: E3DC connected.
157-
[2024-04-28 09:00:00] pid=30210 ppid=1 RscpMqttMain.cpp(1791) RSCP authentication level 10
158-
[2024-04-28 09:00:00] pid=30210 ppid=1 RscpMqttMain.cpp(2325) Connecting to broker localhost:1883
159-
[2024-04-28 09:00:00] pid=30210 ppid=1 RscpMqttMain.cpp(2337) Success: MQTT broker connected.
155+
[2024-04-29 19:00:00] pid=30220 ppid=1 RscpMqttMain.cpp(2804) Connecting to server 192.168.178.111:5033
156+
[2024-04-29 19:00:00] pid=30220 ppid=1 RscpMqttMain.cpp(2811) Success: E3DC connected.
157+
[2024-04-29 19:00:00] pid=30220 ppid=1 RscpMqttMain.cpp(1790) RSCP authentication level 10
158+
[2024-04-29 19:00:00] pid=30220 ppid=1 RscpMqttMain.cpp(2324) Connecting to broker localhost:1883
159+
[2024-04-29 19:00:00] pid=30220 ppid=1 RscpMqttMain.cpp(2336) Success: MQTT broker connected.
160160
```
161161

162162
Check the configuration if the connections are not established.

RELEASE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Release Notes
22

3+
### Release v3.22 (29.04.2024)
4+
5+
- Issue #63: e3dc/set/wallbox/charge is renamed to e3dc/set/wallbox/suspended
6+
37
### Release v3.21 (28.04.2024)
48

59
Features:

RscpMqttMain.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <regex>
2222
#include <mutex>
2323

24-
#define RSCP2MQTT_VERSION "v3.21"
24+
#define RSCP2MQTT_VERSION "v3.22"
2525

2626
#define AES_KEY_SIZE 32
2727
#define AES_BLOCK_SIZE 32
@@ -1485,7 +1485,6 @@ int createRequest(SRscpFrameBuffer * frameBuffer) {
14851485
protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_ENERGY_L1);
14861486
protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_ENERGY_L2);
14871487
protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_ENERGY_L3);
1488-
protocol.appendValue(&WBContainer, TAG_WB_REQ_AVAILABLE_SOLAR_POWER);
14891488
protocol.appendValue(&rootValue, WBContainer);
14901489
protocol.destroyValueData(WBContainer);
14911490
}
@@ -1651,8 +1650,8 @@ int createRequest(SRscpFrameBuffer * frameBuffer) {
16511650
sun_mode = getIntegerValue(RSCP_MQTT::RscpMqttCache, TAG_WB_EXTERN_DATA_ALG, TAG_WB_EXTERN_DATA, 2) & 128;
16521651
max_current = getIntegerValue(RSCP_MQTT::RscpMqttCache, TAG_WB_EXTERN_DATA_ALG, TAG_WB_EXTERN_DATA, 3);
16531652
}
1653+
for (size_t i = 0; i < sizeof(wallboxExt); ++i) wallboxExt[i] = 0;
16541654
if (strstr(it->topic, "control")) { // deprecated
1655-
for (size_t i = 0; i < sizeof(wallboxExt); ++i) wallboxExt[i] = 0;
16561655
if (sscanf(it->payload, "solar:%d", (int*)&wallboxExt[1]) == 1) {
16571656
sun_mode = 1;
16581657
} else if (sscanf(it->payload, "mix:%d", (int*)&wallboxExt[1]) == 1) {
@@ -1664,9 +1663,9 @@ int createRequest(SRscpFrameBuffer * frameBuffer) {
16641663
}
16651664
} else if (strstr(it->topic, "toggle")) {
16661665
wallboxExt[4] = 1;
1667-
} else if (strstr(it->topic, "charge")) {
1668-
int charging = getIntegerValue(RSCP_MQTT::RscpMqttCache, TAG_WB_EXTERN_DATA_ALG, TAG_WB_EXTERN_DATA, 2) & 32;
1669-
if ((!charging && !strcmp(it->payload, "1")) || (charging && !strcmp(it->payload, "0"))) {
1666+
} else if (strstr(it->topic, "suspended")) {
1667+
int suspended = getIntegerValue(RSCP_MQTT::RscpMqttCache, TAG_WB_EXTERN_DATA_ALG, TAG_WB_EXTERN_DATA, 2) & 64;
1668+
if ((!suspended && !strcmp(it->payload, "1")) || (suspended && !strcmp(it->payload, "0"))) {
16701669
wallboxExt[4] = 1;
16711670
}
16721671
} else if (strstr(it->topic, "sun_mode")) {
@@ -1677,7 +1676,7 @@ int createRequest(SRscpFrameBuffer * frameBuffer) {
16771676
wallboxExt[0] = sun_mode?1:2;
16781677
wallboxExt[1] = max_current;
16791678

1680-
if (wallboxExt[1] < 0) wallboxExt[1] = 0; else if (wallboxExt[1] > 32) wallboxExt[1] = 32; // max 32A
1679+
if (wallboxExt[1] < 1) wallboxExt[1] = 1; else if (wallboxExt[1] > 32) wallboxExt[1] = 32; // max 32A
16811680
SRscpValue WBExtContainer;
16821681
protocol.createContainerValue(&WBExtContainer, TAG_WB_REQ_SET_EXTERN);
16831682
protocol.appendValue(&WBExtContainer, TAG_WB_EXTERN_DATA_LEN, sizeof(wallboxExt));

RscpMqttMapping.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@ cache_t templates[] = {
442442
{ TAG_WB_DATA, TAG_WB_PM_POWER_L1, 0, "wallbox/power/L1", "", F_FLOAT_0, UNIT_W, 1, 0, false, false, false },
443443
{ TAG_WB_DATA, TAG_WB_PM_POWER_L2, 0, "wallbox/power/L2", "", F_FLOAT_0, UNIT_W, 1, 0, false, false, false },
444444
{ TAG_WB_DATA, TAG_WB_PM_POWER_L3, 0, "wallbox/power/L3", "", F_FLOAT_0, UNIT_W, 1, 0, false, false, false },
445-
{ TAG_WB_DATA, TAG_WB_AVAILABLE_SOLAR_POWER, 0, "wallbox/available_solar_power", "", F_FLOAT_0, UNIT_W, 1, 0, false, false, false },
446445
{ TAG_WB_EXTERN_DATA_ALG, TAG_WB_EXTERN_DATA, 3, "wallbox/max_current", "", F_AUTO, UNIT_A, 1, 0, false, false, false },
447446
{ TAG_WB_EXTERN_DATA_ALG, TAG_WB_EXTERN_DATA, 2, "wallbox/status", "", F_AUTO, UNIT_NONE, 1, 0, false, false, false },
448447
{ TAG_WB_EXTERN_DATA_ALG, TAG_WB_EXTERN_DATA, 2, "wallbox/plugged", "", F_AUTO, UNIT_NONE, 1, 8, false, false, false },
@@ -489,7 +488,7 @@ rec_cache_t rec_cache[] = {
489488
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, "set/wallbox/control", "^solar:[0-9]{1,2}$|^mix:[0-9]{1,2}$|^stop$", "", "", "", "", UNIT_NONE, RSCP::eTypeBool, -1, false, true }, // deprecated
490489
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, "set/wallbox/sun_mode", "^true|on|1$", "1", "^false|off|0$", "0", "", UNIT_NONE, RSCP::eTypeBool, -1, false, true },
491490
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, "set/wallbox/toggle", "^true|on|1$", "1", "", "", "", UNIT_NONE, RSCP::eTypeBool, -1, false, true },
492-
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, "set/wallbox/charge", "^true|on|1$", "1", "^false|off|0$", "0", "", UNIT_NONE, RSCP::eTypeBool, -1, false, true },
491+
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, "set/wallbox/suspended", "^true|on|1$", "1", "^false|off|0$", "0", "", UNIT_NONE, RSCP::eTypeBool, -1, false, true },
493492
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, "set/wallbox/max_current", "^[0-9]{1,2}$", "", "", "", "", UNIT_A, RSCP::eTypeBool, -1, false, true },
494493
{ TAG_WB_REQ_DATA, TAG_WB_REQ_SET_NUMBER_PHASES, "set/wallbox/number_phases", "^1|3$", "", "", "", "", UNIT_NONE, RSCP::eTypeUChar8, -1, false, true },
495494
{ 0, 0, "set/requests/pm", "^true|on|1$", "true", "^false|off|0$", "false", "", UNIT_NONE, RSCP::eTypeBool, -1, false, true },

TOPICS.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,11 @@ All topics are listed with the default prefix "e3dc".
217217
| Software Release | e3dc/system/software | "S10_XXXX_XXX" |
218218
| Solar Energy | e3dc/solar/energy | [kWh] |
219219
| Time Zone | e3dc/time/zone | "Europe/City" |
220-
| Wallbox Available Solar Power | wallbox/available_solar_power | [W] |
221220
| Wallbox Battery | e3dc/wallbox/charge_battery_before_car | (true/false) |
222221
| Wallbox Battery | e3dc/wallbox/discharge_battery_to_car | (true/false) |
223222
| Wallbox Battery | e3dc/wallbox/discharge_battery_until | [%] |
224223
| Wallbox Battery | e3dc/wallbox/disable_battery_at_mix_mode | (true/false) |
225-
| Wallbox Canceled | e3dc/wallbox/canceled | (true/false) |
224+
| Wallbox Suspended | e3dc/wallbox/suspended | (true/false) |
226225
| Wallbox Charging | e3dc/wallbox/charging | (true/false) |
227226
| Wallbox Current | e3dc/wallbox/max_current | [A] |
228227
| Wallbox Energy L1 | e3dc/wallbox/energy/L1 | [Wh] |
@@ -323,9 +322,13 @@ Please find detailled information and examples in the [README](README.md).
323322
| Control the power management (charge from grid in [W], number of cycles) | e3dc/set/power_mode | "grid_charge:2000:60" |
324323
| Wallbox | | |
325324
| Set the active wallbox by index (0..7) | e3dc/set/wallbox/index | (0..7) |
326-
| Set solar mode with the current in [A] | e3dc/set/wallbox/control | "solar:16" |
327-
| Set mix mode with the current in [A] | e3dc/set/wallbox/control | "mix:8" |
328-
| Stop charging | e3dc/set/wallbox/control | "stop" |
325+
| Set sun mode | e3dc/set/wallbox/sun_mode | (true/false) |
326+
| Set max current | e3dc/set/wallbox/max_current in [A] | (1..32) |
327+
| Suspend charging | e3dc/set/wallbox/suspended | (true/false) |
328+
| Toggle suspend charging | e3dc/set/wallbox/toggle | true |
329+
| (deprecated) Set solar mode with the current in [A] | e3dc/set/wallbox/control | "solar:16" |
330+
| (deprecated) Set mix mode with the current in [A] | e3dc/set/wallbox/control | "mix:8" |
331+
| (deprecated) Stop charging | e3dc/set/wallbox/control | "stop" |
329332
| Set battery to car mode | e3dc/set/wallbox/discharge_battery_to_car | (true/false) |
330333
| Set battery before car mode | e3dc/set/wallbox/charge_battery_before_car | (true/false) |
331334
| Set battery discharge until [%] | e3dc/set/wallbox/discharge_battery_until | [%] |
@@ -345,3 +348,5 @@ Please find detailled information and examples in the [README](README.md).
345348
| Enable SOC limiter | e3dc/set/soc_limiter | (true/false) |
346349
| Enable daily historical values | e3dc/set/daily_values | (true/false) |
347350
| Enable statistic values | e3dc/set/statistic_values | (true/false) |
351+
352+
Instead of the values "true" or "false", you can also use "1" or "0".

WALLBOX.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ The following topics are sent to the MQTT broker:
1515

1616
| Device / Tag | MQTT Topic | Values / [Unit] |
1717
| --- | --- | --- |
18-
| Wallbox Available Solar Power | wallbox/available_solar_power | [W] |
1918
| Wallbox Battery | e3dc/wallbox/charge_battery_before_car | (true/false) |
2019
| Wallbox Battery | e3dc/wallbox/discharge_battery_to_car | (true/false) |
2120
| Wallbox Battery | e3dc/wallbox/discharge_battery_until | [%] |
2221
| Wallbox Battery | e3dc/wallbox/disable_battery_at_mix_mode | (true/false) |
23-
| Wallbox Canceled | e3dc/wallbox/canceled | (true/false) |
22+
| Wallbox Suspended | e3dc/wallbox/suspended | (true/false) |
2423
| Wallbox Charging | e3dc/wallbox/charging | (true/false) |
2524
| Wallbox Current | e3dc/wallbox/max_current | [A] |
2625
| Wallbox Energy L1 | e3dc/wallbox/energy/L1 | [Wh] |
@@ -66,17 +65,17 @@ Sun Mode (true/1/false/0)
6665
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/sun_mode" -m true
6766
```
6867

69-
Switch charging on/off (true/1/false/0)
68+
Suspend charging (true/1/false/0)
7069
```
71-
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/charge" -m true
70+
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/suspended" -m true
7271
```
7372

74-
Switching between charging and not charging
73+
Toggle suspend charging
7574
```
7675
mosquitto_pub -h localhost -p 1883 -t"e3dc/set/wallbox/toggle" -m 1
7776
```
7877

79-
Set max current (0..32 A)
78+
Set max current (1..32 A)
8079
```
8180
mosquitto_pub -h localhost -p 1883 -t"e3dc/set/wallbox/max_current" -m 16
8281
```

0 commit comments

Comments
 (0)