Skip to content

Commit

Permalink
v3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
pvtom committed Jan 3, 2024
1 parent 00db06d commit 1a3a203
Show file tree
Hide file tree
Showing 9 changed files with 469 additions and 161 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022,2023 Thomas Heiny, Wolfsburg, Germany
Copyright (c) 2022-2024 Thomas Heiny, Wolfsburg, Germany

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ For continuous provision of values, you can configure several topics that are pu
- "set/force" for specific topics
- Battery SOC limiter
- Docker images at https://hub.docker.com/r/pvtom/rscp2mqtt
- (new) [Dashboard](https://github.com/pvtom/rscp2mqtt-dashboard) is available
- (new) Configuration of the topics that will be published to InfluxDB (INFLUXDB_TOPIC)
- (new) MQTT Client ID can be configured
- (new) More detailled [TOPIC](TOPICS.md) overview
- [Dashboard](https://github.com/pvtom/rscp2mqtt-dashboard) is available
- Configuration of the topics that will be published to InfluxDB (INFLUXDB_TOPIC)
- MQTT Client ID can be configured
- More detailled [TOPIC](TOPICS.md) overview
- (new) Multiple battery strings are supported (BATTERY_STRINGS parameter)
- (new) Automatic detection of the number of PVI trackers
- (new) Additional topics

## Docker

Expand Down Expand Up @@ -117,6 +120,10 @@ The configuration parameters are described in the file.

The prefix of the topics can be configured by the attribute PREFIX. By default all topics start with "e3dc". This can be changed to any other string that MQTT accepts as a topic, max. 24 characters. E.g. "s10" or "s10/1".

If your system has more than one battery string (e.g. S10 Pro), you have to configure the parameter BATTERY_STRINGS accordingly.
Battery topics that belong to a battery string are extended by the number of the battery string.
Battery modules (DCB topics) are numbered consecutively.

Find InfluxDB configurations in [InfluxDB](INFLUXDB.md).

The parameter FORCE_PUB can occur several times. You can use it to define topics that will be published in each cycle, even if the values do not change. To check the definition, look at the log output after the program start.
Expand All @@ -135,21 +142,20 @@ or in verbose mode
If everything works properly, you will see something like this:

```
rscp2mqtt [v3.9]
rscp2mqtt [v3.10]
E3DC system >192.168.178.111:5033< user: >your E3DC user<
MQTT broker >localhost:1883< qos = >0< retain = >false< client id >✗< prefix >e3dc<
History year range from 2021 to 2023
Fetching data every second.
Requesting PVI (2 trackers) ✓ PM ✓ DCB Wallbox ✗ Autorefresh ✓
Requesting PVI ✓ | PM ✓ | DCB (1 battery string) ✓ | Wallbox ✗ | Autorefresh ✓
Log level = 0
Stdout to terminal
...
[2023-12-23 12:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(2017) Connecting to server 192.168.178.111:5033
[2023-12-23 12:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(2024) Success: E3DC connected.
[2023-12-23 12:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(1156) RSCP authentication level 10
[2023-12-23 12:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(1638) Connecting to broker localhost:1883
[2023-12-23 12:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(1647) Success: MQTT broker connected.
[2024-01-03 10:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(2185) Connecting to server 192.168.178.111:5033
[2024-01-03 10:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(2192) Success: E3DC connected.
[2024-01-03 10:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(1283) RSCP authentication level 10
[2024-01-03 10:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(1796) Connecting to broker localhost:1883
[2024-01-03 10:00:00] pid=30100 ppid=1 RscpMqttMain.cpp(289) Success: MQTT broker connected.
...
```

Expand Down Expand Up @@ -387,7 +393,7 @@ Log all topics and payloads to the log file
```
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/log" -m 1
```
Set a new refresh interval (1..10 seconds)
Set a new refresh interval (1..300 seconds)
```
mosquitto_pub -h localhost -p 1883 -t "e3dc/set/interval" -m 2
```
Expand Down
6 changes: 6 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Release Notes

### Release v3.10 (03.01.2024)

- Issue #30: Multiple battery strings are supported (e.g. S10 Pro)
- Automatic detection of the number of PVI trackers
- Additional topics

### Release v3.9 (23.12.2023)

- Note: New [Dashboard](https://github.com/pvtom/rscp2mqtt-dashboard) is available
Expand Down
8 changes: 5 additions & 3 deletions RscpMqttConfig.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef RSCP_MQTT_CONFIG_H_
#define RSCP_MQTT_CONFIG_H_

#define MAX_DCB_COUNT 64

typedef struct _config_t {
char e3dc_ip[20];
uint32_t e3dc_port;
Expand All @@ -14,7 +16,6 @@ typedef struct _config_t {
bool mqtt_auth;
int mqtt_qos;
bool mqtt_retain;
bool fix_mqtt_client_id;
char mqtt_client_id[128];
#ifdef INFLUXDB
uint32_t influxdb_version;
Expand All @@ -36,11 +37,12 @@ typedef struct _config_t {
bool verbose;
int interval;
int log_level;
int battery_string;
int battery_strings;
bool pvi_requests;
int pvi_tracker;
int pvi_temp_count;
int bat_dcb_count;
int bat_dcb_count[MAX_DCB_COUNT];
int bat_dcb_start[MAX_DCB_COUNT];
bool pm_extern;
bool pm_requests;
bool dcb_requests;
Expand Down
Loading

0 comments on commit 1a3a203

Please sign in to comment.