Skip to content

Commit

Permalink
chore: Update doc and code compilation with pip version of esphome
Browse files Browse the repository at this point in the history
chore: Update doc and code compilation with pip version of esphome
  • Loading branch information
XavierBerger authored Jun 22, 2024
2 parents 37ad3b3 + 42bf47d commit 8fd96fc
Show file tree
Hide file tree
Showing 13 changed files with 70 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
secrets.yaml
/.esphome/
/secrets.yaml
/site/
/venv/
12 changes: 9 additions & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog
!!! Changelog update
ChangeLog is only available in [documentation](https://xavierberger.github.io/Solar-Router-for-ESPHome/changelog/).
Changelog is update manually after a new release is published.

!!! note
ChangeLog is only populated in [documentation](https://xavierberger.github.io/Solar-Router-for-ESPHome/changelog/) when a new release is published.
Changelog is generated using `git-cliff`.
Version are based on tags.
Logs are based on merge commit messages.

The script `tools\update_documentation.sh` is designed to update `changelog.md`, generate and publish `mkdocs` documentation on [github pages](https://xavierberger.github.io/Solar-Router-for-ESPHome/).
This script is entented to be used by repository maintainer only.
9 changes: 7 additions & 2 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ A documentation have to be added describing the power meter and how to configure

Documentation is written using [mkdocs](https://www.mkdocs.org/) and [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/).

To install mkdocs, you need to install [Python](https://python.org) and then install the required module with the following command `pip install -r requirements.txt`.
To install `mkdocs`, you need to install [Python](https://python.org) and then :

Documentation is stored in `docs` directory. To see you modification in real time in your browser, execute the command `mkdocs serve` and browse [http://127.0.0.1:8000](http://127.0.0.1:8000)
- Create a virtual environment (see [Python documentation](https://docs.python.org/3/library/venv.html)).
- Install the required module with the following command `pip install -r requirements.txt`.

Documentation is stored in `docs` directory. To see you modification in real time in your browser, execute the command `mkdocs serve` and browse [http://127.0.0.1:8000](http://127.0.0.1:8000)

{% include "changelog.md"%}
File renamed without changes
File renamed without changes.
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ This integration enables users to effortlessly monitor and control the router's
Please read the [disclaimer](disclamer.md) before proceeding with the **Solar Router for ESPHome** project.

![SolarRouterClosed](images/SolarRouterClosed.png){width=350}
![Dashboard](images/SolarRouterInHomeAssistantDashboard.png){width=350}
![Dashboard](images/SolarRouterInHomeAssistantDashboard.png){width=350}

19 changes: 18 additions & 1 deletion esp32-proxy-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ logger:

# Enable Home Assistant API
api:
encryption:
key: !secret api_encryption_key

# Enable over-the-air updates
ota:
- platform: esphome
password: !secret solar_router_ota_password

# Enable improv serial
improv_serial:

# WiFi connection
wifi:
Expand All @@ -37,12 +44,18 @@ web_server:
# Customisation
# ----------------------------------------------------------------------------------------------------

# This part of the script is designed to be use for customisation. It shouldn't be necessary to
# edit other part of the script to perform configuration.

substitutions:
# Power meter source -----------------------------------------------------------
# Define ip address of Proxy Power Meter
power_meter_ip_address: "192.168.1.30"

# Regulator configuration ------------------------------------------------------
# Regulator --------------------------------------------------------------------
regulator: "ac_dimmer"

# Regulator configuration
# Define GPIO pin connected to AC Dimmer for gate and zero crossing detection.
regulator_gate_pin: GPIO22
regulator_zero_crossing_pin: GPIO23
Expand All @@ -57,9 +70,13 @@ packages:
power_meter:
url: https://github.com/XavierBerger/Solar-Router-for-ESPHome/
file: solar_router/power_meter_proxy.yaml
refresh: 5s
regulator:
url: https://github.com/XavierBerger/Solar-Router-for-ESPHome/
file: solar_router/regulator_triac.yaml
refresh: 5s
solar_router:
url: https://github.com/XavierBerger/Solar-Router-for-ESPHome/
file: solar_router/solar_router_engine.yaml
refresh: 5s

26 changes: 23 additions & 3 deletions esp32-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,24 @@ esp32:

# Enable logging
logger:
baud_rate: 0
baud_rate: 115200
level: INFO
logs:
component: ERROR

# Enable Home Assistant API
api:
encryption:
key: !secret api_encryption_key


# Enable over-the-air updates
ota:
- platform: esphome
password: !secret solar_router_ota_password

# Enable improv serial
improv_serial:

# WiFi connection
wifi:
Expand All @@ -37,12 +45,19 @@ web_server:
# Customisation
# ----------------------------------------------------------------------------------------------------

# This part of the script is designed to be use for customisation. It shouldn't be necessary to
# edit other part of the script to perform configuration.

substitutions:
# Power meter source -----------------------------------------------------------
# Define ip address of Fronius inverter
# Define ip address of Power Meter (Fronius Inverter)
power_meter_ip_address: "192.168.1.21"

# Regulator configuration ------------------------------------------------------

# Regulator --------------------------------------------------------------------
regulator: "ac_dimmer"

# Regulator configuration
# Define GPIO pin connected to AC Dimmer for gate and zero crossing detection.
regulator_gate_pin: GPIO22
regulator_zero_crossing_pin: GPIO23
Expand All @@ -57,9 +72,14 @@ packages:
power_meter:
url: https://github.com/XavierBerger/Solar-Router-for-ESPHome/
file: solar_router/power_meter_fronius.yaml
refresh: 5s
regulator:
url: https://github.com/XavierBerger/Solar-Router-for-ESPHome/
file: solar_router/regulator_triac.yaml
# file: solar_router/regulator_relay.yaml
refresh: 5s
solar_router:
url: https://github.com/XavierBerger/Solar-Router-for-ESPHome/
file: solar_router/solar_router_engine.yaml
refresh: 5s

3 changes: 2 additions & 1 deletion esp8266-proof-of-concept.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ api:
key: !secret api_key

ota:
password: !secret ota_password
- platform: esphome
password: !secret ota_password

# Define wifi connection
wifi:
Expand Down
1 change: 1 addition & 0 deletions esp8285-power-meter-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ api:

# Enable over-the-air updates
ota:
- platform: esphome

# WiFi connection
wifi:
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ plugins:
- git-revision-date-localized:
type: datetime
- glightbox
- include-markdown
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
esphome
mkdocs
mkdocs-git-revision-date-localized-plugin
mkdocs-glightbox
mkdocs-include-markdown-plugin
mkdocs-material
mkdocs-material-extensions
mkdocs-minify-plugin
mkdocs-git-revision-date-localized-plugin
mkdocs-glightbox
pymdown-extensions
2 changes: 1 addition & 1 deletion tools/update_documantation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pushd "${SCRIPT_DIR}/.." > /dev/null
git cliff > docs/changelog.md
code docs/changelog.md

read -r -p "Ready to publish? [Y/N]: " response
read -r -p "Ready to publish? [y/N]: " response

if [[ "$response" =~ ^[Yy]$ ]]; then
mkdocs gh-deploy
Expand Down

0 comments on commit 8fd96fc

Please sign in to comment.