Skip to content

Commit 2aa1139

Browse files
committed
Update Shelly Pro 2 in light of Shelly Pro 2 PM
1 parent b7d747d commit 2aa1139

File tree

1 file changed

+84
-46
lines changed

1 file changed

+84
-46
lines changed

src/docs/devices/Shelly-Pro-2/index.md

+84-46
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,57 @@ board: esp32
88

99
Information about the pinout and internals of the Shelly Pro 2.
1010

11-
It's the same board as the Shelly Pro 1. The only difference is the addition of a second relay.
11+
It's the same board as the [Shelly Pro 1](Shelly-Pro-1). The only
12+
difference is the addition of a second relay.
1213

1314
![Shelly Pro 2](shelly-pro-2.jpg)
1415

1516
## Pinout
1617

17-
ESP32 DOWDQ6| SN74HC595B | LAN8720A | Component
18-
------------|------------|----------|----------
19-
GPIO 4 |RCLK | |
20-
GPIO 13 |SER | |
21-
GPIO 14 |SRCLK | |
22-
GPIO 17 | |CLKIN |
23-
GPIO 18 | |MDIO |
24-
GPIO 19 | |TXD0 |
25-
GPIO 21 | |TXEN |
26-
GPIO 22 | |TXD1 |
27-
GPIO 23 | |MDC |
28-
GPIO 25 | |RXD0 |
29-
GPIO 26 | |RXD1 |
30-
GPIO 27 | |CRS_DV |
31-
GPIO 35 | | |Reset Button
32-
GPIO 36 | | |ADC Temperature
33-
GPIO 38 | | |Switch input 1
34-
GPIO 39 | | |Switch input 2
18+
ESP32 DOWDQ6 | Component
19+
-------------|-----------
20+
GPIO 4 |SN74HC595B SPI CS
21+
GPIO 12 |SPI MISO
22+
GPIO 13 |SPI MOSI
23+
GPIO 14 |SPI CLK
24+
GPIO 17 |LAN8720A CLKIN
25+
GPIO 18 |LAN8720A MDIO
26+
GPIO 19 |LAN8720A TXD0
27+
GPIO 21 |LAN8720A TXEN
28+
GPIO 22 |LAN8720A TXD1
29+
GPIO 23 |LAN8720A MDC
30+
GPIO 25 |LAN8720A RXD0
31+
GPIO 26 |LAN8720A RXD1
32+
GPIO 27 |LAN8720A CRS_DV
33+
GPIO 35 |Reset Button
34+
GPIO 36 |ADC Temperature 1
35+
GPIO 37 |ADC Temperature 2
36+
GPIO 38 |Switch input 1
37+
GPIO 39 |Switch input 2
3538

3639
## Shift register
3740

3841
A shift register is controlling the WIFI RGB LEDs and the 2 relays.
3942

4043
![Shift Register](shift-register.jpg)
4144

42-
SN74HC595B| Component
43-
----------|----------
44-
QA |Relay 1 + Out 1 LED
45-
QB |Relay 2 + Out 2 LED
46-
QC |WIFI RGB LED (Blue)
47-
QD |WIFI RGB LED (Green)
48-
QE |WIFI RGB LED (Red)
49-
QF |NC
50-
QG |NC
51-
QH |NC
45+
SN74HC595B | Component
46+
-----------|----------
47+
QA |Relay 1 + Out 1 LED
48+
QB |Relay 2 + Out 2 LED
49+
QC |WIFI RGB LED (Blue)
50+
QD |WIFI RGB LED (Green)
51+
QE |WIFI RGB LED (Red)
52+
QF |NC
53+
QG |NC
54+
QH |NC
5255

53-
The Out 1 status LED and the relay 1 are on the same output. The same is true for the Out 2 status LED and the relay 2.
54-
Turning on the relay turns the corresponding LED on.
56+
The Out 1 status LED and the relay 1 are on the same output. The same is true
57+
for the Out 2 status LED and the relay 2. Turning on the relay turns the
58+
corresponding LED on.
5559

56-
The WIFI LED is an RGB LED. By turning each component on or off, you have access to 8 configurations:
60+
The WIFI LED is an RGB LED. By turning each component on or off, you have
61+
access to 8 configurations:
5762

5863
R|G|B| Color
5964
-|-|-|-------
@@ -75,7 +80,6 @@ Note that the pin pitch is 1.27mm, so standard 2.54mm Dupont cables won't work.
7580
## Basic Configuration
7681

7782
```yaml
78-
7983
esphome:
8084
name: shelly-pro-2
8185

@@ -90,7 +94,7 @@ logger:
9094
api:
9195

9296
ota:
93-
97+
platform: esphome
9498

9599
wifi:
96100
ssid: !secret wifi_ssid
@@ -108,21 +112,29 @@ wifi:
108112

109113
captive_portal:
110114

115+
spi:
116+
clk_pin: GPIO14
117+
mosi_pin: GPIO13
118+
miso_pin:
119+
number: GPIO12
120+
ignore_strapping_warning: true
121+
111122
button:
123+
- platform: shutdown
124+
id: do_shutdown
112125
- platform: restart
113-
id: restart_1
126+
name: "Restart"
127+
id: do_restart
114128

115129
binary_sensor:
116130
- platform: gpio
117131
id: reset_button
118132
pin:
119133
number: 35
120134
inverted: true
121-
on_click:
122-
min_length: 200ms
123-
max_length: 1000ms
135+
on_release:
124136
then:
125-
button.press: restart_1
137+
button.press: do_restart
126138

127139
- platform: gpio
128140
id: input1
@@ -142,17 +154,43 @@ binary_sensor:
142154

143155
sensor:
144156
- platform: adc
145-
id: temp_voltage
157+
id: temp_voltage1
146158
pin: GPIO36
147159
attenuation: auto
148160
- platform: resistance
149-
id: temp_resistance
150-
sensor: temp_voltage
161+
id: temp_resistance1
162+
sensor: temp_voltage1
163+
configuration: DOWNSTREAM
164+
resistor: 10kOhm
165+
- platform: ntc
166+
sensor: temp_resistance1
167+
name: Temperature 1
168+
unit_of_measurement: "°C"
169+
accuracy_decimals: 1
170+
icon: "mdi:thermometer"
171+
calibration:
172+
b_constant: 3350
173+
reference_resistance: 10kOhm
174+
reference_temperature: 298.15K
175+
on_value_range:
176+
- above: 90
177+
then:
178+
- switch.turn_off: relay1
179+
- switch.turn_off: relay2
180+
- button.press: do_shutdown
181+
182+
- platform: adc
183+
id: temp_voltage2
184+
pin: GPIO37
185+
attenuation: auto
186+
- platform: resistance
187+
id: temp_resistance2
188+
sensor: temp_voltage2
151189
configuration: DOWNSTREAM
152190
resistor: 10kOhm
153191
- platform: ntc
154-
sensor: temp_resistance
155-
name: Temperature
192+
sensor: temp_resistance2
193+
name: Temperature 2
156194
unit_of_measurement: "°C"
157195
accuracy_decimals: 1
158196
icon: "mdi:thermometer"
@@ -165,11 +203,11 @@ sensor:
165203
then:
166204
- switch.turn_off: relay1
167205
- switch.turn_off: relay2
206+
- button.press: do_shutdown
168207

169208
sn74hc595:
170209
- id: 'sn74hc595_hub'
171-
data_pin: GPIO13
172-
clock_pin: GPIO14
210+
type: spi
173211
latch_pin: GPIO4
174212
sr_count: 1
175213

0 commit comments

Comments
 (0)