mirror of https://github.com/lumapu/ahoy.git
committed by
GitHub
23 changed files with 774 additions and 345 deletions
@ -0,0 +1,58 @@ |
|||
name: Ahoy Dev-Build for ESP8266/ESP32 |
|||
|
|||
on: |
|||
push: |
|||
branches: development* |
|||
paths-ignore: |
|||
- '**.md' # Do no build on *.md changes |
|||
jobs: |
|||
build: |
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
- uses: actions/checkout@v3 |
|||
with: |
|||
ref: development02 |
|||
- uses: benjlevesque/short-sha@v1.2 |
|||
id: short-sha |
|||
with: |
|||
length: 7 |
|||
- name: cache-pip |
|||
uses: actions/cache@v3 |
|||
with: |
|||
path: ~/.cache/pip |
|||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
|||
restore-keys: | |
|||
${{ runner.os }}-pip- |
|||
- name: cache-platformio |
|||
uses: actions/cache@v3 |
|||
with: |
|||
path: ~/.platformio |
|||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} |
|||
- name: setup-python |
|||
uses: actions/setup-python@v3 |
|||
- name: install-platformio |
|||
run: | |
|||
python -m pip install --upgrade pip |
|||
pip install --upgrade platformio |
|||
- name: update-html |
|||
working-directory: tools/esp8266/html |
|||
run: python convert.py |
|||
- name: Run PlatformIO |
|||
run: pio run -d tools/esp8266 --environment esp8266-release --environment esp32-wroom32-release |
|||
- name: rename-binary-files |
|||
id: rename-binary-files |
|||
working-directory: tools/esp8266/scripts |
|||
run: python getVersion.py |
|||
- name: set-version |
|||
uses: cschleiden/replace-tokens@v1 |
|||
with: |
|||
files: tools/esp8266/User_Manual.md |
|||
env: |
|||
VERSION: ${{ steps.rename-binary-files.outputs.name }} |
|||
- name: create-artifact |
|||
run: zip --junk-paths ${{ steps.rename-binary-files.outputs.name }}.zip tools/esp8266/.pio/build/out/* tools/esp8266/User_Manual.md |
|||
- uses: actions/upload-artifact@v3 |
|||
with: |
|||
name: ${{ steps.rename-binary-files.outputs.name }}_dev_build |
|||
path: ./${{ steps.rename-binary-files.outputs.name }}.zip |
@ -1,22 +1,28 @@ |
|||
  |
|||
|
|||
 |
|||
|
|||
# ahoy |
|||
Various tools, examples, and documentation for communicating with Hoymiles microinverters. |
|||
Ahoi is a project to bypass the original Hoymiles cloud solution. |
|||
In order to use this project, it is important what the area of application looks like. |
|||
With each version it is necessary to have an NRF24L01+. |
|||
|
|||
Click on the link below you are interested in. |
|||
There you will find further explanations on how to proceed. (*Note: It is still under construction!*) |
|||
|
|||
In particular: |
|||
##### Most updated section |
|||
- [ESP8266](tools/esp8266/) that includes an web interface |
|||
|
|||
* `doc/hoymiles-format-description.txt` is a [detailed description of the communications format](doc/hoymiles-format-description.md) and the history of this project |
|||
* `doc/getting-started-ESP8266.md` shows the [hardware setup for an ESP8266-based system](doc/getting-started-ESP8266.md) |
|||
* The `tools` folder contains various software tools for RaspberryPi, Arduino and ESP8266/ESP32: |
|||
* A [version for ESP8266](tools/esp8266/) that includes an web interface  |
|||
* A [version for Arduino Nano](tools/nano/NRF24_SendRcv/) |
|||
* An [alternative Version of the above](tools/NRF24_SendRcv/) |
|||
* A [different implementation](tools/HoyDtuSim/) |
|||
* An [implementation for Raspberry Pi](tools/rpi/) that polls an inverter and archives results as log files/stdout as well as posting them to an MQTT broker. |
|||
##### will be updated as needed |
|||
- [Arduino Nano](tools/nano/NRF24_SendRcv/) |
|||
- [Raspberry Pi](tools/rpi/) |
|||
- [others](tools/nano/NRF24_SendRcv/) |
|||
|
|||
Contributors are always welcome! |
|||
If errors occur or you have suggestions for ideas, please feel free to contact us [here](https://github.com/grindylow/ahoy/issues). |
|||
|
|||
## Contact |
|||
We run a Discord Server that can be used to get in touch with the Developers and Users. |
|||
|
|||
https://discord.gg/WzhxEY62mB |
|||
|
|||
**Contributors are always welcome!** |
|||
|
@ -0,0 +1,30 @@ |
|||
//-----------------------------------------------------------------------------
|
|||
// 2022 Ahoy, https://www.mikrocontroller.net/topic/525778
|
|||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/3.0/de/
|
|||
//-----------------------------------------------------------------------------
|
|||
|
|||
#ifndef __CONFIG_OVERRIDE_H__ |
|||
#define __CONFIG_OVERRIDE_H__ |
|||
|
|||
// override fallback WiFi info
|
|||
|
|||
// each ovveride must be preceeded with an #undef statement
|
|||
#undef FB_WIFI_SSID |
|||
#define FB_WIFI_SSID "MY_SSID" |
|||
|
|||
// each ovveride must be preceeded with an #undef statement
|
|||
#undef FB_WIFI_PWD |
|||
#define FB_WIFI_PWD "MY_WIFI_KEY" |
|||
|
|||
// ESP32 default pinout
|
|||
#undef DEF_RF24_CS_PIN |
|||
#define DEF_RF24_CS_PIN 5 |
|||
#undef DEF_RF24_CE_PIN |
|||
#define DEF_RF24_CE_PIN 4 |
|||
#undef DEF_RF24_IRQ_PIN |
|||
#define DEF_RF24_IRQ_PIN 16 |
|||
|
|||
#undef DTU_RADIO_ID |
|||
#define DTU_RADIO_ID ((uint64_t)0x1234567802ULL) |
|||
|
|||
#endif /*__CONFIG_OVERRIDE_H__*/ |
@ -1,4 +0,0 @@ |
|||
#ifndef __INDEX_HTML_H__ |
|||
#define __INDEX_HTML_H__ |
|||
const char index_html[] PROGMEM = "<!doctype html><html><head><title>Index - {DEVICE}</title><link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"/><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><script type=\"text/javascript\">getAjax('/uptime', 'uptime');getAjax('/cmdstat', 'cmds');window.setInterval(\"getAjax('/uptime', 'uptime')\", {JS_TS});window.setInterval(\"getAjax('/cmdstat', 'cmds')\", {JS_TS});function getAjax(url, resid) {var http = null;http = new XMLHttpRequest();if(http != null) {http.open(\"GET\", url, true);http.onreadystatechange = print;http.send(null);}function print() {if(http.readyState == 4) {document.getElementById(resid).innerHTML = http.responseText;}}}function getInverterInfo(data){var http = null;http = new XMLHttpRequest();if(http != null) {http.open(\"POST\", \"/api\");http.setRequestHeader(\"Accept\", \"application/json\");http.setRequestHeader(\"Content-Type\", \"application/json\");http.send(data);}}</script></head><body><h1>AHOY - {DEVICE}</h1><div id=\"content\" class=\"content\"><p><a href=\"/visualization\">Visualization</a><br/><br/><a href=\"/setup\">Setup</a><br/></p><p><span class=\"des\">Uptime: </span><span id=\"uptime\"></span></p><p><span class=\"des\">Statistics: </span><pre id=\"cmds\"></pre></p><p>Every {TS}seconds the values are updated</p><div id=\"note\">This project was started from <a href=\"https://www.mikrocontroller.net/topic/525778\" target=\"_blank\">this discussion. (Mikrocontroller.net)</a><br/>New updates can be found on Github: <a href=\"https://github.com/grindylow/ahoy\" target=\"_blank\">https://github.com/grindylow/ahoy</a><br/><br/>Please report issues using the feature provided by <a href=\"https://github.com/grindylow/ahoy/issues\">Github</a><br/><br/>Discuss with us on <a href=\"https://discord.gg/WzhxEY62mB\">Discord</a><br/><p class=\"lic\"><a href=\"https://creativecommons.org/licenses/by-nc-sa/3.0/de\">Creative Commons - https://creativecommons.org/licenses/by-nc-sa/3.0/de/</a><br/>Check the licenses which are published on <a href=\"https://github.com/grindylow/ahoy\">https://github.com/grindylow/ahoy</a>as well</p></div></div><div id=\"footer\"><p class=\"left\">© 2022</p><p class=\"left\"><a href=\"/update\">Update Firmware</a></p><p class=\"right\">AHOY :: {VERSION}</p><p class=\"right\"><a href=\"/reboot\">Reboot</a></p><p class=\"right\">Git SHA: {BUILD}</p></div></body></html>"; |
|||
#endif /*__INDEX_HTML_H__*/ |
File diff suppressed because one or more lines are too long
@ -1,4 +0,0 @@ |
|||
#ifndef __STYLE_CSS_H__ |
|||
#define __STYLE_CSS_H__ |
|||
const char style_css[] PROGMEM = "h1 {margin:0;padding:20pt;font-size:22pt;color:#fff;background-color:#006ec0;display:block;text-transform:uppercase;}html, body {font-family:Arial;margin:0;padding:0;}p {text-align:justify;font-size:13pt;}p.lic, p.lic a {font-size:8pt;color:#999;}.des {margin-top:20px;font-size:13pt;color:#006ec0;}.s_active, .s_collapsible:hover {background-color:#006ec0;}.s_content {display:none;overflow:hidden;}.s_collapsible {background-color:#044e86;color:white;cursor:pointer;padding:18px;width:100%;border:none;text-align:left;outline:none;font-size:15px;margin-bottom:4px;}.subdes {font-size:12pt;color:#006ec0;margin-left:7px;}.subsubdes {font-size:12pt;color:#006ec0;margin:0 0 7px 12px;}.hide {display:none;}a:link, a:visited {text-decoration:none;font-size:13pt;color:#006ec0;}a:hover, a:focus {color:#f00;}a.erase {background-color:#006ec0;color:#fff;padding:7px;display:inline-block;margin-top:30px;}#content {padding:15px 15px 60px 15px;}#footer {position:fixed;bottom:0px;height:45px;background-color:#006ec0;width:100%;border-top:5px solid #fff;}#footer p, #footer a {color:#fff;padding:0 7px 0 7px;font-size:10pt !important;}div.content {background-color:#fff;padding-bottom:65px;overflow:auto;}input, select {padding:7px;font-size:13pt;}input.text, select {width:70%;box-sizing:border-box;margin-bottom:10px;border:1px solid #ccc;}input.sh {max-width:150px !important;margin-right:10px;}input.btn {background-color:#006ec0;color:#fff;border:0px;float:right;margin:10px 0 30px;text-transform:uppercase;}input.cb {margin-bottom:20px;}label {width:20%;display:inline-block;font-size:12pt;padding-right:10px;margin:10px 0px 0px 15px;vertical-align:top;}fieldset {margin-bottom:15px;}.left {float:left;}.right {float:right;}div.ch-iv {width:100%;background-color:#32b004;display:inline-block;margin-bottom:15px;padding-bottom:20px;overflow:auto;}div.ch {width:220px;min-height:350px;background-color:#006ec0;display:inline-block;margin:0 10px 15px 10px;overflow:auto;padding-bottom:20px;}div.ch .value, div.ch .info, div.ch .head, div.ch-iv .value, div.ch-iv .info, div.ch-iv .head {color:#fff;display:block;width:100%;text-align:center;}.subgrp {float:left;width:220px;}div.ch .unit, div.ch-iv .unit {font-size:19px;margin-left:10px;}div.ch .value, div.ch-iv .value {margin-top:20px;font-size:24px;}div.ch .info, div.ch-iv .info {margin-top:3px;font-size:10px;}div.ch .head {background-color:#003c80;padding:10px 0 10px 0;}div.ch-iv .head {background-color:#1c6800;padding:10px 0 10px 0;}div.iv {max-width:960px;margin-bottom:40px;}div.ts {font-size:13px;background-color:#ddd;border-top:7px solid #999;padding:7px;}div.modpwr, div.modname {width:70%;display:inline-block;}#note {margin:50px 10px 10px 10px;padding-top:10px;width:100%;border-top:1px solid #bbb;}@media(max-width:500px) {div.ch .unit, div.ch-iv .unit {font-size:18px;}div.ch {width:170px;min-height:100px }.subgrp {width:180px;}}"; |
|||
#endif /*__STYLE_CSS_H__*/ |
@ -1,4 +0,0 @@ |
|||
#ifndef __VISUALIZATION_HTML_H__ |
|||
#define __VISUALIZATION_HTML_H__ |
|||
const char visualization_html[] PROGMEM = "<!doctype html><html><head><title>Index - {DEVICE}</title><link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\"/><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><script type=\"text/javascript\">getAjax('/livedata', 'livedata');window.setInterval(\"getAjax('/livedata', 'livedata')\", {JS_TS});function getAjax(url, resid) {var http = null;http = new XMLHttpRequest();if(http != null) {http.open(\"GET\", url, true);http.onreadystatechange = print;http.send(null);}function print() {if(http.readyState == 4) {document.getElementById(resid).innerHTML = http.responseText;}}}</script><style type=\"text/css\"></style></head><body><h1>AHOY - {DEVICE}</h1><div id=\"content\" class=\"content\"><div id=\"livedata\"></div><p>Every {TS}seconds the values are updated</p></div><div id=\"footer\"><p class=\"left\">© 2022</p><p class=\"left\"><a href=\"/\">Home</a></p><p class=\"right\">AHOY :: {VERSION}</p></div></body></html>"; |
|||
#endif /*__VISUALIZATION_HTML_H__*/ |
Loading…
Reference in new issue