Closed CommanderRedYT closed 7 months ago
Which GPIOs did you use as RX/TX pins? Could you provide a photo of your wiring and the configuration YAML?
I used GPIO4 and GPIO5 in my first try, and then switched to the 2nd Hardware Serial Port (GPIO16 & GPIO17).
substitutions:
name: dps
esphome:
name: dps-3005
friendly_name: DPS-3005
comment: "Monitor and control a RDTech Digital Control Power Supply (DPS) via UART-TTL"
project:
name: "syssi.esphome-dps"
version: 1.1.0
esp32:
board: esp32dev
external_components:
- source: github://syssi/esphome-dps@main
refresh: 0s
uart:
id: uart_0
baud_rate: 9600
tx_pin: GPIO17
rx_pin: GPIO16
debug:
direction: BOTH
modbus:
id: modbus0
uart_id: uart_0
send_wait_time: 0ms
dps:
id: dps0
modbus_id: modbus0
update_interval: 5s
current_resolution: AUTO
sensor:
- platform: dps
output_voltage:
name: "${name} output voltage"
output_current:
name: "${name} output current"
output_power:
name: "${name} output power"
input_voltage:
name: "${name} input voltage"
voltage_setting:
name: "${name} voltage setting"
current_setting:
name: "${name} current setting"
backlight_brightness:
name: "${name} backlight brightness"
firmware_version:
name: "${name} firmware version"
text_sensor:
- platform: dps
protection_status:
name: "${name} protection status"
device_model:
name: "${name} device model"
switch:
- platform: dps
output:
name: "${name} output"
key_lock:
name: "${name} key lock"
number:
- platform: dps
voltage_setting:
name: "${name} voltage setting"
current_setting:
name: "${name} current setting"
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
encryption:
key: "--NOT-TODAY--"
ota:
password: "--NOT-TODAY--"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Dps-3005 Fallback Hotspot"
password: "--NOT-TODAY--"
captive_portal:
I wired it like this: https://johan.kanflo.com/wp-content/uploads/2017/06/DPS5005-comms-UART.jpg (Not my picture, but is same as i have)
Okay, somehow it is working now. Did not change anything tho.
I have connected a ESP32 (NodeMCU-32 V1.3) to a DPS3005. Mine came without a connector, but i just soldered some cables to it.
I double-checked all connections, tried to switch RX and TX, tried different Pins but still, it does not work...