raibisch / esp32_abl Goto Github PK
View Code? Open in Web Editor NEWMonitor and control your ABL-Wallbox with an WEB-Application and integrate it in your homeautomation software with simple REST-Interface
Monitor and control your ABL-Wallbox with an WEB-Application and integrate it in your homeautomation software with simple REST-Interface
there is still an error at the "Sum kW/h" calculation
(adds the actual value at every update)
Since you have investigated this a bit already, and The know how doc is in german, is it possible to comunicate with the emh1 with hex commands or is it just ascii?
Thanks. Very nice project. My EMH1 will arrive in some days and hopefully I can usw this small addition.
You asked if MQTT would be nice: yes. Greatest way to set and get variables with standard API for home automation systems. Additionally, it would help to store the really messured consumption from your smart meter. I will use a SDM72 but for me it is not necessary to have this data on this project as it is only used to control the Wallbox itself and get the Wallbox values to my home automation system.
I want to use Ethernet instead of WiFi. Does this work?
Additionally, as the board is pretty small and only a rs485 connection to the Wallbox is necessary, it would be pretty nice to put the esp/board components in the Wallbox itself.
After cloning the repository, I got some warnings from my static code analysis tool.
Condition 'c<10' is always true
https://github.com/raibisch/ESP32_ABL/blob/cec06e7eee2dffd9ad4f0c2f3d8dc64ca6c6832a/src/main.cpp#L218C9-L218C9
Running just the function confirms this. I had to change it to string
for my compiler. The following code behaves just like the original:
string uint64ToString(uint64_t input)
{
string result = "";
uint8_t base = 10;
do
{
char c = input % base;
input /= base;
//if (c < 10)
c += '0';
//else
// c += 'A' - 10;
result = c + result;
} while (input);
return result;
}
There is a second occurrence of an always true condition:
Condition 'a=0' is always false
https://github.com/raibisch/ESP32_ABL/blob/main/src/main.cpp#L837
if (request->argName(0) == "imax")
{
forcePolling();
uint a = String(request->arg(i)).toInt();
AsyncWebLog.println("GET-SET-Imax:" + String(a)+ "A");
if ((a >=6 && a <=16) || (a=0))
{
ABL_tx_Ampere = a;
ABL_tx_status = SET_Current; // next Send Protocol
}
else
{
AsyncWebLog.println("**ERROR Imax out of range!");
}
}
Could you please check if a break statement is missing or if this is the expected behaviour?
Variable 'tx' is reassigned a value before the old one has been used. 'break;' missing?
Line 437 in cec06e7
case 14:
tx = String(ABL_TX_SET_14A);
break;
case 15:
tx = String(ABL_TX_SET_15A);
// BREAK?
case 16:
tx = String(ABL_TX_SET_16A);
break;
default:
tx = String(ABL_TX_SET_6A);
break;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.