GithubHelp home page GithubHelp logo

raibisch / esp32_abl Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 3.55 MB

Monitor and control your ABL-Wallbox with an WEB-Application and integrate it in your homeautomation software with simple REST-Interface

HTML 20.26% CSS 3.99% Lua 1.42% C++ 73.67% Shell 0.37% Batchfile 0.29%
abl modbus wallbox emh1 domoticz-scripts solar-power-charging chargepoint

esp32_abl's People

Contributors

raibisch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

szf2020 sbernhard

esp32_abl's Issues

Ascii or hex

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?

Ethernet connection / MQTT

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.

Check always true conditions

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!");
   }
}

Missing break statement

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?

tx = String(ABL_TX_SET_16A);

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;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.