Comments (11)
Haha half a day behind me and this nonsense.
just set the uart to
dummy_receiver: false
And the CRC check is ok.
Tahnks for topic: #42 (comment)
from esphome-pipsolar.
is it possible to use the white connector for communication via uart?
from esphome-pipsolar.
Could you provide some more photos (top and bottom side of the PCB). I'm looking for some labels and connections between the different components.
from esphome-pipsolar.
i have already started the pin mapping. When I have it, at least from the white connector, I will send it
from esphome-pipsolar.
so far on paper. mapped to optocouplers
from esphome-pipsolar.
Do you have access to a logic analyzer?
from esphome-pipsolar.
What do you mean? that I can get inside the inverter? or analyze the digital output because I have a handheld oscilloscope.
from esphome-pipsolar.
Just for interest, I tested solar-assistant and it works without problems.
from esphome-pipsolar.
today there was a failure of the connection between the USB and the solar assistant. So it made me look for another solution again.
I am looking for a similar board for communication with my converter, see:
https://powerforum.co.za/topic/2359-axpert-5kva-pc-board-burned/
And I also found a similar scheme:
https://forums.aeva.asn.au/viewtopic.php?p=66395#p66395
I tried one more thing, namely communication on Pine1 TX and pine 2 RX. If USB is connected, both of them show communication using the oscillator. As soon as I disconnect both lines are silent. But I would expect the Sender pin to still be up and running.
It looks like some kind of communication between them must take place at the beginning for the converter to start sending something. Does it work the same for other converters with RS232 communication port?
Would it be enough to connect the isolation of the RX TX line (pin 1 and 2) to the esphome through the opoto? Or is it more complicated than that?
from esphome-pipsolar.
Would it be enough to connect the isolation of the RX TX line (pin 1 and 2) to the esphome through the opoto? Or is it more complicated than that?
No. That's all! You could enable the debug mode of the uart
component to dump all traffic and start with a single pin (RX).
from esphome-pipsolar.
Hello. I'm back to testing again today.
So far I have been working via solar-assitant and USB port, but the reliability of the connection fluctuates and I can't imagine adding more peripherals to the RPI zero2. That's why it made me try esphome again.
Here is the result:
I physically connected 4 wires to the output connector of the converter.
From the mountain:
Pin1 RX -> AI -> AO -> TX
Pin2 TX -> BO -> BI -> RX
Pin3 VCC 5V -> V2 -> V1 -> 3V3
Pin4 GND -> G2 -> G1 -> GND
Pin5 NC
Pin6 NC
Subsequently, I tried different types of TTL=RS232
In the end I stuck with this one, which is also an optical isolator and works:
https://vi.aliexpress.com/item/1005005643287661.html
But I have a problem. Output values go to uart debug:
[06:55:42][D][uart_debug:158]: >>> "QPIRI\xF8T\r"
[06:55:42][D][pipsolar:926]: Sending polling command : QPIRI with length 5
[06:55:43][D][uart_debug:158]: <<< "(230.0 13.0 230.0 50.0 13.0 3000 3000 24.0 24.0 21.7 29.0 27.6 2 20 030 0 2 1 1 01 0 0 28.0 0 1\x13\x05\r"
[06:55:43][D][pipsolar:860]: checking crc on incoming message
[06:55:43][D][pipsolar:870]: CRC NOK expected: 6F A6 but got: 13 5
[06:55:43][D][uart_debug:158]: >>> "QPIGS\xB7\xA9\r"
[06:55:43][D][pipsolar:926]: Sending polling command : QPIGS with length 5
[06:55:44][D][uart_debug:158]: <<< "(246.2 49.9 230.0 49.9 0322 0224 010 368 26.02 002 100 0050 0002 084.5 25.96 00005 00110110 00 00 00073 010\xB6\x05\r"
[06:55:44][D][pipsolar:860]: checking crc on incoming message
[06:55:44][D][pipsolar:870]: CRC NOK expected: 99 DB but got: B6 5
[06:55:44][D][uart_debug:158]: >>> "QPIGS2h-\r"
[06:55:44][D][pipsolar:926]: Sending polling command : QPIGS2 with length 6
[06:55:44][D][uart_debug:158]: <<< "(NAKss\r"
[06:55:49][D][pipsolar:843]: timeout command to poll: QPIGS2
[06:55:49][D][uart_debug:158]: >>> "QMODI\xC1\r"
[06:55:49][D][pipsolar:926]: Sending polling command : QMOD with length 4
[06:55:49][D][uart_debug:158]: <<< "(B\xE7\xC9\r"
[06:55:54][D][pipsolar:843]: timeout command to poll: QMOD
[06:55:54][D][uart_debug:158]: >>> "QFLAG\x98t\r"
[06:55:54][D][pipsolar:926]: Sending polling command : QFLAG with length 5
[06:55:55][D][uart_debug:158]: <<< "(EbkyDajuvxz\xAB\x80\r"
[06:55:59][D][pipsolar:843]: timeout command to poll: QFLAG
[06:55:59][D][uart_debug:158]: >>> "QPIWS\xB4\xDA\r"
[06:55:59][D][pipsolar:926]: Sending polling command : QPIWS with length 5
[06:56:00][D][uart_debug:158]: <<< "(00000000000000000100000000000000E\x18\r"
[06:56:04][D][pipsolar:843]: timeout command to poll: QPIWS
[06:56:04][D][uart_debug:158]: >>> "QT\'\xFF\r"
[06:56:04][D][pipsolar:926]: Sending polling command : QT with length 2
[06:56:05][D][uart_debug:158]: <<< "(NAKss\r"
[06:56:09][D][pipsolar:843]: timeout command to poll: QT
[06:56:09][D][uart_debug:158]: >>> "QMN\xBBd\r"
[06:56:09][D][pipsolar:926]: Sending polling command : QMN with length 3
[06:56:10][D][uart_debug:158]: <<< "(VM-3000b\xCB\r"
[06:56:14][D][pipsolar:843]: timeout command to poll: QMN
But they are not sent to esphome and HA, can you advise?
Here is the yaml:
esphome:
name: energy-solar
friendly_name: energy-solar
esp32:
board: esp32dev
framework:
type: esp-idf
version: recommended
external_components:
- source: github://syssi/esphome-pipsolar@pip8048
refresh: 0s
logger:
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.31.210
gateway: 192.168.31.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Energy-Solar Fallback Hotspot"
password: "passenergysolar"
captive_portal:
uart:
- id: uart_bus
tx_pin: GPIO18
rx_pin: GPIO19
# most devices use 2400 as baud_rate
baud_rate: 2400
debug:
direction: BOTH
dummy_receiver: true
after:
delimiter: "\r"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
pipsolar:
- uart_id: uart_bus
id: inverter0
# Example configuration entry
sensor:
- platform: pipsolar
pipsolar_id: inverter0
grid_rating_voltage:
name: "${name} grid_rating_voltage"
grid_voltage:
name: "${name} grid_voltage"
grid_frequency:
name: "${name} grid_frequency"
ac_output_voltage:
name: "${name} ac_output_voltage"
ac_output_frequency:
name: "${name} ac_output_frequency"
ac_output_apparent_power:
name: "${name} ac_output_apparent_power"
ac_output_active_power:
name: "${name} ac_output_active_power"
output_load_percent:
name: "${name} output_load_percent"
bus_voltage:
name: "${name} bus_voltage"
battery_voltage:
name: "${name} battery_voltage"
battery_charging_current:
name: "${name} battery_charging_current"
battery_capacity_percent:
name: "${name} battery_capacity_percent"
inverter_heat_sink_temperature:
name: "${name} inverter_heat_sink_temperature"
pv1_input_current:
name: "${name} pv1_input_current"
pv1_input_voltage:
name: "${name} pv1_input_voltage"
pv2_input_current:
name: "${name} pv2_input_current"
pv2_input_voltage:
name: "${name} pv2_input_voltage"
battery_voltage_scc:
name: "${name} battery_voltage_scc"
battery_discharge_current:
name: "${name} battery_discharge_current"
battery_voltage_offset_for_fans_on:
name: "${name} battery_voltage_offset_for_fans_on"
# eeprom_version:
# name: "${name} eeprom_version"
pv1_charging_power:
name: "${name} pv1_charging_power"
pv2_charging_power:
name: "${name} pv2_charging_power"
# Example configuration entry
binary_sensor:
- platform: pipsolar
pipsolar_id: inverter0
add_sbu_priority_version:
id: inverter0_add_sbu_priority_version
name: inverter0_add_sbu_priority_version
configuration_status:
id: inverter0_configuration_status
name: inverter0_configuration_status
# Example configuration entry
text_sensor:
- platform: pipsolar
pipsolar_id: inverter0
device_mode:
id: inverter0_device_mode
name: inverter0_device_mode
last_qpigs:
id: inverter0_last_qpigs
name: inverter0_last_qpigs
last_qpiri:
name: inverter0_last_qpiri
last_qmod:
name: inverter0_last_qmod
last_qflag:
name: inverter0_last_qflag
last_qpiws:
name: inverter0_last_qpiws
last_qt:
name: inverter0_last_qt
last_qmn:
name: inverter0_last_qmn
# Example configuration entry
switch:
- platform: pipsolar
pipsolar_id: inverter0
output_source_priority_utility:
name: inverter0_output_source_priority_utility
output_source_priority_solar:
name: inverter0_output_source_priority_solar
output_source_priority_battery:
name: inverter0_output_source_priority_battery
input_voltage_range:
name: inverter0_input_voltage_range
pv_ok_condition_for_parallel:
name: inverter0_pv_ok_condition_for_parallel
pv_power_balance:
name: inverter0_pv_power_balance
# Example configuration entry
output:
- platform: pipsolar
pipsolar_id: inverter0
battery_recharge_voltage:
id: inverter0_battery_recharge_voltage_out
select:
- platform: pipsolar
pipsolar_id: inverter0
output_source_priority:
id: inverter0_output_source_priority_select
name: inverter0_output_source_priority_select
optionsmap:
"Utility first": "POP00"
"Solar only": "POP01"
"Solar Battery Utility": "POP02"
statusmap:
"0": "Utility first"
"1": "Solar only"
"2": "Solar Battery Utility"
What is wrong?
I think the problem is
CRC check. There may be a problem with an unreliable connection (for now I have it through the terminals)
Something similar here: #89
EDIT: i noticed that sometimes the crc check passes. about once an hour. The problem is the last two values in the string.
The QPIRI value is always at the end of \x13\x05\r
CRC NOK expected: 6F A6 but got: 13 5
The second QPIGS value, the last two values are always different
from esphome-pipsolar.
Related Issues (20)
- pipsolar + jk_bms HOT 1
- esphome reports "unknown" when inverter shuts down or on its own sometimes HOT 1
- Pooling command for P18 wrong HOT 1
- Question regarding ttl RS485 adapter HOT 4
- set_level action expects a percentage and clips values above 1.0 HOT 4
- Qoltec 6KW (PI30) - timeout QPIGS other works HOT 3
- Adding external componen not found HOT 4
- MPI 10k integration
- pipsolar ac_output_active_power HOT 1
- Apiconnectionerror HOT 2
- Inverter Log HOT 1
- Component jk_modbus took a long time for an operation.... and cause esp to halt after sometime HOT 2
- Pipsolar inverter pv1 and pv2 HOT 1
- Hybrid Solar inverter 8.2kw/10.2KW HOT 31
- Change value on QFLAGS status
- New sensors and custom settings on mi invertor Effekta AX- Series HOT 3
- Fronus PV7200 - CRC NOK expected HOT 13
- Axpert_KSMKSV_RS232_Protocol HOT 8
- PIP 8048 zero values HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome-pipsolar.