Skip to content

Commit 6222efd

Browse files
Xavier BergerXavier Berger
authored andcommitted
DRAFT: Switch has to have priority. Button is a shortcut. Not working: to be updated.
1 parent 2339c39 commit 6222efd

3 files changed

Lines changed: 83 additions & 2 deletions

File tree

esp32-external_control.yaml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# ----------------------------------------------------------------------------------------------------
2+
# ESPHome configuration - This part depends on your hardware target
3+
# ----------------------------------------------------------------------------------------------------
4+
5+
esphome:
6+
name: solarrouter
7+
friendly_name: SolarRouter
8+
min_version: 2025.3.2
9+
10+
esp32:
11+
board: esp32dev
12+
framework:
13+
type: arduino
14+
15+
# Enable logging
16+
logger:
17+
baud_rate: 115200
18+
level: INFO
19+
logs:
20+
component: ERROR
21+
light: ERROR
22+
23+
# Enable Home Assistant API
24+
api:
25+
encryption:
26+
key: !secret api_encryption_key
27+
28+
29+
# Enable over-the-air updates
30+
ota:
31+
- platform: esphome
32+
password: !secret solar_router_ota_password
33+
34+
# Enable improv serial
35+
improv_serial:
36+
37+
# WiFi connection
38+
wifi:
39+
ssid: !secret wifi_ssid
40+
password: !secret wifi_password
41+
# If you have a WiFi activity plannification, you may have to update the reboot timeout (Default: 15min)
42+
reboot_timeout: 24h
43+
44+
# Activate web interface
45+
web_server:
46+
port: 80
47+
48+
# Define watchdog time (it should be greater than timeout)
49+
http_request:
50+
watchdog_timeout: 12s
51+
52+
# ----------------------------------------------------------------------------------------------------
53+
# Customisation
54+
# ----------------------------------------------------------------------------------------------------
55+
56+
# This part of the script is designed to be use for customisation. It shouldn't be necessary to
57+
# edit other part of the script to perform configuration.
58+
packages:
59+
solar_router:
60+
url: https://github.com/XavierBerger/Solar-Router-for-ESPHome/
61+
refresh: 1d
62+
files:
63+
- path: solar_router/common.yaml
64+
- path: solar_router/power_meter_fronius.yaml
65+
vars:
66+
power_meter_ip_address: "192.168.1.21"
67+
- path: solar_router/regulator_triac.yaml
68+
vars:
69+
regulator_gate_pin: GPIO22
70+
regulator_zero_crossing_pin: GPIO23
71+
- path: solar_router/engine_1dimmer.yaml
72+
vars:
73+
green_led_pin: GPIO19
74+
yellow_led_pin: GPIO18
75+
- path: solar_router/activate_switch.yaml
76+
vars:
77+
activate_switch_pin: GPIO7
78+
- path: solar_router/activate_press_button.yaml
79+
vars:
80+
activate_switch_pin: GPIO8
81+

solar_router/activate_press_button.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
binary_sensor:
22
- platform: gpio
33
pin:
4-
number: ${activate_pin}
4+
number: ${activate_button_pin}
55
mode: INPUT_PULLUP
66
name: "Activate Button"
77
on_press:

solar_router/activate_switch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ esphome:
1313
binary_sensor:
1414
- platform: gpio
1515
pin:
16-
number: ${activate_pin}
16+
number: ${activate_switch_pin}
1717
mode: INPUT_PULLUP
1818
name: "Activate Switch"
1919
id: activate_switch

0 commit comments

Comments
 (0)