Hi, Im a total newbie to this forum, but ive been looking at topics on the Pylontech batteries integration & im very very stuck.
I am using an ESP8266 D1 mini & a RS232 to TTL interface.
The above setup appears to work, but the battery info only gets as far as the ESP 8266 & is visible in the ESPHome logs
The HA can see the ESP & the fields requested, but nothing appeares in the HA, I can select the heading for the data but below this is “unknown” (sorry if im not using the correct terms here but Im also new to HA)
I havent worked out how to copy & paste my yaml code yet, but when I do, i will update this topic.
If anyone can cast any light on this, that would be great.
If anyone would like any further info, please just shout out & I will try to post it here
Here is my yaml code - most of it is coppied from a range of posts on this forum & on github.
# Board: Wemos D1 Mini (ESP8266) (Wemos)
# Definition: definitions/boards/d1_mini/manifest.yaml
esphome:
name: pylontech-d1-mini
friendly_name: Pylontech D1 mini
esp8266:
board: d1_mini
external_components:
- source: github://oxan/esphome-stream-server
#stream-server #-uart:
#id: uart_bus
# add further configuration for the UART here
stream_server:
uart_id: uart_pylon
port: 1234
logger:
baud_rate: 1200
#******************************
# Configure UART connected to the Pylontech console port (via RS232-to-TTL adapter like MAX3232)
uart:
- id: uart_pylon
tx_pin: GPIO5 # Adjust to your wiring (e.g., GPIO1 / TX)
rx_pin: GPIO4 # Adjust to your wiring (e.g., GPIO3 / RX)
baud_rate: 115200 # was 9600
data_bits: 8
parity: NONE
stop_bits: 1
rx_buffer_size: 4096
#rx_full_threshold: 64
#rx_timeout: 10
pylontech:
id: pylontech_battery
uart_id: uart_pylon
update_interval: 15s
sensor:
- platform: pylontech
pylontech_id: pylontech_battery
battery: 1
voltage:
name: Battery Voltage
id: battery_voltage
unit_of_measurement : V
current:
name: Battery Current
temperature:
name: Battery Temperature
coulomb:
name: state_of_charge_(SoC)
text_sensor:
- platform: pylontech
pylontech_id: pylontech_battery
battery: 1
base_state:
entity_category: ""
name: Battery State
voltage_state:
entity_category: ""
name: Battery Voltage State
current_state:
name: Battery Current State
temperature_state:
name: Battery Temperature State
#*******************************
api:
Key =""
Secret bits & bobs in this space
captive_portal:
This is just an afterthought addition, I have also just checked the HA Logs and there is no reported errors for this device.
Here is a screenshot of the log file in ESPhome for the D1 mini / RS232 to TTL converter
