oxynatOr
(Oxynat Or)
September 4, 2024, 1:01pm
1
Ahoy
i’m looking for some guys that can help me test my Component for Pytes Battery (E-Box)
The PytesEbox component allows you to pull data from Pytes Batteries into ESPHome.
It uses UART for communication.
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 transceive r 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.
ESP Pin
Transceiver
RJ45 Pin
Function
GPIO 6
RX
3
TX
GND
GND
4
Ground
GPIO 5
TX
6
RX
3v3
VCC
NC
Power
Commands:
Command
Info
Note
pwr
Power data show - pwr [index]
pwr N
Power data show - pwr [index]
bat N
Battery data show - bat [pwr][index]
soh N
State of health - soh [addr]
Not ready yet, my FW has no soh
Tested devcies:
Manufacturer
Devcie
Pytes
E-BOX-48100R-C
Pytes
E-BOX-48100V-D (V5)
Pytes
E-BOX-48100R-B (pending)
Tested EPS:
Manufacturer
Devcie
Waveshare
S3-Zero
-
WROOM32 D1 mini
oxynatOr
(Oxynat Or)
September 4, 2024, 2:27pm
2
Reserved for future post.
Hello. I am trying to install this on Pytes V5 battery but I can’t compile it. where do I put the “components” folder? “homeassistant/esphome/components/pytes_e_box” doesn’t work.
oxynatOr
(Oxynat Or)
October 6, 2024, 2:30pm
4
Hello, and sorry for the late replay
you need to use the github implementation, like this:
external_components:
- source: github://oxynatOr/esphome-pytes_e_box@frim_curr_date-sensor_fix
components: [ pytes_e_box ]
refresh: 5s
thanks for giving it a try
It works on Pytes V5. I only have 1 battery so I cannot test multiple battery. I checked: Battery current, SOC, Temperature, Voltage, Cell Voltage/Current/Base/temperature State, Events, Barcode, State, etc. It doesn’t show the cells voltages. It only show Normal State. Can you modify the code?
oxynatOr
(Oxynat Or)
October 10, 2024, 10:14am
6
uh that looks nice !
i will check what i can do at the weekend.
are you familiar with : how to connect to console and send commands:
like
pwr
pwr 1
bat 1
soh 1
maybe the output of V5 is bit different, so i could implement this as well
This is the Putty output:
1 Like
oxynatOr
(Oxynat Or)
October 11, 2024, 1:59pm
8
thanks a lot!!!
okay the firmware/output is the same, even the SoH-Status is missing ^^
i will give it a shoot tomorrow (Saturday).
just one more question, what “IoT” device u are using?
i did with an ESP-32-S3-Mini/Zero, and had no luck with an C3-SuperMini.
Cya-
oxynatOr
(Oxynat Or)
October 11, 2024, 2:09pm
9
sensor:
- platform: pytes_e_box
pytes_e_box_id: ${pytes_e_box_id}
battery: ${battery_num}
cells:
- cell: 0
voltage:
name: "${cell_prefix} ${battery_num}.0 Voltage"
temperature:
name: "${cell_prefix} ${battery_num}.0 Temperature"
coulomb:
name: "${cell_prefix} ${battery_num}.0 Coulomb"
current:
name: "${cell_prefix} ${battery_num}.0 Current"
can you re-check the config file pls.
/e: here is an example of mine:
oxynatOr:
coulomb
It works now. I see the cell voltage.
The “IoT” devices I used are Esp32 Wroom and Esp32 D1 mini( GPIO16-RX, GPIO17-TX
Thank you for the code!
oxynatOr
(Oxynat Or)
October 12, 2024, 7:04am
11
cool!!
if you see any strange values or bug, or new thing, let me know!
eugen
November 14, 2024, 8:24am
12
Hi, I would like to test this.
I have 4x E-Box 48100R (B Version) and a lot of NodeMCU with ESP32 or ESP8266. Will order a MAX323 now.
I already had some experience with ESPHome and build a Modbus Adapter for my wallbox.
But I think my knowledge in not enough to understand, how to install/implement the software part.
Can you write a little tutorial?
Thanks
Eugen
oxynatOr
(Oxynat Or)
November 14, 2024, 9:06am
13
Ahoy!
sure, can you tell me where the issue start, and what part need to be explained?
i would start with the ESP32, get it displayed in ESPHome and HA.
when this is working, you can link to the component.
external_components:
- source: github://oxynatOr/esphome-pytes_e_box@frim_curr_date-sensor_fix
components: [ pytes_e_box ]
refresh: 5s
with the MAX in place, you can add this:
uart:
tx_pin: GPIO5
rx_pin: GPIO6
baud_rate: 115200
rx_buffer_size: 1024
id: uart01
pytes_e_box:
- id: pvbatt
uart_id: uart01
update_interval: 30s
batteries: 4
poll_timeout: 4s
command_idle_time: 150ms
and see what will happen.
but pls. tell me where u get stuck, and i will explain it to you.
btw, thanks for helping me!