From 79c6b6800edb53c3b2fd7eff90ccb8bb84c1750c Mon Sep 17 00:00:00 2001 From: Andreas Bichinger Date: Thu, 8 Feb 2024 17:42:43 +0100 Subject: [PATCH 1/2] Update README --- README.md | 66 ++++++++++++++++++++++++++++++++++++++------- esphome/config.yaml | 6 ++++- 2 files changed, 61 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index fc0ae34..706eb9b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # An ESP32 CanBus shield - made for hoval homevent, but for all canbus applications - -![alt text](https://github.com/nliaudat/esp_canbus/blob/main/pcb/3d_view.PNG "board") - +[![Wiki badge](https://img.shields.io/badge/Wiki-up_to_date-dark_green)](https://github.com/nliaudat/esp_canbus/wiki) +[![Build badge](https://github.com/nliaudat/esp_canbus/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/nliaudat/esp_canbus/actions?query=workflow%3ABuild+branch%3Amain) + +![alt text](pcb/3d_view.PNG "board") + + ## Functionalities : * Compatible with 1000 or 900 mil width ESP devkit @@ -18,13 +21,56 @@ * ESP32-WROOM-32D costs approx 3.8$ * Box is 3D printed or fit in a 86x86 electrical box -## Firmware : -Look at wiki to configure for your your Hoval model : 'FV', 'GLT', 'GW', 'HKW', 'HV','MWA', 'PS','SOL', 'WEZ') -* Actually runs under Esphome to link hoval homevent devices, but can be general purpose -* (to update ventilation modulation, you must be in "Constant mode") -* Webserver enabled -* Hassio recognized - +## Firmware + +

+ + +
+ web interface at http://canbus.local/ +

+ +### Features + +* Powered by [ESPHome](https://esphome.io/) +* Webserver enabled at [canbus.local](http://canbus.local/) +* Automatically recognized by [Home Assistant](https://www.home-assistant.io/) + +### Installation + +#### Requirements + +Make sure you have Python and ESPHome installed.
+To install ESPHome you can follow the [manual installation guide](https://esphome.io/guides/installing_esphome) or use [Docker](https://esphome.io/guides/getting_started_command_line#installation). + +You can validate your installation by running + +```bash +> esphome version +Version: 2023.11.6 +``` + +#### Firmware configuration + +Enter your Wifi SSID and password in `secrets.yaml`.
+Then open `config.yaml` and make the following changes: +1. Set `can_tx_pin` and `can_rx_pin` +2. Update the device list. You can find the list of your hoval devices in your room control unit under maintenance. (e.g. `HV(8)` is written as `TT_HV_addr: "8"`) +3. Select your desired presets. All presets are located at [`esphome/src/preset`](https://github.com/nliaudat/esp_canbus/tree/main/esphome/src/preset).
e.g. to select the HV preset in French: + +```yaml +packages: + # ... + hv_sensors: !include src/preset/HV/sensors_fr.yaml + hv_inputs: !include src/preset/HV/inputs_fr.yaml +``` + +If you want to create your own preset or need other datapoints have a look at [`esphome/hoval_data_processing`](https://github.com/nliaudat/esp_canbus/tree/main/esphome/hoval_data_processing) + +#### Flash the firmware + +Connect your ESP32 via USB to your computer. (Only required for the first time, subsequent installations can be done over WiFi)
+Then run `esphome run config.yaml` ## Licence: * Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC-BY-NC-SA) diff --git a/esphome/config.yaml b/esphome/config.yaml index efa75a4..6ccdb07 100644 --- a/esphome/config.yaml +++ b/esphome/config.yaml @@ -10,7 +10,10 @@ substitutions: ### canbus can_tx_pin: "GPIO22" #GPIO5 can_rx_pin: "GPIO21" #GPIO4 - TT_HV_addr: "8" #hoval homevent can_id (you can find it in room control unit (toptronic) under maintenance + + ### Device list + ### You can find it in room control unit (toptronic) under maintenance + TT_HV_addr: "8" TT_BM_addr: "8" TT_WEZ_addr: "1" @@ -30,6 +33,7 @@ packages: switch: !include src/switch.yaml # debug: !include src/debug.yaml + ### Presets hv_sensors: !include src/preset/HV/sensors_en.yaml hv_inputs: !include src/preset/HV/inputs_en.yaml # wez_sensors: !include src/preset/WEZ/sensors_en.yaml From d9e951d5eb5f7eee0eb8b6228a5ef1f77f4e1515 Mon Sep 17 00:00:00 2001 From: Andreas Bichinger Date: Thu, 8 Feb 2024 18:00:46 +0100 Subject: [PATCH 2/2] Add build workflow --- .github/secrets.yaml | 7 +++++++ .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/secrets.yaml create mode 100644 .github/workflows/build.yml diff --git a/.github/secrets.yaml b/.github/secrets.yaml new file mode 100644 index 0000000..7d93090 --- /dev/null +++ b/.github/secrets.yaml @@ -0,0 +1,7 @@ +wifi_ssid_1: "ssid-1" +wifi_password_1: "12345678" +wifi_ssid_2: "ssid-2" +wifi_password_2: "12345678" +wifi_ssid_3: "ssid-3" +wifi_password_3: "12345678" +fallback_hotspot_password: "canbus-fallback" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..7d8ff9d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Install ESPHome + run: | + python3 -m venv venv + source venv/bin/activate + pip3 install wheel esphome + - name: Setup secrets.yaml + run: cat .github/secrets.yaml > esphome/secrets.yaml + - name: Build firmware + run: venv/bin/esphome compile esphome/config.yaml