{"id":20108,"name":"OpenEVSE WiFi gateway","description":"Uses an ESP8266 (ESP-12) which communicates with the OpenEVSE controller via serial utilizing the existing RAPI API serial interface.","url":"https://github.com/OpenEVSE/ESP8266_WiFi_v2.x","last_synced_at":"2026-04-07T17:00:38.391Z","repository":{"id":53594683,"uuid":"83723078","full_name":"OpenEVSE/ESP8266_WiFi_v2.x","owner":"OpenEVSE","description":"ESP8266 WiFi for OpenEVSE Version 2.x","archived":false,"fork":false,"pushed_at":"2025-01-17T14:35:15.000Z","size":10973,"stargazers_count":79,"open_issues_count":22,"forks_count":50,"subscribers_count":36,"default_branch":"master","last_synced_at":"2026-02-24T23:37:24.735Z","etag":null,"topics":["emoncms","esp8266","evse","mqtt-client","openenergymonitor","openevse","wifi"],"latest_commit_sha":null,"homepage":"https://openevse.openenergymonitor.org","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/OpenEVSE.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}},"created_at":"2017-03-02T20:44:50.000Z","updated_at":"2026-02-07T03:36:18.000Z","dependencies_parsed_at":"2025-02-06T22:41:45.175Z","dependency_job_id":null,"html_url":"https://github.com/OpenEVSE/ESP8266_WiFi_v2.x","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/OpenEVSE/ESP8266_WiFi_v2.x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenEVSE","download_url":"https://codeload.github.com/OpenEVSE/ESP8266_WiFi_v2.x/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29874444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T21:05:00.265Z","status":"ssl_error","status_checked_at":"2026-02-26T20:57:13.669Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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"}},"owner":{"login":"OpenEVSE","name":"OpenEVSE","uuid":"14914533","kind":"organization","description":"Open Source Electric Vehicle Charging Station (EVSE)","email":"info@openevse.com","website":"http://www.openevse.com","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/14914533?v=4","repositories_count":7,"last_synced_at":"2023-03-02T06:25:22.736Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/OpenEVSE","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-12T23:59:20.255Z","updated_at":"2023-03-02T06:25:22.769Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenEVSE","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenEVSE/repositories"},"packages":[],"commits":{"id":1254112,"full_name":"OpenEVSE/ESP8266_WiFi_v2.x","default_branch":"master","total_commits":681,"total_committers":17,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":40.05882352941177,"dds":0.5374449339207048,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-05T16:02:28.923Z","last_synced_commit":"8e3163e7b59e7b8a0dff62b79640bb5064810b42","created_at":"2023-03-27T10:58:31.741Z","updated_at":"2026-04-05T16:02:17.831Z","committers":[{"name":"Jeremy Poulter","email":"jeremy@bigjungle.net","login":"jeremypoulter","count":315},{"name":"Glyn Hudson","email":"glyn.hudson@gmail.com","login":"glynhudson","count":229},{"name":"Chris Howell","email":"chris1howell@msn.com","login":"chris1howell","count":61},{"name":"Eric Sandeen","email":"sandeen@sandeen.net","login":"sandeen","count":26},{"name":"joverbee","email":"joverbeeck@outlook.com","login":"joverbee","count":17},{"name":"Eric Sandeen","email":"sandeen@minibox.sandeen.net","login":null,"count":9},{"name":"Sergio Ortiz Crespo","email":"sergiooc@gmail.com","login":"Suriv","count":7},{"name":"Paul Kronenwetter","email":"kronenpj@gmail.com","login":"kronenpj","count":4},{"name":"lincomatic","email":"lincomatic@hotmail.com","login":"lincomatic","count":3},{"name":"Adam Chasen","email":"adam@chasen.name","login":"chaseadam","count":2},{"name":"Gwil Noble","email":"gwil.noble@openenergymonitor.org","login":"SlyRemarks","count":2},{"name":"Trystan Lea","email":"trystan.lea@googlemail.com","login":"TrystanLea","count":1},{"name":"Wren Turkal","email":"wt@penguintechs.org","login":"wt","count":1},{"name":"Yoav Levy","email":"yoav@comediagroup.com","login":"yoavl","count":1},{"name":"moeabm","email":"moeabm@yahoo.com","login":"moeabm","count":1},{"name":"realdesilets47","email":"real@transportsdelson.com","login":"realdesilets47","count":1},{"name":"zymurgic","email":"simon.hewison@zymurgy.org","login":"zymurgic","count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-07T00:00:11.408Z","repositories_count":6211550,"commits_count":918089627,"contributors_count":35587537,"owners_count":1142705,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"OpenEVSE/ESP8266_WiFi_v2.x","html_url":"https://github.com/OpenEVSE/ESP8266_WiFi_v2.x","last_synced_at":"2026-02-28T23:01:01.093Z","status":"error","issues_count":158,"pull_requests_count":113,"avg_time_to_close_issue":16896844.0729927,"avg_time_to_close_pull_request":668568.4054054054,"issues_closed_count":137,"pull_requests_closed_count":111,"pull_request_authors_count":14,"issue_authors_count":45,"avg_comments_per_issue":3.518987341772152,"avg_comments_per_pull_request":2.1946902654867255,"merged_pull_requests_count":102,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":1,"past_year_pull_requests_count":4,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":1049.0,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":2,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":0.5,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":2,"created_at":"2023-05-09T10:37:54.882Z","updated_at":"2026-02-28T23:01:01.093Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenEVSE%2FESP8266_WiFi_v2.x/issues","issue_labels_count":{"enhancement":42,"bug":36,"duplicate":1,"High Priority":1},"pull_request_labels_count":{},"issue_author_associations_count":{"CONTRIBUTOR":74,"NONE":51,"COLLABORATOR":22,"MEMBER":11},"pull_request_author_associations_count":{"COLLABORATOR":65,"CONTRIBUTOR":44,"MEMBER":1,"NONE":1},"issue_authors":{"glynhudson":54,"jeremypoulter":22,"sandeen":13,"chris1howell":6,"jbakuwel":6,"lincomatic":5,"snitkjaer":3,"moeabm":2,"DeltaVetal26":2,"beikeland":2,"Niko-La":2,"ayasystems":2,"cmgj74":2,"joverbee":2,"roy13":2,"nitroushhh":2,"Suriv":2,"colmobri":2,"ebeighe":1,"DrFrankReade":1,"chaseadam":1,"mkfink":1,"adgoudsmit":1,"TonyApuzzo":1,"cecil-t":1,"DIYsunnyday":1,"Orfait":1,"yoavl":1,"samigroup":1,"paulbernardr":1,"davehun":1,"jpalo":1,"shakisha":1,"fab33":1,"martiinezz":1,"ForumLeech":1,"doanerock":1,"ian-hailey":1,"jshank":1,"kallisti5":1,"lzhang10":1,"gfi63":1,"denisfrench":1,"KMacros":1,"ruimarinho":1},"pull_request_authors":{"jeremypoulter":65,"glynhudson":19,"sandeen":8,"Suriv":5,"joverbee":3,"TrystanLea":2,"chaseadam":2,"lincomatic":1,"yoavl":1,"wt":1,"moeabm":1,"realdesilets47":1,"SlyRemarks":1,"zymurgic":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-05T00:00:08.668Z","repositories_count":14089617,"issues_count":34439849,"pull_requests_count":112367015,"authors_count":11226217,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"jeremypoulter","count":87,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/jeremypoulter"},{"login":"lincomatic","count":6,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/lincomatic"},{"login":"chris1howell","count":6,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/chris1howell"}],"active_maintainers":[]},"events":{"total":{"PullRequestEvent":3,"ForkEvent":3,"IssuesEvent":1,"WatchEvent":2,"IssueCommentEvent":1,"PushEvent":1,"PullRequestReviewEvent":1},"last_year":{"ForkEvent":1,"WatchEvent":1}},"keywords":["emoncms","esp8266","evse","mqtt-client","openenergymonitor","openevse","wifi"],"dependencies":[{"ecosystem":"npm","filepath":"simulator/package.json","sha":null,"kind":"manifest","created_at":"2022-09-09T07:10:12.708Z","updated_at":"2022-09-09T07:10:12.708Z","repository_link":"https://github.com/OpenEVSE/ESP8266_WiFi_v2.x/blob/master/simulator/package.json","dependencies":[{"id":4263771605,"package_name":"body-parser","ecosystem":"npm","requirements":"^1.18.2","direct":true,"kind":"runtime","optional":false},{"id":4263771606,"package_name":"express","ecosystem":"npm","requirements":"^4.16.3","direct":true,"kind":"runtime","optional":false},{"id":4263771607,"package_name":"express-ws","ecosystem":"npm","requirements":"^3.0.0","direct":true,"kind":"runtime","optional":false},{"id":4263771608,"package_name":"minimist","ecosystem":"npm","requirements":"^1.2.0","direct":true,"kind":"runtime","optional":false},{"id":4263771609,"package_name":"ws","ecosystem":"npm","requirements":"^4.0.0","direct":true,"kind":"runtime","optional":false},{"id":4263771610,"package_name":"eslint","ecosystem":"npm","requirements":"^4.16.0","direct":true,"kind":"development","optional":false}]}],"score":7.448333860897476,"created_at":"2023-09-11T14:52:09.762Z","updated_at":"2026-04-07T17:00:38.394Z","avatar_url":"https://github.com/OpenEVSE.png","language":"C","category":"Consumption","sub_category":"Mobility and Transportation","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# OpenEVSE WiFi Gateway\n\n**OpenEVSE WiFi V2.x is now archived, the current version is [OpenEVSE V4.x ](https://github.com/openevse/ESP32_WiFi_V4.x), upgrading from V2.x to V4.x requires a [WiFi module hardware upgrade to ESP32](https://shop.openenergymonitor.com/openevse-wifi-gateway/).**\n\n![main](docs/main2.png)\n\nThe WiFi gateway uses an ESP8266 (ESP-12) which communicates with the OpenEVSE controller via serial utilizing the existing RAPI API serial interface. The web interface UI is served directly from the ESP8266 web server and can be controlled via a connected device over the network.\n\nLive demo: https://openevse.openenergymonitor.org\n\n## Features\n\n- Web UI to view \u0026 control all OpenEVSE functions\n  - Start / pause\n  - Delay timer\n  - Time limit\n  - Energy Limit\n  - Adjust charging current\n- MQTT status \u0026 control\n- Log to Emoncms server e.g [data.openevse.org](http://data.openevse.org) or [emoncms.org](https://emoncms.org)\n- 'Eco' mode: automatically adjust charging current based on availability of power from solar PV or grid export\n- OhmConnect integration (California USA only)\n\n## Requirements\n\n### OpenEVSE charging station\n  - Purchase via: [OpenEVSE Store (USA/Canda)](https://store.openevse.com) | [OpenEnergyMonitor (UK / EU)](https://shop.openenergymonitor.com/openevse-deluxe-ev-charge-controller-kit/)\n  - OpenEVSE FW [V4.8.0+ recommended](https://github.com/OpenEVSE/open_evse/releases)\n  - All new OpenEVSE units are shipped with V4.8.0 pre-loaded (October 2017 onwards)\n  - OpenEVSE FW V3.10.4 will work with latest WiFi FW with some minor issues e.g. LCD text corruption\n\n### WiFi Module\n\n- ESP8266 (ESP-12) e.g Adafruit Huzzah\n- Purchase via: [OpenEVSE Store (USA/Canda)](https://store.openevse.com/collections/frontpage/products/openevse-wifi-kit) | [OpenEnergyMonitor (UK / EU)](http://shop.openenergymonitor.com/openevse-wifi-kit/)\n- See [OpenEVSE WiFi setup guide](https://openevse.dozuki.com/Guide/OpenEVSE+WiFi+%28Beta%29/14) for WiFi module connection instructions\n\n***\n\n## Contents\n\n\u003c!-- toc --\u003e\n\n- [User Guide](#user-guide)\n  * [WiFi Setup](#wifi-setup)\n  * [OpenEVSE Web Interface](#openevse-web-interface)\n  * [Charging Mode: Eco](#charging-mode-eco)\n    + [Solar PV Divert Example](#solar-pv-divert-example)\n    + [Setup](#setup)\n    + [Operation](#operation)\n  * [Services](#services)\n    + [Emoncms data logging](#emoncms-data-logging)\n    + [MQTT](#mqtt)\n      - [OpenEVSE Status via MQTT](#openevse-status-via-mqtt)\n    + [RAPI](#rapi)\n      - [RAPI via web interface](#rapi-via-web-interface)\n      - [RAPI over MQTT](#rapi-over-mqtt)\n      - [RAPI over HTTP](#rapi-over-http)\n    + [OhmConnect](#ohmconnect)\n  * [System](#system)\n    + [Authentication](#authentication)\n    + [Firmware update](#firmware-update)\n    + [Hardware reset](#hardware-reset)\n  * [Firmware Compile \u0026 Upload](#firmware-compile--upload)\n    + [Using PlatformIO](#using-platformio)\n      - [Install PlatformIO](#install-platformio)\n      - [Clone this repo](#clone-this-repo)\n      - [Build the GUI](#build-the-gui)\n      - [Compile \u0026 upload](#compile--upload)\n    + [Using Arduino IDE](#using-arduino-ide)\n      - [1. Install ESP for Arduino with Boards Manager](#1-install-esp-for-arduino-with-boards-manager)\n      - [2. Compile and Upload](#2-compile-and-upload)\n    + [Troubleshooting Upload](#troubleshooting-upload)\n      - [Erase Flash](#erase-flash)\n      - [Fully erase ESP](#fully-erase-esp)\n  * [About](#about)\n  * [Licence](#licence)\n\n\u003c!-- tocstop --\u003e\n\n***\n\n# User Guide\n\n## WiFi Setup\n\nOn first boot, OpenEVSE should broadcast a WiFI access point (AP) `OpenEVSE_XXX`. Connect to this AP (default password: `openevse`) and the [captive portal](https://en.wikipedia.org/wiki/Captive_portal) should forward you to the log-in page. If this does not happen navigate to [http://openevse](http://openevse), [http://openevse.local](http://openevse.local) or [http://192.168.4.1](http://192.168.4.1)\n\n*Note: You may need to disable mobile data if connecting via a mobile*\n\n*Note: Use of Internet Explorer 11 or earlier is not recommended*\n\n![Wifi connect](docs/wifi-connect.png) ![Wifi setup](docs/wifi-scan.png)\n\n\n- Select your WiFi network from list of available networks\n- Enter WiFi PSK key then click `Connect`\n\n- OpenEVSE should now connect to local WiFi network\n- Re-connect device to local WiFi network and connect to OpenEVSE using [http://openevse.local](http://openevse.local), [http://openevse](http://openevse) or local IP address.\n\n**If connection / re-connection fails (e.g. network cannot be found or password is incorrect) the OpenEVSE will automatically revert back to WiFi access point (AP) mode after a short while to allow a new network to be re-configured if required. Re-connection to existing network will be attempted every 5 minutes.**\n\n*Holding the `boot / GPIO0` button on the ESP8266 module for about 5s will force WiFi access point mode. This is useful when trying to connect the unit to a new WiFi network. If the unit cannot connect t0 a WiFi network it will resturn to AP more before retrying to connect*\n\n***\n\n## OpenEVSE Web Interface\n\nAll functions of the OpenEVSE can be viewed and controlled via the web interface. Here is a screen grab showing the 'advanced' display mode:\n\n![advanced](docs/adv.png)\n\nThe interface has been optimised to work well for both desktop and mobile. Here is an example setting a charging delay timer using an Android device:\n\n![android-clock](docs/mobile-clock.png)\n\n## Charging Mode: Eco\n\n'Eco' charge mode allows the OpenEVSE to adjust the charging current automatically based on an MQTT feed. This feed could be the amount of solar PV generation or the amount of excess power (grid export). 'Normal' charge mode charges the EV at the maximum rate set.\n\n### Solar PV Divert Example\n\nThis is best illustrated using an Emoncms MySolar graph. The solar generation is shown in yellow and OpenEVSE power consumption in blue:\n\n![divert](docs/divert.png)\n\n- OpenEVSE is initially sleeping with an EV connected\n- Once solar PV generation reaches 6A (1.5kW @ 240V) the OpenEVSE initiates charging\n- Charging current is adjusted based on available solar PV generation\n- Once charging has begun, even if generation drops below 6A, the EV will continue to charge*\n\n**The decision was made not to pause charging if generation current drops below 6A since repeatedly starting / stopping a charge causes excess wear to the OpenEVSE relay contactor.*\n\nIf a Grid +I/-E (positive import / negative export) feed was used the OpenEVSE would adjust its charging rate based on *excess* power that would be exported to the grid; for example, if solar PV was producing 4kW and 1kW was being used on-site, the OpenEVSE would charge at 3kW and the amount exported to the grid would be 0kW. If on-site consumption increases to 2kW the OpenEVSE would reduce its charging rate to 2kW.\n\nAn [OpenEnergyMonitor solar PV energy monitor](https://guide.openenergymonitor.org/applications/solar-pv/) with an AC-AC voltage sensor adaptor is required to monitor direction of current flow.\n\n### Setup\n\n![eco](docs/eco.png)\n\n- To use 'Eco' charging mode MQTT must be enabled and 'Solar PV divert' MQTT topics must be entered.\n- Integration with an OpenEnergyMonitor emonPi is straightforward:\n  - Connect to emonPi MQTT server, [emonPi MQTT credentials](https://guide.openenergymonitor.org/technical/credentials/#mqtt) should be pre-populated\n  - Enter solar PV generation / Grid (+I/-E) MQTT topic e.g. if solar PV is being monitored by emonPi CT channel 1 enter `emon/emonpi/power1`\n  - [MQTT lens Chrome extension](https://chrome.google.com/webstore/detail/mqttlens/hemojaaeigabkbcookmlgmdigohjobjm?hl=en) can be used to view MQTT data e.g. subscribe to `emon/#` for all OpenEnergyMonitor MQTT data. To lean more about MQTT see [MQTT section of OpenEnergyMonitor user guide](https://guide.openenergymonitor.org/technical/mqtt/)\n  - If using Grid +I/-E (positive import / negative export) MQTT feed ensure the notation positive import / negative export is correct, CT sensor can be physically reversed on the cable to invert the reading.\n\n### Operation\n\nTo enable 'Eco' mode charging:\n\n- Connect EV and ensure EV's internal charging timer is switched off\n- Pause charge; OpenEVSE should display 'sleeping'\n- Enable 'Eco' mode using web interface or via MQTT\n- EV will not begin charging when generation / excess current reaches 6A (1.4kW @ 240V)\n\n- During 'Eco' charging changes to charging current are temporary (not saved to EEPROM)\n- After an 'Eco mode' charge the OpenEVSE will revert to 'Normal' when EV is disconnected and previous 'Normal' charging current will be reinstated.\n- Current is adjusted in 1A increments between 6A* (1.5kW @ 240V) \u003e max charging current (as set in OpenEVSE setup)\n- 6A is the lowest supported charging current that SAE J1772 EV charging protocol supports\n- The OpenEVSE does not adjust the current itself but rather request that the EV adjusts its charging current by varying the duty cycle of the pilot signal, see [theory of operation](https://openev.freshdesk.com/support/solutions/articles/6000052070-theory-of-operation) and [Basics of SAE J1772](https://openev.freshdesk.com/support/solutions/articles/6000052074-basics-of-sae-j1772).\n- Charging mode can be viewed and set via MQTT: `{base-topic}/divertmode/set` (1 = normal, 2 = eco).\n\n\\* *OpenEVSE controller firmware [V4.8.0](https://github.com/OpenEVSE/open_evse/releases/tag/v4.8.0) has a bug which restricts the lowest charging current to 10A. The J1772 protocol can go down to 6A. This ~~will~~ has be fixed with a firmware update. See [OpenEnergyMonitor OpenEVSE FW releases](https://github.com/openenergymonitor/open_evse/releases/). A ISP programmer is required to update openevse controler FW.*\n\n***\n\n## Services\n\n![services](docs/services.png)\n\n### Emoncms data logging\n\nOpenEVSE can post its status values (e.g amp, temp1, temp2, temp3, pilot, status) to [emoncms.org](https://emoncms.org) or any other  Emoncms server (e.g. emonPi) using [Emoncms API](https://emoncms.org/site/api#input). Data will be posted every 30s.\n\nData can be posted using HTTP or HTTPS. For HTTPS the Emoncms server must support HTTPS (emoncms.org does, the emonPi does not).Due to the limited resources on the ESP the SSL SHA-1 fingerprint for the Emoncms server must be manually entered and regularly updated.\n\n*Note: the emoncms.org fingerprint will change every 90 days when the SSL certificate is renewed.*\n\n\n### MQTT\n\n#### OpenEVSE Status via MQTT\n\nOpenEVSE can post its status values (e.g. amp, wh, temp1, temp2, temp3, pilot, status) to an MQTT server. Data will be published as a sub-topic of base topic.E.g `\u003cbase-topic\u003e/amp`. Data is published to MQTT every 30s.\n\nMQTT setup is pre-populated with OpenEnergyMonitor [emonPi default MQTT server credentials](https://guide.openenergymonitor.org/technical/credentials/#mqtt).\n\n- Enter MQTT server host and base-topic\n- (Optional) Enter server authentication details if required\n- Click connect\n- After a few seconds `Connected: No` should change to `Connected: Yes` if connection is successful. Re-connection will be attempted every 10s. A refresh of the page may be needed.\n\n*Note: `emon/xxxx` should be used as the base-topic if posting to emonPi MQTT server if you want the data to appear in emonPi Emoncms. See [emonPi MQTT docs](https://guide.openenergymonitor.org/technical/mqtt/).*\n\nMQTT can also be used to control the OpenEVSE, see RAPI MQTT below.\n\n### RAPI\n\nRAPI commands can be used to control and check the status of all OpenEVSE functions. RAPI commands can be issued via the direct serial, web-interface, HTTP and MQTT. We recommend using RAPI over MQTT.\n\n**A full list of RAPI commands can be found in the [OpenEVSE plus source code](https://github.com/openenergymonitor/open_evse/blob/master/firmware/open_evse/rapi_proc.h).**\n\n#### RAPI via web interface\n\nEnter RAPI commands directly into to web interface (dev mode must be enabled), RAPI response is printed in return:\n\n![enable-rapi](docs/enable-rapi.png)\n\n![rapi-web](docs/rapi-web.png)\n\n#### RAPI over MQTT\n\nRAPI commands can be issued via MQTT messages. The RAPI command should be published to the following MQTT:\n\n`\u003cbase-topic\u003e/rapi/in/\u003c$ rapi-command\u003e payload`\n\ne.g assuming base-topic of `openevse` the following command will set current to 13A:\n\n`openevse/rapi/in/$SC 13`\n\nThe payload can be left blank if the RAPI command does not require a payload e.g.\n\n`openevse/rapi/in/$GC`\n\nThe response from the RAPI command is published by the OpenEVSE back to the same sub-topic and can be received by subscribing to:\n\n`\u003cbase-topic\u003e/rapi/out/#`\n\ne.g. `$OK`\n\n[See video demo of RAPI over MQTT](https://www.youtube.com/watch?v=tjCmPpNl-sA\u0026t=101s)\n\n#### RAPI over HTTP\n\nRAPI (rapid API) commands can also be issued directly via a single HTTP request.\n\n*Assuming `192.168.0.108` is the local IP address of the OpenEVSE ESP.*\n\nEg.the RAPI command to set charging rate to 13A:\n\n[http://192.168.0.108/r?rapi=%24SC+13](http://192.168.0.108/r?rapi=%24SC+13)\n\nTo sleep (pause a charge) issue RAPI command `$FS`\n\n[http://192.168.0.108/r?rapi=%24FS](http://192.168.0.108/r?rapi=%24FS)\n\nTo enable (start / resume a charge) issue RAPI command `$FE`\n\n[http://192.168.0.108/r?rapi=%24FE](http://192.168.0.108/r?rapi=%24FE)\n\n\nThere is also an [OpenEVSE RAPI command python library](https://github.com/tiramiseb/python-openevse).\n\n### OhmConnect\n\n**USA California only**\n[Join here](https://ohm.co/openevse)\n\n**Video - How does it Work**\nhttps://player.vimeo.com/video/119419875\n\n-Sign Up\n-Enter Ohm Key\n\nOhm Key can be obtained by logging in to OhmConnect, enter Settings and locate the link in \"Open Source Projects\"\nExample: https://login.ohmconnect.com/verify-ohm-hour/OpnEoVse\nKey: OpnEoVse\n## System\n\n![system](docs/system.png)\n\n### Authentication\n\nAdmin HTTP Authentication (highly recommended) can be enabled by saving admin config by default username and password.\n\n**HTTP authentication is required for all HTTP requests including input API**\n\n\n### Firmware update\n\nPre-compiled .bin's can be uploaded via the web interface, see [OpenEVSE Wifi releases](https://github.com/OpenEVSE/ESP8266_WiFi_v2.x/releases) for latest updates.\n\n### Hardware reset\n\nA Hardware reset can be made (all wifi and services config lost) by pressing and holding GPIO0 hardware button (on the Huzzah WiFi module) for 10s.\n\nNote: Holding the GPIO0 button for 5s will but the WiFi unit into AP (access point) mode to allow the WiFi network to be changed without loosing all the service config\n\n***\n\n## Upload pre-compiled firmware \n\n- Download pre-compiled FW from the [OpenEVSE Wifi releases](https://github.com/OpenEVSE/ESP8266_WiFi_v2.x/releases) page\n\n- Either Flash using esptool:\n\n`esptool.py write_flash 0x000000 firmware.bin`\n\n- Or the OpenEnergyMonitor [emonUpload](https://github.com/openenergymonitor/emonupload) tool can be used to automatically download and flash the latest firmware. Be sure to select the correct version. \n\n- Or use [Pyflasher](https://github.com/marcelstoer/nodemcu-pyflasher) GUI avilable on windows/mac \n\n## Firmware Compile \u0026 Upload\n\n**The ESP should be shipped with latest firmware pre-installed, firmware can be updated via the HTTP web interface.**\n\n**Updating from V1: it's possible to update from V1 to V2 firmware using the HTTP web interface uploader, just upload the latest .bin pre-compiled firmware release.***\n\nIf required firmware can also be uploaded via serial using USB to UART cable.\n\nThe code for the ESP8266 can be compiled and uploaded using PlatformIO or Arduino IDE. We recommend PlatformIO for its ease of use.\n\n\n### Using PlatformIO\n\nFor more detailed ESP8266 Arduino core specific PlatfomIO notes see: https://github.com/esp8266/Arduino#using-platformio\n\n#### Install PlatformIO\n\nThe easiest way if running Linux is to install using the install script. See [PlatformIO installation docs](http://docs.platformio.org/en/latest/installation.html#installer-script). Or PlatformIO IDE can be used :\n\n`$ sudo python -c \"$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/master/scripts/get-platformio.py)\"`\n\nStandalone built on GitHub Atom IDE, or use PlatformIO Atom IDE plug-in if you already have Atom installed. The IDE is nice, easy and self-explanatory.\n\n[Download PlatfomIO IDE](http://platformio.org/platformio-ide)\n\n#### Clone this repo\n\n`$ git clone https://github.com/OpenEVSE/ESP8266_WiFi_v2.x`\n\n#### Build the GUI\n\nThe GUI files are minified and compiled into the firmware using a combination of Webpack and a custom build script. You will also need Node.JS and NPM installed.\n\nIn addition the GUI is now maintained in a separate repository and included as a Git submodule. If the `gui` directory is empty use the following to retrieve the GUI source and fetch the dependencies.\n\n```shell\ngit submodule update --init\ncd gui\nnpm install\n```\n\nTo 'build' the GUI use the following:\n\n```shell\ncd gui\nnpm run build\n```\n\nNewer openssl provider in npm is compatible with some of the crypto settings, so run in \"legacy\" mode\n\n```shell\nNODE_OPTIONS=--openssl-legacy-provider npm run build\n```\n\nYou can then just compile and upload as above.\n\nFor more details see the [GUI documentation](gui/readme.md)\n\n#### Compile \u0026 upload\n\n- Put ESP into bootloader mode\n- On other ESP boards (Adafruit HUZZAH) press and hold `boot` button then press `reset`, red LED should light dimly to indicate bootloader mode.\n- Compile and upload using platformIO\n\n```\npio run -t upload\n```\n\n*To enable to OTA upload first upload via serial using the dev environment, this enables to OTA enable build flag. See `platformio.ino*\n\n*Note: uploading SPIFFS is no longer required since web resources are [now embedded in the firmware](https://github.com/OpenEVSE/ESP8266_WiFi_v2.x/pull/87)\n\n***\n\n### Using Arduino IDE\n\n#### 1. Install ESP for Arduino with Boards Manager\n\nFrom: https://github.com/esp8266/Arduino\n\nStarting with 1.6.4, Arduino allows installation of third-party platform packages using Boards Manager. ESP Arduino packages are available for Windows, Mac OS, and Linux (32 and 64 bit).\n\n- Install Arduino 1.6.8 from the Arduino website.\n- Start Arduino and open Preferences window.\n- Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.\n- Open Boards Manager from Tools \u003e Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools \u003e Board menu after installation).\n\n\n#### 2. Compile and Upload\n\n- Open `src.ino` in the Arduino IDE.\n- Compile and Upload as normal\n\n***\n\n### Troubleshooting\n\n\n### WiFi Connection issues \n\nIt's [been reported](https://community.openenergymonitor.org/t/wifi-connection-openevse/11039/19?u=glyn.hudson) that the OpenEVSE WiFi has issues with non standard MTU settings, we recomend using the standard 1500 bytes for router MTU setting \n\n#### Uploading issues\n\n- Double check device is in bootloder mode\n- Try reducing the upload ESP baudrate\n- Erase flash: If you are experiencing ESP hanging in a reboot loop after upload it may be that the ESP flash has remnants of previous code (which may have the used the ESP memory in a different way). The ESP flash can be fully erased using [esptool](https://github.com/themadinventor/esptool). With the unit in bootloader mode run:\n\n`$ esptool.py erase_flash`\n\nOutput:\n\n```\nesptool.py v1.2-dev\nConnecting...\nRunning Cesanta flasher stub...\nErasing flash (this may take a while)...\nErase took 8.0 seconds\n```\n\n**Fully erase ESP**\n\nTo fully erase all memory locations on an ESP-12 (4Mb) we need to upload a blank file to each memory location\n\n`esptool.py write_flash 0x000000 blank_1MB.bin 0x100000 blank_1MB.bin 0x200000 blank_1MB.bin 0x300000 blank_1MB.bin`\n\n#### View serial debug\n\nTo help debug it may be useful to enable serial debug output. To do this upload using `openevse_dev` environment e.g.\n\n`pio run -t upload -eopenevse_dev`\n\nThe default is to enable serial debug on serial1 the ESP's 2nd serial port. You will need to connect a debugger to the ESP serial1 Tx pin (GPIO2).\n\nTo change to use serial0 (the main ESP's serial port) change `-DDEBUG_PORT=Serial1` to `-DDEBUG_PORT=Serial` in `platformio.ini`. Note that using serial 0 will adversely effect RAPI communication with the openevse controller.\n\n***\n\n## About\n\nCollaboration of [OpenEnergyMonitor](http://openenergymonitor.org) and [OpenEVSE](https://openevse.com).\n\nContributions by:\n\n- @glynhudson\n- @chris1howell\n- @trystanlea\n- @jeremypoulter\n- @sandeen\n- @lincomatic\n- @joverbee\n\n## Licence\n\nGNU General Public License (GPL) V3\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["emonevse","ev","j1772","esp8266-arduino","serial","wifi-network","atm90e32","esp32","esp32-arduino","emonpi"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/20108","html_url":"https://ost.ecosyste.ms/projects/20108"}