Skip to content

Commit 5c9bd35

Browse files
committed
v3.39
1 parent f29b7f5 commit 5c9bd35

File tree

8 files changed

+36
-8
lines changed

8 files changed

+36
-8
lines changed

.github/workflows/dockerimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
-
1919
name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121
-
2222
name: Docker meta
2323
id: meta

DOCKER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A Docker image is available at https://hub.docker.com/r/pvtom/rscp2mqtt
1010
### Start the docker container
1111

1212
```
13-
docker run --rm -e TZ=Europe/Berlin -e E3DC_IP=<IP> -e E3DC_USER=<your user> -e E3DC_PASSWORD=<your password -e E3DC_AES_PASSWORD=<your AES password> -e MQTT_HOST=<MQTT broker> pvtom/rscp2mqtt:latest
13+
docker run --rm -e TZ=Europe/Berlin -e E3DC_IP=<IP> -e E3DC_USER=<your user> -e E3DC_PASSWORD=<your password> -e E3DC_AES_PASSWORD=<your AES password> -e MQTT_HOST=<MQTT broker> pvtom/rscp2mqtt:latest
1414
1515
# or with .config
1616
docker run -e TZ=Europe/Berlin --rm -v /path/to/your/.config:/opt/rscp2mqtt/.config pvtom/rscp2mqtt:latest
@@ -19,7 +19,7 @@ docker run -e TZ=Europe/Berlin --rm -v /path/to/your/.config:/opt/rscp2mqtt/.con
1919
### Start the docker container including InfluxDB support
2020

2121
```
22-
docker run --rm -e TZ=Europe/Berlin -e E3DC_IP=<IP> -e E3DC_USER=<your user> -e E3DC_PASSWORD=<your password -e E3DC_AES_PASSWORD=<your AES password> -e MQTT_HOST=<MQTT broker> -e ENABLE_INFLUXDB=true -e INFLUXDB_HOST=<host name> -e INFLUXDB_VERSION=1 -e INFLUXDB_1_DB=<db name> pvtom/rscp2mqtt:latest-with-influxdb
22+
docker run --rm -e TZ=Europe/Berlin -e E3DC_IP=<IP> -e E3DC_USER=<your user> -e E3DC_PASSWORD=<your password> -e E3DC_AES_PASSWORD=<your AES password> -e MQTT_HOST=<MQTT broker> -e ENABLE_INFLUXDB=true -e INFLUXDB_HOST=<host name> -e INFLUXDB_VERSION=1 -e INFLUXDB_1_DB=<db name> pvtom/rscp2mqtt:latest-with-influxdb
2323
2424
# or with .config
2525
docker run -e TZ=Europe/Berlin --rm -v /path/to/your/.config:/opt/rscp2mqtt/.config pvtom/rscp2mqtt:latest-with-influxdb

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ or to show the help page
130130
If everything works properly, you will see something like this:
131131

132132
```
133-
rscp2mqtt [3.38]
133+
rscp2mqtt [3.39]
134134
E3DC system >192.168.178.111:5033< user: >your E3DC user<
135135
MQTT broker >localhost:1883< qos = >0< retain = >✗< tls >✗< client id >✗< prefix >e3dc<
136136
Requesting PVI ✓ | PM (0) | DCB ✓ (1 battery string) | Wallbox ✗ | Interval 2 | Autorefresh ✓ | Raw data ✗ | Logging OFF

RELEASE.md

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

3+
### Release v3.39 (11.10.2025)
4+
5+
Features:
6+
- Pull request #113
7+
- Issue #111: New topics e3dc/wallbox/auto_phase_switch and e3dc/set/wallbox/auto_phase_switch
8+
- Issue #116: .config can be edited by a Windows Editor (CR/LF) now
9+
310
### Release v3.38 (06.07.2025)
411

512
Features:

RscpMqttMain.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <regex>
2323
#include <mutex>
2424

25-
#define RSCP2MQTT_VERSION "3.38"
25+
#define RSCP2MQTT_VERSION "3.39"
2626

2727
#define AES_KEY_SIZE 32
2828
#define AES_BLOCK_SIZE 32
@@ -1822,6 +1822,7 @@ void createRequest(SRscpFrameBuffer * frameBuffer) {
18221822
protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_ACTIVE_PHASES);
18231823
protocol.appendValue(&WBContainer, TAG_WB_REQ_EXTERN_DATA_ALG);
18241824
protocol.appendValue(&WBContainer, TAG_WB_REQ_NUMBER_PHASES);
1825+
protocol.appendValue(&WBContainer, TAG_WB_REQ_AUTO_PHASE_SWITCH_ENABLED); // Issue #111
18251826
protocol.appendValue(&WBContainer, TAG_WB_REQ_KEY_STATE);
18261827
protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_POWER_L1);
18271828
protocol.appendValue(&WBContainer, TAG_WB_REQ_PM_POWER_L2);
@@ -3059,7 +3060,7 @@ int main(int argc, char *argv[], char *envp[]) {
30593060
if (skip) continue;
30603061
memset(key, 0, sizeof(key));
30613062
memset(value, 0, sizeof(value));
3062-
if (sscanf(line, "%127[^ \t=]=%127[^\n]", key, value) == 2) {
3063+
if (sscanf(line, "%127[^ \t=]=%127[^\r^\n]", key, value) == 2) { // Issue #116 accept Windows format as well
30633064
if (strcasecmp(key, "E3DC_IP") == 0)
30643065
strcpy(cfg.e3dc_ip, value);
30653066
else if (strcasecmp(key, "E3DC_PORT") == 0)
@@ -3434,7 +3435,11 @@ int main(int argc, char *argv[], char *envp[]) {
34343435
addSetTopic(TAG_WB_REQ_DATA, TAG_WB_REQ_SET_MIN_CHARGE_CURRENT, c, topic, (char *)"^[0-9]{1,2}$", (char *)"", (char *)"", (char *)"", RSCP::eTypeUChar8, false);
34353436

34363437
sprintf(topic, "set/wallbox/%d/number_phases", c + 1);
3437-
addSetTopic(TAG_WB_REQ_DATA, TAG_WB_REQ_SET_NUMBER_PHASES, c, topic, (char *)"^1|3$", (char *)"", (char *)"", (char *)"", RSCP::eTypeUChar8, true);
3438+
addSetTopic(TAG_WB_REQ_DATA, TAG_WB_REQ_SET_NUMBER_PHASES, c, topic, (char *)"^1|3$", (char *)"", (char *)"", (char *)"", RSCP::eTypeUChar8, false);
3439+
3440+
// Issue #111
3441+
sprintf(topic, "set/wallbox/%d/auto_phase_switch", c + 1);
3442+
addSetTopic(TAG_WB_REQ_DATA, TAG_WB_REQ_SET_AUTO_PHASE_SWITCH_ENABLED, c, topic, (char *)"^true|on|1$", (char *)"true", (char *)"^false|off|0$", (char *)"false", RSCP::eTypeBool, true);
34383443
}
34393444
}
34403445

RscpMqttMapping.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ cache_t templates[] = {
495495
{ TAG_WB_DATA, TAG_WB_PM_ACTIVE_PHASES, 0, "%s/phases/L2", "", F_AUTO, UNIT_NONE, 1, 2, false, false, false, false, false },
496496
{ TAG_WB_DATA, TAG_WB_PM_ACTIVE_PHASES, 0, "%s/phases/L3", "", F_AUTO, UNIT_NONE, 1, 4, false, false, false, false, false },
497497
{ TAG_WB_DATA, TAG_WB_NUMBER_PHASES, 0, "%s/number_phases", "", F_AUTO, UNIT_NONE, 1, 0, false, false, false, false, false },
498+
{ TAG_WB_DATA, TAG_WB_AUTO_PHASE_SWITCH_ENABLED, 0, "%s/auto_phase_switch", "", F_AUTO, UNIT_NONE, 1, 0, false, false, false, false, false }, // Issue #111
498499
{ TAG_WB_DATA, TAG_WB_MIN_CHARGE_CURRENT, 0, "%s/min_current", "", F_AUTO, UNIT_A, 1, 0, false, false, false, false, false }, // Issue #84
499500
{ TAG_WB_DATA, TAG_WB_SOC, 0, "%s/soc", "", F_AUTO, UNIT_PERCENT, 1, 0, false, false, false, false, false },
500501
{ TAG_WB_DATA, TAG_WB_KEY_STATE, 0, "%s/key_state", "", F_AUTO, UNIT_NONE, 1, 1, false, false, false, false, false },
@@ -556,6 +557,7 @@ rec_cache_t rec_cache[] = {
556557
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, 0, "set/wallbox/suspended", "^true|on|1$", "1", "^false|off|0$", "0", "", UNIT_NONE, RSCP::eTypeBool, 0, false, true },
557558
{ TAG_WB_REQ_DATA, TAG_WB_EXTERN_DATA, 0, "set/wallbox/max_current", "^[0-9]{1,2}$", "", "", "", "", UNIT_A, RSCP::eTypeUChar8, 0, false, true },
558559
{ TAG_WB_REQ_DATA, TAG_WB_REQ_SET_NUMBER_PHASES, 0, "set/wallbox/number_phases", "^1|3$", "", "", "", "", UNIT_NONE, RSCP::eTypeUChar8, 0, false, true },
560+
{ TAG_WB_REQ_DATA, TAG_WB_REQ_SET_AUTO_PHASE_SWITCH_ENABLED, 0, "set/wallbox/auto_phase_switch", "^true|on|1$", "true", "^false|off|0$", "false", "", UNIT_NONE, RSCP::eTypeBool, 0, false, true }, // Issue #111
559561
{ TAG_WB_REQ_DATA, TAG_WB_REQ_SET_MIN_CHARGE_CURRENT, 0, "set/wallbox/min_current", "^[0-9]{1,2}$", "", "", "", "", UNIT_A, RSCP::eTypeUChar8, 0, false, true }, // Issue #84
560562
{ 0, 0, 0, "set/requests/pm", "^true|on|1$", "true", "^false|off|0$", "false", "", UNIT_NONE, RSCP::eTypeBool, 0, false, true },
561563
{ 0, 0, 0, "set/requests/pvi", "^true|on|1$", "true", "^false|off|0$", "false", "", UNIT_NONE, RSCP::eTypeBool, 0, false, true },

TOPICS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ All topics are listed with the default prefix "e3dc".
256256
| Wallbox Phases **** | e3dc/wallbox/phases/L2 | (true/false) |
257257
| Wallbox Phases **** | e3dc/wallbox/phases/L3 | (true/false) |
258258
| Wallbox Phases **** | e3dc/wallbox/number_phases | (1/3) |
259+
| Wallbox Phases **** | e3dc/wallbox/auto_phase_switch | (true/false) |
259260
| Wallbox Plugged **** | e3dc/wallbox/plugged | (true/false) |
260261
| Wallbox Power All | e3dc/wallbox/solar/power | [W] |
261262
| Wallbox Power Solar | e3dc/wallbox/total/power | [W] |
@@ -360,6 +361,7 @@ Please find detailled information and examples in the [README](README.md).
360361
| Set battery discharge until [%] | e3dc/set/wallbox/discharge_battery_until | [%] |
361362
| Set disable charging battery at mix mode | e3dc/set/wallbox/disable_battery_at_mix_mode | (true/false) |
362363
| Set number of phases | e3dc/set/wallbox/number_phases | (1/3) |
364+
| Set auto phase switch | e3dc/set/wallbox/auto_phase_switch | (true/false) |
363365
| Historical daily data | | |
364366
| Query data for a specific day | e3dc/set/request/day | "2023-12-31" |
365367
| Settings and others | | |

WALLBOX.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ The following topics are sent to the MQTT broker:
5050
| Wallbox Phases * | e3dc/wallbox/phases/L1 | (true/false) |
5151
| Wallbox Phases * | e3dc/wallbox/phases/L2 | (true/false) |
5252
| Wallbox Phases * | e3dc/wallbox/phases/L3 | (true/false) |
53-
| Wallbox Phases * | e3dc/wallbox/number_phases | |
53+
| Wallbox Phases * | e3dc/wallbox/number_phases | (1/3) |
54+
| Wallbox Phases * | e3dc/wallbox/auto_phase_switch | (true/false) |
5455
| Wallbox Plugged * | e3dc/wallbox/plugged | (true/false) |
5556
| Wallbox Power All | e3dc/wallbox/solar/power | [W] |
5657
| Wallbox Power Solar | e3dc/wallbox/total/power | [W] |
@@ -134,6 +135,17 @@ mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/2/number_phases" -m 1 #
134135
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/8/number_phases" -m 1 # for the eighth wallbox
135136
```
136137

138+
Set auto phase switch (true/1/false/0)
139+
```
140+
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/auto_phase_switch" -m true
141+
#
142+
# or if more than one wallbox is available
143+
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/1/auto_phase_switch" -m true # for the first wallbox
144+
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/2/auto_phase_switch" -m true # for the second wallbox
145+
# ...
146+
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/wallbox/8/auto_phase_switch" -m true # for the eighth wallbox
147+
```
148+
137149
The following settings apply to all available wallboxes:
138150

139151
Set battery to car mode (true/1/false/0)

0 commit comments

Comments
 (0)