SOLAX: tasmota oder ESPHome auf ESP8266 und ESP32 flashen

Hintergrund: es gibt ja einen USB-Stick für den SOLAX X1. Der heißt z.B. Solax | Pocket WIFI-Interface V3.0

Der bekommt eigentlich alle Daten vom WR, um sie in die SOLAX-Cloud zu senden. Wenn man den aufmacht, kommt -oh Wunder- ein ESP32 zum Vorschein.

Das Teil würde ich gerne passend flashen, so dass die Daten nicht in der Cloud, sondern lokal hier in meinem Netz landen. Man muss ja das Rad nicht immer zweimal erfinden...

Leider wird kein serial-port verfügbar gemacht, wenn ich den Stick an mein Laptop anstecke. Insofern habe ich erstmal keinen Zugriff auf die firmware, kann da auch nichts draufschreiben.

Auf der Rückseite, versteckt unter der erweiterten WIFI-Antenne, gibt es ein paar Pins:

Könnte man den Chip direkt ansprechen und programmieren?

Wenn man hier ein paar Drähtchen anlötet, und die mit einem RS485 USB-to-serial Adapter verbindet?

Oder könnte man hier einen ESP32 dranhängen, der die Daten dann vom Pocket-WIFI in's Heimnetz bringt?

Ich denke schon das du den auslesen kannst.

Nur wird das Ergebnis nicht dem entsprechen was du erwartest. Du bekommst da keinen schön formatierten Quellcode raus. Wenn du das vor hast musst du dich gut in C / C++ und Assembler auskennen um aus dem Binary auf den Quellcode schliessen zu können.

Von esprssif gibt es ein Python-Script mit dem du das Binary bzw. den Flash auslesen kannst, dass kannst du dann in Assembler konvertieren.

Um das Problem mal einzugrenzen hätte ich folgende Vorschläge:

  • Bitte poste mal deine komplette yaml.
  • Kannst du mal das Log vom ESPHome posten?
  • Verwendest du eine ESP8266 oder einen ESP32?
  • Verkabelung prüfen (hast du wahrscheinlich schon 100x gemacht) und am Besten durch messen. GRD hab ich auch nicht angeschlossen. Kannst du aber mal probieren.
  • Hast du noch einen weiteren ESP mit dem du mal testen kannst? Mach mal sind die Teile einfach kaputt.
  • Gibt es eine Möglichkeit mit der du den Modbus-Port vom SOLAX testen kannst?
  • Hast du noch eine weiter RS485 Adapter-Platine die du probieren kannst?

Hier noch der Link zum Flash-Download Tool: Tools | Espressif Systems

Hier eine Anleitung zum reverse engineering: Reverse engineering of esp32 flash dumps with ghidra or IDA Pro | by Olof Astrand | Medium

Und hier noch der Link zum espressif bootloader (esptool.py) GitHub - espressif/esptool: Espressif SoC serial bootloader utility

1 „Gefällt mir“

@profantus Danke! Dann stelle ich das Pocket-Wifi Projekt erst mal zurück... ? Eingrenzenderweise.

- zur Hardware: verfügbar sind zwei verschiedene breakout-boards, und zwei verschiedene ESPs. ESP8266 und ESP32. Die Hardware habe ich auf Seite1 näher angegeben. Habe es zuerst mit dem ESP8266 versucht, seit gestern dann und aktuell mit dem ESP32 D1 mini.

Pinout laut SOLAX Bedienungsanleitung:

Brakout-board: Hailege TTL to RS485 485 to Serial UART Level Reciprocal Hardware Automatic Flow Control UART to RS485 Converter RS485 to TTL

ESP32 D1 mini: ESP32 D1 Mini NodeMCU WiFi Modul + Bluetooth Internet Entwicklungsboard kompatibel mit Arduino

Pinout de ESP23:

- .yaml: ich verwende die esp32-example.yaml aus dem Verzeichnis esphome-solax-x1-mini-main.

substitutions:
name: solar-powermeter-32
device_description: "Monitor a Solax X1 mini via RS485"
external_components_source: github://syssi/esphome-solax-x1-mini@main
tx_pin: GPIO16
rx_pin: GPIO17
esphome:
name: ${name}
comment: ${device_description}
project:
name: "syssi.esphome-solax-x1-mini"
version: 2.1.0
#esp8266:
#  board: d1_mini
esp32:
board: wemos_d1_mini32
external_components:
- source: ${external_components_source}
refresh: 0s
wifi:
ssid: "*****"
password: "*****"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "SolaxHotspot"
password: "HotspotSolax"
captive_portal:
web_server:
port: 80
version: 1
include_internal: true
ota:
# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
#mqtt:
#  broker: !secret mqtt_host
#  username: !secret mqtt_username
#  password: !secret mqtt_password
#  id: mqtt_client
api:
logger:
#  level: DEBUG
#  level: VERBOSE
level: VERY_VERBOSE
logs:
api.service: WARN
ota: WARN
sensor: DEBUG
uart:
id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
solax_modbus:
- id: modbus0
uart_id: uart0
#    flow_control_pin: GPIO0
solax_x1_mini:
solax_modbus_id: modbus0
update_interval: 1s
text_sensor:
- platform: solax_x1_mini
mode_name:
name: "${name} mode name"
errors:
name: "${name} errors"
sensor:
- platform: solax_x1_mini
ac_power:
name: "${name} ac power"
energy_today:
name: "${name} energy today"
energy_total:
name: "${name} energy total"
dc1_voltage:
name: "${name} dc1 voltage"
dc2_voltage:
name: "${name} dc2 voltage"
dc1_current:
name: "${name} dc1 current"
dc2_current:
name: "${name} dc2 current"
ac_current:
name: "${name} ac current"
ac_voltage:
name: "${name} ac voltage"
ac_frequency:
name: "${name} ac frequency"
temperature:
name: "${name} temperature"
runtime_total:
name: "${name} runtime total"
mode:
name: "${name} mode"
error_bits:
name: "${name} error bits"
grid_voltage_fault:
name: "${name} grid voltage fault"
grid_frequency_fault:
name: "${name} grid frequency fault"
dc_injection_fault:
name: "${name} dc injection fault"
temperature_fault:
name: "${name} temperature fault"
pv1_voltage_fault:
name: "${name} pv1 voltage fault"
pv2_voltage_fault:
name: "${name} pv2 voltage fault"
gfc_fault:
name: "${name} gfc fault"

solar-powermeter-32

States

Name State Actions
solar-powermeter-32 energy today NA
solar-powermeter-32 energy total NA
solar-powermeter-32 dc1 current 0.0 A
solar-powermeter-32 dc1 voltage 0.0 V
solar-powermeter-32 dc2 current 0.0 A
solar-powermeter-32 dc2 voltage 0.0 V
solar-powermeter-32 ac current 0.0 A
solar-powermeter-32 ac voltage NA
solar-powermeter-32 ac frequency NA
solar-powermeter-32 ac power 0 W
solar-powermeter-32 runtime total NA
solar-powermeter-32 error bits NA
solar-powermeter-32 mode -1
solar-powermeter-32 temperature NA
solar-powermeter-32 mode name Offline
solar-powermeter-32 errors
See ESPHome Web API for REST API documentation.

OTA Update

Debug Log

[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 120 bytes
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=41815 (now=42815)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=41815 (now=42815)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 168 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 168 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 160 bytes
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 160 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 160 bytes
[0;38m[VV][scheduler:207]: Running interval '' with interval=10000 last_execution=33008 (now=43012)[0m
[VV][scheduler:207]: Running interval '' with interval=10000 last_execution=33008 (now=43012)
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 160 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 156 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 156 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 160 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 152 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 176 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 180 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 156 bytes
[V][json:056]: Size after shrink 156 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 156 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 176 bytes
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 172 bytes
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=42815 (now=43816)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=42815 (now=43816)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=43815 (now=44817)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=43815 (now=44817)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=44815 (now=45822)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=44815 (now=45822)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval '' with interval=60000 last_execution=4294953786 (now=46491)[0m
[VV][scheduler:207]: Running interval '' with interval=60000 last_execution=4294953786 (now=46491)
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=45815 (now=46815)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=45815 (now=46815)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=46815 (now=47818)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=46815 (now=47818)
[D][sensor:127]: 'solar-powermeter-32 mode': Sending state -1.00000  with 0 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 84 bytes
[V][text_sensor:016]: 'solar-powermeter-32 mode name': Received new state Offline
[D][text_sensor:067]: 'solar-powermeter-32 mode name': Sending state 'Offline'
[D][text_sensor:067]: 'solar-powermeter-32 mode name': Sending state 'Offline'
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 100 bytes
[D][sensor:127]: 'solar-powermeter-32 temperature': Sending state nan °C with 0 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 dc1 voltage': Sending state 0.00000 V with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 dc2 voltage': Sending state 0.00000 V with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 dc1 current': Sending state 0.00000 A with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 dc2 current': Sending state 0.00000 A with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 ac current': Sending state 0.00000 A with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 ac voltage': Sending state nan V with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 ac frequency': Sending state nan Hz with 2 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 ac power': Sending state 0.00000 W with 0 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 88 bytes
[V][json:056]: Size after shrink 88 bytes
[D][solax_x1_mini:298]: The device is or was offline. Broadcasting discovery for address configuration...
[D][solax_x1_mini:298]: The device is or was offline. Broadcasting discovery for address configuration...
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.00.10.00.00.01.10 (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.00.10.00.00.01.10 (11)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.00.10.00.00.01.10 (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.00.10.00.00.01.10 (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[V][component:200]: Component solax_x1_mini took a long time for an operation (0.32 s).
[V][component:201]: Components should block for at most 20-30ms.
[D][uart_debug:114]: >>> AA:55:01:00:00:00:10:00:00:01:10
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=47815 (now=48816)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=47815 (now=48816)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=48815 (now=49819)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=48815 (now=49819)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=49815 (now=50823)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=49815 (now=50823)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=50815 (now=51816)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=50815 (now=51816)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=51815 (now=52819)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=51815 (now=52819)
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.0A.11.02.00.01.1D (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[D][uart_debug:114]: >>> AA:55:01:00:00:0A:11:02:00:01:1D
[0;38m[VV][scheduler:207]: Running interval '' with interval=10000 last_execution=43008 (now=53009)[0m
[VV][scheduler:207]: Running interval '' with interval=10000 last_execution=43008 (now=53009)
[0;38m[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=52815 (now=53818)[0m
[VV][scheduler:207]: Running interval 'update' with interval=1000 last_execution=52815 (now=53818)
[D][sensor:127]: 'solar-powermeter-32 mode': Sending state -1.00000  with 0 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 84 bytes
[V][text_sensor:016]: 'solar-powermeter-32 mode name': Received new state Offline
[V][text_sensor:016]: 'solar-powermeter-32 mode name': Received new state Offline
[D][text_sensor:067]: 'solar-powermeter-32 mode name': Sending state 'Offline'
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 100 bytes
[D][sensor:127]: 'solar-powermeter-32 temperature': Sending state nan °C with 0 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 dc1 voltage': Sending state 0.00000 V with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 dc2 voltage': Sending state 0.00000 V with 1 decimals of accuracy
[D][sensor:127]: 'solar-powermeter-32 dc2 voltage': Sending state 0.00000 V with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 dc1 current': Sending state 0.00000 A with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 dc2 current': Sending state 0.00000 A with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 96 bytes
[D][sensor:127]: 'solar-powermeter-32 ac current': Sending state 0.00000 A with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 ac voltage': Sending state nan V with 1 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 ac frequency': Sending state nan Hz with 2 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 92 bytes
[V][json:056]: Size after shrink 92 bytes
[D][sensor:127]: 'solar-powermeter-32 ac power': Sending state 0.00000 W with 0 decimals of accuracy
[V][json:036]: Attempting to allocate 512 bytes for JSON serialization
[V][json:056]: Size after shrink 88 bytes
[D][solax_x1_mini:298]: The device is or was offline. Broadcasting discovery for address configuration...
[0;38m[VV][solax_modbus:235]: TX -> AA.55.01.00.00.00.10.00.00.01.10 (11)[0m
[VV][solax_modbus:235]: TX -> AA.55.01.00.00.00.10.00.00.01.10 (11)
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[0;38m[VV][uart.arduino_esp32:151]:     Flushing...[0m
[VV][uart.arduino_esp32:151]:     Flushing...
[V][component:200]: Component solax_x1_mini took a long time for an operation (0.33 s).
[V][component:201]: Components should block for at most 20-30ms.
[D][uart_debug:114]: >>> AA:55:01:00:00:00:10:00:00:01:10

Also im Log sieht man das die Discovery Broadcast Nachricht geschickt wird:

TX -> AA.55.01.00.00.00.10.00.00.01.10 (11)

Es kommt aber keine Antwort dazu zurück.

Hier GitHub - syssi/esphome-solax-x1-mini: ESPHome component to monitor a Solax X1 mini via RS485 das Beispiel vom erfolgreichen Discovery.

Deine Konfiguration sieht gut aus für einen ESP32.

Das RS485 Board hast du ja bestimmt auch korrekt mit dem ESP verbunden...

  • RX -> GPIO 16
  • TX -> GPIO 17
  • GND -> GND
  • VCC -> 3,3V
und
  • A+ -> 4
  • B- -> 5

Am ESP32 liegt es jetzt wahrscheinlich nicht, sondern an der RS485 Kommunikation.

Der SOLAX muss auf das Discovery antworten.

Ja, das müsste alles richtig angeschlossen sein.

GPIO16 und 17 habe ich mal mit RX/TX und mal mit TX/RX belegt.

Denke, richtig ist es, wenn die TX LED blinkt wenn das board eine Anfrage sendet.

@saugnapf Ja macht meins auch.

@nadors Evtl. kannst du ja mal das ESPHome Script von saugnapf testen. Ich hab leider keinen Solax

Ich werde das Script spätestens am Wochenende testen.

@saugnapf

Ich weiß jetzt nicht ob du es schon geschrieben hast, aber hast du den HW-0519 auch schon durchgetauscht?

Bei RS485 ist Senden und Empfangen die selbe Datenleitung und er hat ne am ESP Seriennummer gefangen.
Er hat kein Problem mit der ESP oder RS485 Hardware.
Steht alles auf der ersten Seite.

@und-mehr Probleme mit dem ESP schließe ich auch aus. Ich tippe mal auf ein Problem in der SOLAX Konfiguration. Man sieht ja das das Discover Telegram nicht beantwortet wird. Heißt da hört keiner auf dem Bus oder der Versteht das Telegramm nicht. Da das alles ja schon mal bei andern geklappt hat glaube ich muss es am SOLAX liegen.

Hi,

ich habe die Diskussion quer gelesen. Bitte verzeiht mir, wenn ich Dinge wiederhole, die schon lange klar sind. :slight_smile: Ich habe das Gefühl, dass die folgende Kleinigkeit im Puzzle fehlt:

Meine Implementierung hier ist nur für einen X1 Mini gedacht: GitHub - syssi/esphome-solax-x1-mini: ESPHome component to monitor a Solax X1 mini via RS485

Der X1 Mini antwortet sofort auf eine Anfrage, wenn man ihm eine Frage (via RS485 + ESPHome) stellt. Der X1 Boost spricht ModbusRTU. Diese Funktion muss in den Einstellungen (nach Eingabe eines Management-Passwort (6868)) aktiviert werden. Danach kann man mit dem Inverter Modbus-konform sprechen. Eine Beispielkonfiguration die ohne große Anpassungen funktionieren sollte findest du hier:

Ansonsten wurden hier bereits alle wichtigen Fragen gestellt (welche der beiden LEDs blinkt periodisch, teilt man sich die GPIOs mit dem Logger und sollte man den Logger deshalb stumm schalten etc.).

Gruß Syssi

3 „Gefällt mir“

Das klingt sehr gut, werde ich nachher ausprobieren! ?

SUPER! Hat geklappt. Vielen Dank an @Sebastian! ? ? ?

Dann hatte ich einfach die falsche .yaml -Version.

War davon ausgegangen, dass das "X1 mini" und "X1 Boost" auf gleiche Weise funktioniert.

Super dann klappt Teil 1 von 2 schon mal ? .

Wenn du die Daten nach Venus OS bringen möchtest musst du das Python Script von @undmehr auf dem Cerbo GX zum laufen bringen und in ESPHome die Daten via MQTT versenden.

wenn alles läuft loglevel wieder auf info, debug frisst CPU zeit.
api rauswerfen oder timeout für das reboot auf 0 setzen (Native API Component — ESPHome)

@und-mehr Wäre das so in Ordnung? Oder muss ich die Zeile "api:" wieder auskommentieren?

# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "SolaxHotspot"
password: "HotspotSolax"
captive_portal:
web_server:
port: 80
version: 1
include_internal: true
ota:
# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
# mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
api:
logger:
level: INFO
uart:
id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
modbus:
- id: modbus0
uart_id: uart0
#    flow_control_pin: GPIO0

Wie du willst, api ist die Schnittstelle zu homeassistant, wenn esphome 15minute keine verbindung zu ha hat bootet er sich neu.

Wenn man gar kein ha nutzt wundert man sich sonst über das komische Verhalten, es ist nicht intuitiv.

@Sebastian
Danke auch von mir, hier läuft es auch.

Yes! Bin mit Teil1 schonmal sehr glücklich für heute. ?

"... das Python Script von @undmehr auf dem Cerbo GX zum laufen bringen..."

Das wäre das hier: SOLAX: tasmota oder ESPHome auf ESP8266 und ESP32 flashen - #34 von profantus - Open Source - Software Projekte - Akkudoktor Forum

Da werde ich wieder einiges an Unterstützung brauchen, bevor ich das alles verstehe. ? ?

Mein MP2 ist ein MP2-GX, also das GX ist integriert. Ein RasPi4B wäre da... würde das aber auch auf dem internen GX wagen.

Wie muss ich denn damit anfangen?

Zugangslevel in der remote-console ist Superuser.

So weit bin ich bisher, nanopi ist mein GX:

@und-mehr

Würde dann so ausschauen, ist das ok?

api:
reboot_timeout: 0s
logger:
level: INFO
uart:
id: uart0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
modbus:
- id: modbus0
uart_id: uart0
#    flow_control_pin: GPIO0
api:
reboot_timeout: 0s

Korrekt!