Skip to content

The PytesEbox component allows you to pull data from Pytes Batteries into ESPHome.

License

Notifications You must be signed in to change notification settings

oxynatOr/esphome-pytes_e_box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pytes E-Box

The PytesEbox component allows you to pull data from Pytes Batteries into ESPHome. It uses UART for communication.

Once configured, you can use sensors as described below for your projects.

pytesebox

Instructions for setting up Pytes E-Box in ESPHome.

Hardware Setup

You can connect to Pytes E-Box using the port labeled Console. Any connections via CAN or RS485 (e.g. to an inverter) are untouched and remain functional.

The console port offers a RS232 interface using a RJ45 connector. The voltage levels are not TTL-compatible. A RS232 transceiver must be placed between the Batteries and the ESPHome device. MAX3232-based transceivers have been tested and work well.

If you have multiple batteries you need to connect to the master battery's console port.

rj45_pinout

ESP Pin Transceiver RJ45 Pin Function
GPIO 6 RX 3 TX
GND GND 4 Ground
GPIO 5 TX 6 RX
3v3 VCC NC Power

Tested devcies:

Manufacturer Devcie
Pytes E-BOX-48100R-C
Pytes E-BOX-48100V-D (V5)

Component/Hub

pytes_e_box:

Configuration variables:

  • id (Required): The id to use for this PytesEbox component.
  • uart_id (Optional): The uart Bus ID.
  • batteries (Required): Amount of Batteries. Defaults to 1
  • update_interval (Optional): The interval to check the sensor. Defaults to 60s.
  • poll_timeout (Optional): --. Defaults to 4s.
  • command_idle_time (Optional): --. Defaults to 150ms.

Sensor

All values are reported for every Pytes E-Box battery individually.

# Example configuration entry
sensor:
  - platform: pytes_e_box
    pytes_e_box_id: pytes01
    battery: 1
    cells:
     - cell: 1
        voltage:
          name: "BatteryCell 1.1 Voltage"         
    voltage:
      name: "Battery1 Voltage"
    current:
      name: "Battery1 Current"
    coulomb:
      name: "Battery1 State of Charge"

Configuration variables:

  • pytes_e_box_id (Required): Manually specify the ID of the pytes instance if there are multiple.

  • battery (Required): Which battery to monitor. 1 stands for the main battery, 2..6 for child batteries.

  • voltage (Optional): Voltage of the battery. All options from Sensor.

  • current (Optional): Current flowing into the battery. Negative when discharging. All options from Sensor.

  • coulomb (Optional): State of Charge in percent. All options from Sensor.

  • temperature (Optional): Temperature. All options from Sensor.

  • temperature_low (Optional): Historic minimum temperature. All options from Sensor.

  • temperature_high (Optional): Historic maximum temperature. All options from Sensor.

  • voltage_low (Optional): Voltage of the lowest cell. All options from Sensor.

  • voltage_high (Optional): Voltage of the highest cell. All options from Sensor.

  • soc_voltageh (Optional): -- All options from Sensor.

  • total_coulomb (Optional): -- All options from Sensor.

  • real_coulomb (Optional): -- All options from Sensor.

  • total_power_in (Optional): -- All options from Sensor.

  • total_power_out (Optional): -- All options from Sensor.

  • work_status (Optional): -- All options from Sensor.

  • cell_count (Optional): -- All options from Sensor.

  • cells (Optional): Dictionary of Battery cells.

    • cell (Required): Which battery cell to monitor. 0 to 15.
      • voltage (Optional): Voltage of the battery. All options from Sensor.
      • current (Optional): Current flowing into the battery. Negative when discharging. All options from Sensor.
      • coulomb (Optional): State of Charge in percent. All options from Sensor.
      • temperature (Optional): Temperature. All options from Sensor.

Text Sensor

text_sensor:
  - platform: pytes_e_box
    pytes_e_box_id: pytes01
    battery: 1    
    base_state:
      id: bat1_base_state
      name: "Battery1 Base State"

Configuration variables:

  • pytes_e_box_id (Required): Manually specify the ID of the pytes instance if there are multiple.

  • battery (Required): Which battery to monitor. 1 stands for the main battery, 2..6 for child batteries.

  • base_state (Optional): Base state. Usually reads Dischg, Charge or Idle. All options from TextSensor.

  • voltage_state (Optional): Voltage state. Usually reads Normal. All options from TextSensor.

  • current_state (Optional): Current state. Usually reads Normal. All options from TextSensor.

  • temperature_state (Optional): Temperature state. Usually reads Normal. All options from TextSensor.

  • barcode (Optional): -- . All options from TextSensor.

  • dev_type (Optional): -- . All options from TextSensor.

  • firm_version (Optional): -- . All options from TextSensor.

  • coulomb_status (Optional): -- . All options from TextSensor.

  • bat_status (Optional): -- . All options from TextSensor.

  • cmos_status (Optional): -- . All options from TextSensor.

  • dmos_status (Optional): -- . All options from TextSensor.

  • bat_protect_ena (Optional): -- . All options from TextSensor.

  • pwr_protect_ena (Optional): -- . All options from TextSensor.

  • bat_events (Optional): -- . All options from TextSensor.

  • power_events (Optional): -- . All options from TextSensor.

  • system_fault (Optional): -- . All options from TextSensor.

  • cells (Optional): Dictionary of Battery cells.

    • cell (Required): Which battery cell to monitor. 0 to 15.
      • base_state (Optional): Base state. Usually reads Dischg, Charge or Idle. All options from TextSensor.
      • voltage_state (Optional): Voltage state. Usually reads Normal. All options from TextSensor.
      • current_state (Optional): Current state. Usually reads Normal. All options from TextSensor.
      • temperature_state (Optional): Temperature state. Usually reads Normal. All options from TextSensor.

About

The PytesEbox component allows you to pull data from Pytes Batteries into ESPHome.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published