Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
efbff03
DS2438 added
SurfGargano Aug 20, 2024
e0a8347
add release files
SurfGargano Aug 20, 2024
9b63c0f
1.4.0
SurfGargano Aug 21, 2024
f88c103
1.4.1
SurfGargano Sep 17, 2024
f5f0a37
V1.4.2 WTH
SurfGargano Sep 26, 2024
83bd3d8
1.4.2
SurfGargano Sep 28, 2024
5dad069
Add Firmware file
SurfGargano Sep 28, 2024
14fa3f9
Add partitions.bin
SurfGargano Sep 28, 2024
9c6ff7a
Baudrate for boot0 now 28800 BD
SurfGargano Sep 30, 2024
ede9fae
- STM : Boot0 ota : reduce Baudrate by div 2 if init failed. R…
SurfGargano Oct 23, 2024
a535b7f
V1.4.4
SurfGargano Nov 10, 2024
e748036
small bugfix in webui
SurfGargano Nov 10, 2024
e2686cf
V1.4.5
SurfGargano Dec 3, 2024
ad65184
1.4.6
SurfGargano Dec 9, 2024
a5940f0
Update README.md
SurfGargano Dec 10, 2024
6c3261d
Update README.md
SurfGargano Dec 10, 2024
49e2903
## [1.4.7]
SurfGargano Dec 23, 2024
56e4c9b
Bin Files added
SurfGargano Dec 23, 2024
dafbc95
Merge branch 'Lenti84:developer' into developer
SurfGargano Dec 23, 2024
7afcec8
Merge branch 'developer' of github.com:SurfGargano/VdMot_Controller i…
SurfGargano Dec 23, 2024
40faa0b
Create FUNDING.yml
SurfGargano Dec 31, 2024
b095bde
Bugfix #136 (Lenti84)
SurfGargano Jan 5, 2025
bcc5372
esp:
SurfGargano Jan 10, 2025
b268c94
V1.4.8
SurfGargano Jan 10, 2025
2e479d0
ESP32 : MQtt command_topic+"/value" added in HA Discovery
SurfGargano Jan 28, 2025
e694c99
save without set motor to last %
SurfGargano Jan 29, 2025
640f074
Bugfix motor.cpp : valves disappears after calibration
SurfGargano Jan 31, 2025
cde01ea
V1.4.9
SurfGargano Jan 31, 2025
8d18edb
stm failed added
SurfGargano Feb 6, 2025
0a51b25
## [1.4.10]
SurfGargano Mar 15, 2025
eb8b106
Bin File added
SurfGargano Mar 15, 2025
e76ebe9
Merge branch 'master' of github.com:SurfGargano/VdMot_Controller
SurfGargano Mar 17, 2025
e8e55e4
Read.me corrected
SurfGargano Mar 17, 2025
e121d00
Include hardware details and contact in README
SurfGargano Jan 31, 2026
3de2a5b
Bugfix stmApp.cpp : double idx++ skips half of 1-Wire sensors
hubertciebiada May 8, 2026
55cb002
Merge pull request #5 from hubertciebiada/fix/sensor-list-parser-doub…
SurfGargano Jun 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: ['https://www.paypal.com/paypalme/wernerdungspaypal']
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ For details please see [software.md](./software.md)
- temperature sensors
- optional: integrated control algorithm
- OTA software update (of ESP32 and STM32)
-
Latest Software can be found here :
https://github.com/SurfGargano/VdMot_Controller/releases/latest

Hardware can be found here:
**Hardware for VdMot_Controller is available via mail. Please write to vdmot@storbecknet.de. **


## License
This project is licensed under the terms of the GNU General Public License v3.0 license.
Binary file removed releases/STM32/1.2.0_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.2.2_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.2.2_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.0_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.0_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.2_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.2_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.3_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.3_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.4_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.4_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.6_Dev/STM32F411_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.6_Dev/STM32F411_C2_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.6_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file removed releases/STM32/1.3.6_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added releases/STM32/1.4.8_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file added releases/STM32/1.4.8_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added releases/STM32/1.4.9_Dev/STM32_C1_firmware.bin
Binary file not shown.
Binary file added releases/STM32/1.4.9_Dev/STM32_C2_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.2.0_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.2.1_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.2.2_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.2.3_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.2.4_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.2.5_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.3.0_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.3.2_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.3.3_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.3.4_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.3.6_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file removed releases/WTH32/1.3.7_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.0_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.10_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.1_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.2_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.3_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.4_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.6_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.7_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.8_Dev/ESP32_firmware.bin
Binary file not shown.
Binary file added releases/WTH32/1.4.9_Dev/ESP32_firmware.bin
Binary file not shown.
74 changes: 74 additions & 0 deletions software_esp32/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,80 @@ All notable changes to this project will be documented in this file.

## [Unreleased] - Development

## [1.4.10]
### Added
- Webui : Show information if stm failed
- PI Control : deadband added
### Fixed
- Mqtt : reconnect mqtt if control setup is saved to subscribe topics again
- SNTP : connection improved

## [1.4.9]
### Added
- HA discovery : temperature_state_topic added

## [1.4.8]
### Fixed
- Webui : if stm32 is not responding after reset an error message is displayed in config and config save button is enabled again
- Webui : manual set valve button on status page was not displayed after login.
- update : if the file-end is 256 byte aligned a verify error occurs during update stm after flashing
### Changed
- Webui : display all temp sensors on status page if 'publish all temps' is enabled
### Added
- Pi Control : actual pi control values will be saved in rtc ram and
reloaded after reset by SW (will take by update or reboot with SW, not when power off/on or hardware reset)
- Webui : more in state info during calibration

## [1.4.7]
### Changed
- Webui : handling for login to save login parameters in browser password manager
- Webui : display temp sensor name on status page in temp1 and temp2
### Added
- WebUI : logout button


## [1.4.6]
### Changed
- Mqtt : bugfix in topic generation
- Webui : disable config save button while loading
- Temp : Index of temp offset in config was wrong

### Added
- Mqtt : publish min/max for valve control
- Discovery : topics for temp and volt sensors corrected
- WebUI : hover on table line -> orange

## [1.4.4]
### Added
- Mqtt : publish ip added
send initial value for valve/control/mode after boot.
Discovery of 0.5 degree step with climate
- Control : Initial value for target temperature after boot
- Config : Increase email config to 64 chars

## [1.4.3]
### Added
- STM : Boot0 ota : reduce Baudrate by div 2 if init failed. Retry 2 times
- Mqtt : discovery: climate and valve added
- Mqtt : tValue and tTarget will be resend by VDMot if received from a server and differs from the last one.
(Only if strict seperate topics is enabled)

## [1.4.2]
### Changed
- Mqtt : discovery: if valve name und temp name is empty then the idx-number is set as name
delete last topics (user can avtivate) in HA prior sending new discovery
### Added
- STM : check for compatibility to WTH32 version

## [1.4.1]
### Changed
- Mqtt : blanks in valve name und temp name allowed
### Added
- Mqtt : discovery for home assistant

## [1.4.0]
### Changed
- System : add DS2438 for voltage sensors

## [1.3.7]
### Changed
Expand Down
Binary file added software_esp32/ESP32_firmware_test_Boot0.bin
Binary file not shown.
14 changes: 10 additions & 4 deletions software_esp32/include/PIControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
#define windowActionOpen 2
#define windowActionClose 3

#define piControlDynamicKi 0
#define piControlStaticKi 1


enum CHECKACTION {nothing,gotoMin,gotoPark,control};
enum WINDOWSTATE {windowIdle,windowOpenLock,windowCloseRestore};
Expand All @@ -80,7 +83,10 @@ class CPiControl: public Executable
void exec() override {
controlValve();
}
double getpProp(float e);
float piCtrl(float target,float value);
void savePiControl();
void reloadPiControl();
void updateControllerGains(float observedError);
uint8_t calcValve();
void controlValve();
Expand Down Expand Up @@ -109,15 +115,15 @@ class CPiControl: public Executable
uint8_t windowOpenTarget;
bool controlActive;
bool failed;
float esum;
double esum;
double old_esum;
bool start;
private:
void doControlValve();
CHECKACTION checkAction(uint8_t idx);

float iProp;
double iProp;
time_t ts;
bool start;

uint8_t lastControlPosition;
};

Expand Down
22 changes: 22 additions & 0 deletions software_esp32/include/RtcRam.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#pragma once

#include "globals.h"

#define RTC_RAM_PATTERN "RTCPattern001"

typedef struct {
char pattern[15];
float target;
float value;
float iProp;
float esum;
float lastControlPosition;
} PI_CONTROL_RTC;

typedef struct {
PI_CONTROL_RTC piControlRtc[ACTUATOR_COUNT];
} PI_CONTROL_RTCS;


extern RTC_NOINIT_ATTR int readingCnt;
extern RTC_NOINIT_ATTR PI_CONTROL_RTCS piControlRtcs;
2 changes: 1 addition & 1 deletion software_esp32/include/Services.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class CServices
void checkDS18();
void valvesSetLearn();
void checkGetNtp();

void GetLastTargetValues();
bool serviceValvesStarted;
private:
TEMPSTATES tempStates[TEMP_SENSORS_COUNT];
Expand Down
55 changes: 47 additions & 8 deletions software_esp32/include/VdmConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@

#define pinSetFactoryCfg 2

enum protType {protTypeNone=0,protTypeMqtt=1};
enum protType {protTypeNone=0,protTypeMqtt=1,protTypeMqttHA=2};

#define allowHeatingCooling 0
#define allowHeating 1
#define allowCooling 2

enum numFormat {numFormatIntl=0,numFormatGer=1};

typedef struct {
uint8_t eth_wifi;
bool dhcpEnabled;
Expand Down Expand Up @@ -97,6 +99,7 @@ typedef struct {
typedef struct {
uint8_t timeoutTSActive : 1 ;
uint8_t timeoutDSActive : 1 ;
uint8_t numFormat : 1 ;
} VDM_PROTOCOL_MQTT_CONFIG_FLAGS;


Expand All @@ -108,7 +111,7 @@ typedef struct {


typedef struct {
uint8_t dataProtocol; // 0 = no protocol , 1 = mqtt
uint8_t dataProtocol; // 0 = no protocol , 1 = mqtt, 2 = mqtt HA
uint32_t brokerIp;
uint16_t brokerPort;
uint32_t brokerInterval;
Expand Down Expand Up @@ -157,19 +160,29 @@ typedef struct {
} VDM_VALVE_CONTROL_CONFIG;

typedef struct {
float alpha;
} VDM_VALVE_CONTROL_CONFIG_ALPHA;
float tTarget;
} VDM_VALVE_CONTROL_INIT;

typedef struct {
uint8_t usePrediction : 1;
} VDM_VALVES_CONTROL_CONFIG_FLAGS;
float alpha;
float beta;
float deadband;
} VDM_VALVE_CONTROL1_CONFIG;

typedef struct {
VDM_VALVE_CONTROL_CONFIG valveControlConfig[ACTUATOR_COUNT];
uint8_t heatControl;
uint8_t parkingPosition;
} VDM_VALVES_CONTROL_CONFIG;

typedef struct {
VDM_VALVE_CONTROL1_CONFIG valveControl1Config[ACTUATOR_COUNT];
} VDM_VALVES_CONTROL1_CONFIG;

typedef struct {
VDM_VALVE_CONTROL_INIT valveControlInit[ACTUATOR_COUNT];
} VDM_VALVES_CONTROL_INIT;


typedef struct {
char name[11];
Expand All @@ -182,6 +195,25 @@ typedef struct {
VDM_TEMP_CONFIG tempConfig[TEMP_SENSORS_COUNT];
} VDM_TEMPS_CONFIG;

typedef struct {
char name[11];
bool active;
float offset;
float factor;
char unit[9];
char ID[25];
} VDM_VOLT_CONFIG;

typedef struct {
uint8_t avType;
uint16_t noOfAv;
} VDM_VOLT_AV_CONFIG;

typedef struct {
VDM_VOLT_CONFIG voltConfig[VOLT_SENSORS_COUNT];
VDM_VOLT_AV_CONFIG voltAVConfig[VOLT_SENSORS_COUNT];
} VDM_VOLTS_CONFIG;

typedef struct {
uint8_t pushOver : 1 ;
uint8_t email : 1 ;
Expand Down Expand Up @@ -232,10 +264,13 @@ typedef struct
VDM_PROTOCOL_CONFIG protConfig;
VDM_VALVES_CONFIG valvesConfig;
VDM_TEMPS_CONFIG tempsConfig;
VDM_VOLTS_CONFIG voltsConfig;
VDM_SYSTEM_CONFIG systemConfig;
VDM_VALVES_CONTROL_CONFIG valvesControlConfig;
VDM_SYSTEM_TIME_ZONE_CONFIG timeZoneConfig;
VDM_MSG_CONFIG messengerConfig;
VDM_VALVES_CONTROL_INIT valvesControlInit;
VDM_VALVES_CONTROL1_CONFIG valvesControl1Config;
} CONFIG_FLASH;

typedef struct {
Expand Down Expand Up @@ -288,14 +323,17 @@ typedef struct {
#define nvsValvesControlCfg "valvesCtrlCfg"
#define nvsValves "valves"
#define nvsValvesControl "valvesCtrl"
#define nvsValvesControlAlpha "vCtrlAlpha"
#define nvsValvesControl1 "valvesCtrl1"
#define nvsValvesControlHeatControl "vCtrlHeat"
#define nvsValvesControlParkPos "vCtrlParkPos"
#define nvsValvesControlFlags "vCtrlFlags"
#define nvsValvesControlInit "vCtrlInit"

#define nvsTempsCfg "tempsCfg"
#define nvsTemps "temps"

#define nvsVoltsCfg "voltsCfg"
#define nvsVolts "volts"

#define nvsDayOfCalib "dayOfCalib"
#define nvsHourOfCalib "hourOfCalib"
#define nvsMovCalib "movCalib"
Expand Down Expand Up @@ -345,6 +383,7 @@ class CVdmConfig
void postValvesCfg (JsonObject doc);
void postValvesControlCfg (JsonObject doc);
void postTempsCfg (JsonObject doc);
void postVoltsCfg (JsonObject doc);
void postSysCfg (JsonObject doc);
void postMessengerCfg (JsonObject doc);
String handleAuth (JsonObject doc);
Expand Down
6 changes: 4 additions & 2 deletions software_esp32/include/VdmNet.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@
#include <Syslog.h>
#include <AsyncWebServer_WT32_ETH01.h>

#define noneProtocol 0
#define mqttProtocol 1
#define noneProtocol 0
#define mqttProtocol 1
#define mqttProtocolHA 2

#define interfaceAuto 0
#define interfaceEth 1
Expand Down Expand Up @@ -103,6 +104,7 @@ class CVdmNet
void startBroker();
void mqttBroker();
void startSysLog();
void configTzTime(const char* tz, const char* server1, const char* server2=NULL, const char* server3=NULL);
bool checkSntpReachable();

TWifiState wifiState;
Expand Down
21 changes: 18 additions & 3 deletions software_esp32/include/VdmSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@
#include "VdmConfig.h"
#include "esp_system.h"
#include "helper.h"
#include <FS.h>
#include <CRC32.h>
#include <LittleFS.h>

#define systemMsgSTMReset "stm not working. reset stm"
#define systemMsgReset "reset system"
#define systemMsgReset "reset system by "
#define FS_READ_MODE 'r'
#define FS_WRITE_MODE 'w'

#define systemStateOK 0
#define systemStateInfo 1
Expand All @@ -62,7 +67,6 @@ typedef struct
String fsize;
} fileinfo;


class CVdmSystem
{
public:
Expand All @@ -80,20 +84,31 @@ class CVdmSystem
bool getLocalTime(struct tm * info);
String getLastResetReason();
void sendResetReason();
void openFile (String fName,char mode);
void writelnToFile (String line);
String readlnFromFile ();
int fileAvailable ();
void closeFile ();

esp_chip_info_t chip_info;
fileinfo Filenames[maxFiles]; // Enough for most purposes!
uint8_t numfiles;
String stmVersion;
uint32_t stmNRevision;
uint32_t stmMinRequired;
bool stmVersionFalse;
uint32_t stmID;
time_t stmBuild;
uint8_t systemState;
String systemMessage;
bool getFSInProgress;
uint32_t stackSize;


private:
bool spiffsStarted;

File dir;
File fsfile;
};

extern CVdmSystem VdmSystem;
Loading