{"id":23381040,"url":"https://github.com/raibisch/esp32_abl","last_synced_at":"2025-10-11T02:44:41.334Z","repository":{"id":208116139,"uuid":"720847409","full_name":"raibisch/ESP32_ABL","owner":"raibisch","description":" Monitor and control your ABL-Wallbox with an WEB-Application and integrate it in your homeautomation software with simple REST-Interface ","archived":false,"fork":false,"pushed_at":"2025-05-07T08:27:27.000Z","size":3665,"stargazers_count":14,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-04T22:56:29.910Z","etag":null,"topics":["abl","chargepoint","domoticz-scripts","emh1","modbus","solar-power-charging","wallbox"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raibisch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-19T19:24:09.000Z","updated_at":"2025-05-20T06:39:58.000Z","dependencies_parsed_at":"2023-12-18T17:28:50.146Z","dependency_job_id":"de0cb20a-9c43-4a57-bac8-c2f13f31892d","html_url":"https://github.com/raibisch/ESP32_ABL","commit_stats":null,"previous_names":["raibisch/esp32_abl"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/raibisch/ESP32_ABL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raibisch%2FESP32_ABL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raibisch%2FESP32_ABL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raibisch%2FESP32_ABL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raibisch%2FESP32_ABL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raibisch","download_url":"https://codeload.github.com/raibisch/ESP32_ABL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raibisch%2FESP32_ABL/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267997143,"owners_count":24178245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abl","chargepoint","domoticz-scripts","emh1","modbus","solar-power-charging","wallbox"],"created_at":"2024-12-21T20:38:57.133Z","updated_at":"2025-10-11T02:44:36.281Z","avatar_url":"https://github.com/raibisch.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ABL-Wallbox Web-App\n\n[![License](https://img.shields.io/badge/license-EUPL1.2-green)](https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12)\n\n![Android-App](/pict/ABL_webcont_charging.png)\n\n![Android-App](/pict/ABL_webcont_b2.png) ![Android-App](/pict/ABL_webcont_setIpwm.png) ![Android-App](/pict/ABL_webcont_eventlog.png) ![Android-App](/pict/ABL_webcont_update.png) \n\n## Supported Hardware\n\n- eMH1 11kW ( old version) --\u003e Power calculation with internal current values\n- eMH1 11kW ( \u003e Q2-2021 no internal current sensor)  --\u003e 'virtual' Power calculation\n- eMH1 22kW --\u003e Power calculation with internal current values\n- eMH2 22kW (StandAlone Modus) --\u003e Power calculation with internal current values\n\n## Functions in Web-Interface\n\n- INDEX-Page: display wallbox-status and actual parameter (I-max, kw-charge, kW/h, charging-time)\n- SET-Current: \"Quick-set\" predefined Ipwm values to ABL-Box\n- CONFIG-DATA: set and store parameter and WiFi-credentials and the the \"Quick-Set\" charge-current\n- EVENT-LOG: Serial debug logging\n- UPDATE: over-the-air (Wifi) Software update\n- HISTORY: Set and Store total kW/h sum in internal FLASH\n- INFO: Version, Build, Temp(ESP-intern), IP, Timeout, Charge-Cnt, RSSI\n\n\nMonitor and control your ABL-Wallbox with an WEB-Application and integrate it (optional) in your homeautomation software with simple REST-Interface (see example for DOMOTICZ below) for less than 10€.\n\n## 'Virtual' consumption for ABL-Boxes without phase current sensor\n\nFor (new) ABL-Boxes without internal per phase current sensor, the current could \"pre-measured\" external and defined in the APP-configuration per Imax setting. So it is possible to have a \"poor man's\" power and consumption measurement. If you charge every time the same car, the typical power for a defined Ipwm is near to the real measurement with a current-sensor, but with current sensor there is also an error, because the voltage 'U' for power calulation (P=U*(I1+I2+I2) is not measured. \n\nI get the power from my \"offical\" smartmeter and set them into the config-file.\n\nIf the Box has a current-sensor it was automatic detected and the value is calculated based on the current sum of the 3-phases...For future versions it would be possible to expand the software to get the power or current over the WEB-API from an external meter.\n\n## Manual Charge-Current-Setting\n\nThe user interface was designed very simply to enable manual switching between two charging currents (possible application: ABL-Wallbox-kWh Gesamt\nABL-Wallbox-kWh Gesamtreduced charging current for operation with a PV system).\nThe two values could be individual defined in the 'config-data' page (for external setting use the WEB-API)\n\n## External Charge-Current-Setting and reading values (WEB-API) \n\nWith the WEB-API the state and consumption values of the Wallbox could be monitored and charge-current could be set from 6A up to 16A in external applications like homeautomation software.\n\n### Fetch aktual Values and State\n\n`http:\u003cyour-ip\u003e/fetch`\n\nReceive:\n`8.00,0.00,A1,0.00,103980,00:00:00`\n\ndecoded:\n`\u003cImax [A]\u003e,\u003caktual Power [kW]\u003e,\u003cStatus\u003e,\u003caktual Work [kW/h]\u003e,\u003cSum Work [W/h]\u003e,\u003ccharge-time\u003e`\n\n### Fetch actual Values and State in key=value pair\n\nThis includes the \"Status\" as an Integer Value, too.\n\n`http:\u003cyour-ip\u003e/fetchkv`\n\nReceive:\n```\nImax=16 A \nActPower=11 kW\nStatus=C2\nIntStatus=194\nActWork=0.92 kW/h\nSumWork=2926 W/h\nChargeTime=00:15:02\n```\n\n### Set value Imax\n\n`http:\u003cyour-ip\u003e/fetch?imax=xx` (xx= 6,8,10,12,14,16)\n\n## Home-Assistent Integration\n...see above 'WEB-API' for other external integration (e.g. other homeautomation software)\n\n![HOMEASSI](/pict/homeassi.png)\n\nadd to **configuration.yaml**:\n\n```YAML\nrest:\n    scan_interval: 20\n    resource: http://192.168.2.108/fetch\n    sensor:\n      - name: \"ABL-Wallbox Imax\"\n        unique_id : \"sensor_abl_imax\"\n        icon: \"mdi:ev-station\"\n        value_template: '{{value.split(\",\")[0]}}'\n        unit_of_measurement: \"A\"\n        device_class: current\n\n      - name: \"ABL-Wallbox kw\"\n        unique_id : \"sensor_abl_kw\"\n        icon: \"mdi:ev-station\"\n        value_template: '{{value.split(\",\")[1]}}'\n        unit_of_measurement: \"kW\"\n        device_class: power\n\n      - name: \"ABL-Wallbox-Status\"\n        unique_id : \"sensor_abl_status\"\n        icon: \"mdi:ev-station\"\n        value_template: '{{value.split(\",\")[2]}}'\n      \n      - name: \"ABL-Wallbox-kWh akt.\"\n        unique_id : \"sensor_abl_kwhakt\"\n        icon: \"mdi:ev-station\"\n        value_template: '{{float(value.split(\",\")[3])/1000}}'\n        unit_of_measurement: kWh\n        device_class: energy\n     \n      - name: \"ABL-Wallbox-kWh Gesamt\"\n        unique_id : \"sensor_abl_kwhsum\"\n        icon: \"mdi:ev-station\"\n        value_template: '{{float(value.split(\",\")[4])/1000}}'\n        unit_of_measurement: kWh\n        device_class: energy\n        state_class: total\n\nrest_command:\n  abl_set_imax_6a:\n    url: \"http://192.168.2.108/fetch?imax=6\"\n    method: GET\n  abl_set_imax_16a:\n    url: \"http://192.168.2.108/fetch?imax=16\"\n    method: GET\n```\n\n## Domoticz Integration\n\n...see above 'WEB-API' for other external integration (e.g. other homeautomation software)\n![Domoticz](/pict/domoticz.png)\n\n#### Domoticz Configuration\n![Domoticzpoller](/pict/domoticz_poller.png)\n\nLUA polling script for Domoticz (ablpoller.lua)\n\n```LUA\n-- Polling of ABL-Web-App\n--\n-- This function split a string according to a defined separator\n-- Entries are returned into an associative array with key values 1,2,3,4,5,6...\nlocal function split(str, sep)\n if sep == nil then\n  sep = \"%s\"\n end\n local t={} ; i=1\n local regex = string.format(\"([^%s]+)\", sep)\n  for str in str:gmatch(regex) do\n   t[i] = str\n   i = i + 1\n  end\n return t\nend\n\n-- Retrieve the request content\ns = request['content'];\n\nprint(\"ABL-Wallbox-Poller:\"..s);\n-- Split the content into an array of values\nlocal values = split(s, \",\");\n\n-- Update devices \n-- ACHTUNG: Index beginnt in LUA mit 1\n\n--                    xx  mit aktueller IDX anpassen\n--                    vv\ndomoticz_updateDevice(63,'',values[1]) -- Imax\ndomoticz_updateDevice(65,'',tonumber(values[2])*1000) -- Watt !!\ndomoticz_updateDevice(62,'ABL-Status',values[3]) -- Status-String\ndomoticz_updateDevice(66,'',values[4]) -- kW/h\ndomoticz_updateDevice(67,'',values[5]) -- W/h SUM\n```\n\n## Hardware\n\nThis example is realised with an 'ESP32-S2 mini' board and an 'MAX485 TTL to RS485' Converter. \nThe Olimex ESP32-POE has integrated Ethernet, supports Power over Ethernet and has a 5V/GND output for powering the \"MAX485 TTL to RS485\" Converter.\nYou need to build the ESP firmware by yourself with platformIO.\nHave a look at the platformio.ini and adjust as you need it. \nAdditionally, have a look a the GPIO PINs as specified here: https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/resources/ESP32-POE-GPIO.png\n...but any other ESP-Board could be used with small modifications in the code and platformio.ini.\n\n![Fritzing](/pict/esp32_abl_fritzing.png) ![prototype](/pict/platine_prototype.jpg) \n(board is cut to fit in a DIN hat rail case)\n\n## Helpful Infos and links and investigations (most in german)\n\n### Software\n\nmy shared investigations and notes:\n[my-doc](/doc/knowhow.txt)\n\n...others sources\nhttps://github.com/ThKls/Wallbox-Test\n\nhttps://www.goingelectric.de/forum/viewtopic.php?f=34\u0026t=38749\u0026start=60\n\nhttps://www.goingelectric.de/forum/viewtopic.php?p=1550459#\n\n### Hardware\n\n![prototype](/pict/ABL_Modbus_Connector.jpg)\nconnect RS485 to Pin1 (=A) and Pin2 (=B) of left RJ45-Connector in Wallbox\nthe termination Jumper may be optional (worked for me with and without)\n...more infos:\nhttps://github.com/evcc-io/evcc/discussions/2801\n\n## Licence\n\n[Licensed under the European Union Public License (EUPL)-1.2-or-later](https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12)\n\n[Why licensed under EUPL-1.2: it is compatible to GPL and compatible to EU-rights and regulations](https://joinup.ec.europa.eu/collection/eupl/join-eupl-licensing-community)\n\n## Download and Installation\n\n* To download click the DOWNLOAD ZIP button, rename the uncompressed folder 'ESP32_ABL'\n...or clone it with git \n\n### PlatformIO and Arduino-IDE\n\nProjekt was build and testet with PlatformIO.\n\nTake care to upload the 'data' folder to the SPIFFS filesystem \nsee: https://randomnerdtutorials.com/esp32-vs-code-platformio-spiffs/\n\nWith the following two command you can create and upload the SPIFFS image:\n\n```\npio run --target buildfs\npio run --target uploadfs\n```\n\n### Flash Program (without PlatformIO or Arduino-IDE)\n\nIf you do not want to compile the program from source:\n\nfor the ESP32-S2 mini board I supply the actual firmware-version\n- got to subfolder `firmware/lolin_s2_mini/V1_2`\n\n- put ESP32-S2 board to flash-mode: \n- disconnect USB then press and hold \"0\"-button\n- reconnect USB hold \"0\"-button\n- then release \"0\"-button\n--\u003e now the board is in program-mode\n\n- run `flash.sh` (for Linux) or `flash.bat` (for Windows)\n(needs 'esptool.py') --\u003e ask google\n\n- after flashing reset or disconnect USB\n- search WIFI connetions for \"ABLWALLBOX\"\n- connect (without password) \n- start your webbrowser at \"192.168.4.1\" (this is the startpage for the APP)\n  to connect to your home-route navigate to \"Setup\" --\u003e \"Config-Data\" and change:\n\n```config\nvarWIFI_s_Mode=STA; \nvarWIFI_s_Password=mypassword;\nvarWIFI_s_SSID=myrouter;\n```\n\n## Version History\nV1.0 initial version, first test with real charging car (VW ID.3) \n\nV1.1 ABL-Box without internal current-sensor: calculate power and consumption from premeasured config-values. \n\nV 1.2 index-page redesign, fixes for kW/h-calculation, fetch kW/h sum, Info-page, display chargetime, bugfixes.\n\nV1.2.2 Bugfix for 'virtual kW/h-calculation' and Modbus timeouts\n\n## Ideas:\n- MQTT-client \n- get actual Power [kW] and Work [kW/h] from external meter\n- get actual current from current sensor and calulate Power and Work\n- store more history data (last charging data)\n- get history-time from ntp (could work only in 'STA' network mode)\n\n\n## other extentions:\n- add Ethernet port to esp32\nhttps://www.roboter-bausatz.de/p/wt32-eth01-esp32-modul-mit-ethernet-bluetooth-wifi\nhttps://mischianti.org/esp32-ethernet-w5500-with-plain-http-and-ssl-https/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraibisch%2Fesp32_abl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraibisch%2Fesp32_abl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraibisch%2Fesp32_abl/lists"}