Connect your Pylontech US2000/US3000 battery stack directly to Home Assistant using a USB-to-RS232/RS485 cable.
- Direct Serial Connection: Reads battery data directly from the Console port.
- Home Assistant Native: No MQTT or Docker containers required.
- Energy Dashboard Ready: Includes calculated Energy (kWh) sensors for proper dashboard Integration.
- Per-Battery Monitoring: Voltage, Current, SOC, Temperature, and Status for each module.
Note
USB Auto-Discovery: Currently, only the Prolic PL2303 scanner (VID 067B, PID 2303) is supported for auto-discovery. If you have a different adapter, it will not be automatically detected, but you can still manually select the port during configuration.
To add auto-discovery support for your device, please see CONTRIBUTING.md.
- Ensure you have HACS installed.
- Go to HACS > Integrations.
- Click the 3 dots (top right) > Custom repositories.
- Add the URL of this repository.
- Category: Integration.
- Click Add, then find and install Pylontech Serial.
- Restart Home Assistant.
- Locate your configuration directory: Find your Home Assistant
configfolder (whereconfiguration.yamllives). - Create custom_components: If it doesn't exist, create a folder named
custom_componentsinside yourconfigfolder. - Copy files: Copy the
pylontech_serialfolder fromcustom_components/in this repository to your Home Assistant'scustom_components/folder.- Resulting path:
/config/custom_components/pylontech_serial/
- Resulting path:
- Restart Home Assistant: This is crucial for HA to recognize the new component.
- Connect your Pylontech battery to the machine running Home Assistant via USB.
- In Home Assistant, go to Settings > Devices & Services.
- Click + ADD INTEGRATION in the bottom right.
- Search for Pylontech Serial.
- Select your Serial Port from the list.
- Configure the Baud Rate (Default 115200) and Battery Capacity (Default 2.4 kWh per module) if needed.
- Click Submit.
Ensure your battery DIP switches are configured correctly for communication. For US2000/US3000, all DIP switches OFF selects the default baud rate of 115200.
Pylontech US2000 with all DIP switches OFF
To track your battery usage in the Energy Dashboard:
- Go to Settings > Dashboards > Energy.
- Find the Battery Systems section and click Add Battery System.
- For Energy going in to the battery, select:
sensor.pylontech_stack_system_energy_charged - For Energy coming out of the battery, select:
sensor.pylontech_stack_system_energy_discharged - Click Save.
- No data?: Check that the correct serial port is selected and that the cable is plugged into the Console port of the Master battery (not CAN/RS485 unless using a specific adapter).
- Permissions: If running Home Assistant Core in Docker (not OS), ensure the device is passed through (
--device /dev/ttyUSB0).