Enable UART pull-up
Add explicit pull-up configuration for the UART RX pin and disable the logger (baud_rate: 0) to avoid pin conflicts with an RS485 converter. Updates applied to esphome-smartmeter.yaml and both README (EN/CZ) files with notes explaining that esp-idf > 5.x defaults pins to floating so RX needs pull-up, and that the logger was turned off because the same pins are shared with the RS485 converter.main
parent
1db8e48acf
commit
81bbd19c09
13
README.cz.md
13
README.cz.md
|
|
@ -180,10 +180,17 @@ Konfigurační možnosti jsou:
|
||||||
Až bude komponenta fungovat, můžeš nastavit `show_log` na `false`, aby se logy přestaly zobrazovat.
|
Až bude komponenta fungovat, můžeš nastavit `show_log` na `false`, aby se logy přestaly zobrazovat.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
logger:
|
||||||
|
baud_rate: 0
|
||||||
|
|
||||||
uart:
|
uart:
|
||||||
id: bus_1
|
id: bus_1
|
||||||
|
rx_pin:
|
||||||
|
number: GPIO21
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
pullup: true
|
||||||
tx_pin: GPIO20
|
tx_pin: GPIO20
|
||||||
rx_pin: GPIO21
|
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
data_bits: 8
|
data_bits: 8
|
||||||
parity: NONE
|
parity: NONE
|
||||||
|
|
@ -194,6 +201,10 @@ dlms_push:
|
||||||
uart_id: bus_1
|
uart_id: bus_1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
V novějších verzích ESPHome (esp-idf > 5.x) je potřeba pro piny `uart` nastavit pull-up, jinak komunikace nebude fungovat. Proto6e výchozí stav pinů byl změněn na "floating".
|
||||||
|
|
||||||
|
Používám stejné piny pro RS485 převodník jako pro logger, takže jsem musel logger vypnout nastavením `baud_rate` na 0. Pokud chceš logger ponechat povolený, můžeš použít jiné piny pro logger.
|
||||||
|
|
||||||
### Number sensor (`sensor`)
|
### Number sensor (`sensor`)
|
||||||
Moje spotřeba elektřiny se měří v kWh, ale elektroměr odesílá hodnotu ve Wh. Proto používám lambda filtr k převodu hodnoty z Wh na kWh vydělením 1000.
|
Moje spotřeba elektřiny se měří v kWh, ale elektroměr odesílá hodnotu ve Wh. Proto používám lambda filtr k převodu hodnoty z Wh na kWh vydělením 1000.
|
||||||
|
|
||||||
|
|
|
||||||
13
README.md
13
README.md
|
|
@ -175,10 +175,17 @@ The configuration options are:
|
||||||
Disable the log onece everything is working fine.
|
Disable the log onece everything is working fine.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
logger:
|
||||||
|
baud_rate: 0
|
||||||
|
|
||||||
uart:
|
uart:
|
||||||
id: bus_1
|
id: bus_1
|
||||||
|
rx_pin:
|
||||||
|
number: GPIO21
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
pullup: true
|
||||||
tx_pin: GPIO20
|
tx_pin: GPIO20
|
||||||
rx_pin: GPIO21
|
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
data_bits: 8
|
data_bits: 8
|
||||||
parity: NONE
|
parity: NONE
|
||||||
|
|
@ -189,6 +196,10 @@ dlms_push:
|
||||||
uart_id: bus_1
|
uart_id: bus_1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In newer versions of ESPHome (esp-idf > 5.x) , the `uart` pins need to be pulled up, otherwise the communication will not work. This is because the default state of the pins was changed to floating.
|
||||||
|
|
||||||
|
I am using the same pins for the RS485 converter as for the logger, so I had to disable the logger by setting the `baud_rate` to 0. You can use different pins for the logger if you want to keep it enabled.
|
||||||
|
|
||||||
### Number sensor (`sensor`)
|
### Number sensor (`sensor`)
|
||||||
My electricity consumption is measured in kWh, but the meter sends the value in Wh. Therefore, I use a lambda filter to convert the value from Wh to kWh by dividing it by 1000.
|
My electricity consumption is measured in kWh, but the meter sends the value in Wh. Therefore, I use a lambda filter to convert the value from Wh to kWh by dividing it by 1000.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ esp32:
|
||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
logger:
|
logger:
|
||||||
|
baud_rate: 0
|
||||||
|
|
||||||
# Enable Home Assistant API
|
# Enable Home Assistant API
|
||||||
api:
|
api:
|
||||||
|
|
@ -34,7 +35,11 @@ dlms_push:
|
||||||
|
|
||||||
uart:
|
uart:
|
||||||
id: bus_1
|
id: bus_1
|
||||||
rx_pin: GPIO21
|
rx_pin:
|
||||||
|
number: GPIO21
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
pullup: true
|
||||||
tx_pin: GPIO20
|
tx_pin: GPIO20
|
||||||
baud_rate: 9600
|
baud_rate: 9600
|
||||||
data_bits: 8
|
data_bits: 8
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue