Closed donaldstod closed 1 month ago
Ok, sorry going through all other issues I realized this:
victron: id: victron0 throttle: 10s# <-- This uart_id: uart_0
solves the problem at least the messages change from Situation 1 to Situation 2 every 10s. Still a little unsatisfying because with this delay it is a lot less fun to watch it run :-(
Please try the ESP-IDF
framework instead of the Arduino one (if you are using a ESP32).
Hi syssi,
thank you that erased the warning and I was able to reduce the throttle down to 6s. Is there any possibility to split the publishing into two parts to further decrease the throttle? My wish would be 1-2s throttle to see the MPPT work
INFO ESPHome 2024.2.2 INFO Reading configuration /config/esphome/esphome-web-fe5eac.yaml... INFO Starting log output from 192.168.178.117 using esphome API INFO Successfully connected to esphome-web-fe5eac @ 192.168.178.117 in 0.012s INFO Successful handshake with esphome-web-fe5eac @ 192.168.178.117 in 0.110s [22:30:42][I][app:102]: ESPHome version 2024.2.2 compiled on Mar 25 2024, 22:27:52
[22:30:42][C][wifi:409]: Local MAC: 24:62:AB:FE:5E:AC [22:30:42][C][wifi:414]: SSID: 'WLAN-001'[redacted] [22:30:42][C][wifi:415]: IP Address: 192.168.178.117 [22:30:42][C][wifi:417]: BSSID: 50:E6:36:4C:08:38[redacted]
[22:30:42][C][wifi:420]: Signal strength: -79 dB ▂▄▆█ [22:30:42][C][wifi:424]: Channel: 1 [22:30:42][C][wifi:425]: Subnet: 255.255.255.0 [22:30:42][C][wifi:426]: Gateway: 192.168.178.1 [22:30:42][C][wifi:427]: DNS1: 192.168.178.1 [22:30:42][C][wifi:428]: DNS2: 0.0.0.0
[22:30:42][C][logger:448]: Level: DEBUG [22:30:42][C][logger:449]: Log Baud Rate: 115200 [22:30:42][C][logger:451]: Hardware UART: UART0 [22:30:42][C][uart.idf:139]: UART Bus 1: [22:30:42][C][uart.idf:140]: TX Pin: GPIO17 [22:30:42][C][uart.idf:141]: RX Pin: GPIO16 [22:30:42][C][uart.idf:143]: RX Buffer Size: 256 [22:30:42][C][uart.idf:145]: Baud Rate: 19200 baud [22:30:42][C][uart.idf:146]: Data Bits: 8 [22:30:42][C][uart.idf:147]: Parity: NONE [22:30:42][C][uart.idf:148]: Stop bits: 1
[22:30:42][C][victron:035]: Max Power Yesterday 'max power yesterday' [22:30:42][C][victron:035]: Device Class: 'power' [22:30:42][C][victron:035]: State Class: '' [22:30:42][C][victron:035]: Unit of Measurement: 'W' [22:30:42][C][victron:035]: Accuracy Decimals: 0
[22:30:42][C][victron:036]: Max Power Today 'max power today' [22:30:42][C][victron:036]: Device Class: 'power' [22:30:42][C][victron:036]: State Class: '' [22:30:42][C][victron:036]: Unit of Measurement: 'W' [22:30:42][C][victron:036]: Accuracy Decimals: 0
[22:30:42][C][victron:037]: Yield Total 'yield total' [22:30:42][C][victron:037]: Device Class: 'energy' [22:30:42][C][victron:037]: State Class: 'total_increasing' [22:30:42][C][victron:037]: Unit of Measurement: 'Wh' [22:30:42][C][victron:037]: Accuracy Decimals: 0
[22:30:42][C][victron:038]: Yield Yesterday 'yield yesterday' [22:30:42][C][victron:038]: Device Class: 'energy' [22:30:42][C][victron:038]: State Class: 'total_increasing' [22:30:42][C][victron:038]: Unit of Measurement: 'Wh' [22:30:42][C][victron:038]: Accuracy Decimals: 0
[22:30:42][C][victron:039]: Yield Today 'yield today' [22:30:42][C][victron:039]: Device Class: 'energy' [22:30:42][C][victron:039]: State Class: 'total_increasing' [22:30:42][C][victron:039]: Unit of Measurement: 'Wh' [22:30:42][C][victron:039]: Accuracy Decimals: 0
[22:30:42][C][victron:040]: Panel Voltage 'panel voltage' [22:30:42][C][victron:040]: Device Class: 'voltage' [22:30:42][C][victron:040]: State Class: '' [22:30:42][C][victron:040]: Unit of Measurement: 'V' [22:30:42][C][victron:040]: Accuracy Decimals: 3
[22:30:42][C][victron:041]: Panel Power 'panel power' [22:30:42][C][victron:041]: Device Class: 'power' [22:30:42][C][victron:041]: State Class: '' [22:30:42][C][victron:041]: Unit of Measurement: 'W' [22:30:42][C][victron:041]: Accuracy Decimals: 0
[22:30:42][C][victron:042]: Battery Voltage 'battery voltage' [22:30:42][C][victron:042]: Device Class: 'voltage' [22:30:42][C][victron:042]: State Class: '' [22:30:42][C][victron:042]: Unit of Measurement: 'V' [22:30:42][C][victron:042]: Accuracy Decimals: 3
[22:30:42][C][victron:045]: Battery Current 'panel current' [22:30:42][C][victron:045]: Device Class: 'current' [22:30:42][C][victron:045]: State Class: '' [22:30:42][C][victron:045]: Unit of Measurement: 'A' [22:30:42][C][victron:045]: Accuracy Decimals: 3
[22:30:42][C][victron:050]: Load Current 'load current' [22:30:42][C][victron:050]: Device Class: 'current' [22:30:42][C][victron:050]: State Class: '' [22:30:42][C][victron:050]: Unit of Measurement: 'A' [22:30:42][C][victron:050]: Accuracy Decimals: 3
[22:30:42][C][victron:051]: Day Number 'day number' [22:30:42][C][victron:051]: State Class: '' [22:30:42][C][victron:051]: Unit of Measurement: '' [22:30:42][C][victron:051]: Accuracy Decimals: 0 [22:30:42][C][victron:052]: Charging Mode ID 'charging mode id' [22:30:42][C][victron:052]: State Class: '' [22:30:42][C][victron:052]: Unit of Measurement: '' [22:30:42][C][victron:052]: Accuracy Decimals: 0 [22:30:42][C][victron:053]: Error Code 'error code' [22:30:42][C][victron:053]: State Class: '' [22:30:42][C][victron:053]: Unit of Measurement: '' [22:30:42][C][victron:053]: Accuracy Decimals: 0 [22:30:42][C][victron:055]: Tracking Mode ID 'tracking mode id' [22:30:42][C][victron:055]: State Class: '' [22:30:42][C][victron:055]: Unit of Measurement: '' [22:30:42][C][victron:055]: Accuracy Decimals: 0 [22:30:42][C][victron:058]: Charging Mode 'charging mode' [22:30:42][C][victron:059]: Error Text 'error' [22:30:42][C][victron:061]: Tracking Mode 'tracking mode' [22:30:42][C][victron:063]: Firmware Version 'firmware version' [22:30:42][C][victron:065]: Device Type 'device type' [22:30:42][C][captive_portal:088]: Captive Portal:
[22:30:42][C][mdns:116]: Hostname: esphome-web-fe5eac [22:30:42][C][ota:096]: Over-The-Air Updates: [22:30:42][C][ota:097]: Address: esphome-web-fe5eac.local:3232 [22:30:42][C][ota:103]: OTA version: 2. [22:30:42][C][api:139]: API Server: [22:30:42][C][api:140]: Address: esphome-web-fe5eac.local:6053 [22:30:42][C][api:142]: Using noise encryption: YES [22:30:48][D][sensor:094]: 'battery voltage': Sending state 52.76000 V with 3 decimals of accuracy [22:30:48][D][sensor:094]: 'panel current': Sending state 0.00000 A with 3 decimals of accuracy [22:30:48][D][sensor:094]: 'panel voltage': Sending state 3.83000 V with 3 decimals of accuracy [22:30:48][D][sensor:094]: 'panel power': Sending state 0.00000 W with 0 decimals of accuracy [22:30:48][D][sensor:094]: 'tracking mode id': Sending state 0.00000 with 0 decimals of accuracy [22:30:48][D][text_sensor:064]: 'tracking mode': Sending state 'Off' [22:30:48][D][sensor:094]: 'charging mode id': Sending state 0.00000 with 0 decimals of accuracy [22:30:48][D][text_sensor:064]: 'charging mode': Sending state 'Off' [22:30:54][D][sensor:094]: 'error code': Sending state 0.00000 with 0 decimals of accuracy [22:30:54][D][text_sensor:064]: 'error': Sending state 'No error' [22:30:54][D][sensor:094]: 'yield total': Sending state 664850.00000 Wh with 0 decimals of accuracy [22:30:54][D][sensor:094]: 'yield today': Sending state 10030.00000 Wh with 0 decimals of accuracy [22:30:54][D][sensor:094]: 'max power today': Sending state 3428.00000 W with 0 decimals of accuracy [22:30:54][D][sensor:094]: 'yield yesterday': Sending state 8330.00000 Wh with 0 decimals of accuracy [22:30:54][D][sensor:094]: 'max power yesterday': Sending state 3244.00000 W with 0 decimals of accuracy [22:30:54][D][sensor:094]: 'day number': Sending state 207.00000 with 0 decimals of accuracy [22:31:00][D][sensor:094]: 'battery voltage': Sending state 52.76000 V with 3 decimals of accuracy [22:31:00][D][sensor:094]: 'panel current': Sending state 0.00000 A with 3 decimals of accuracy [22:31:00][D][sensor:094]: 'panel voltage': Sending state 3.83000 V with 3 decimals of accuracy [22:31:00][D][sensor:094]: 'panel power': Sending state 0.00000 W with 0 decimals of accuracy [22:31:00][D][sensor:094]: 'tracking mode id': Sending state 0.00000 with 0 decimals of accuracy [22:31:00][D][text_sensor:064]: 'tracking mode': Sending state 'Off' [22:31:00][D][sensor:094]: 'charging mode id': Sending state 0.00000 with 0 decimals of accuracy [22:31:00][D][text_sensor:064]: 'charging mode': Sending state 'Off'
I assume printing the log messages is time consuming. Try to set the log level to INFO
. This should free many CPU cycles.
Hi syssi, good idea, unfortunately did not help to decrease the throttle time. Situation with the messages is the same, as soon as I go below 6s of throttle I lose values. After programing several times over-the-air, one programming was interrupted and I lost connection to the ESP32, now need to setup everything again. If it is ok for you I keep you updated about the status. Best regards, Michael
All the wiring and timing "problems" let me to switch to this -->[https://github.com/Fabian-Schmidt/esphome-victron_ble] solution. The throttle time is still slower than I would like it, but I don´t have to worry about all the wiring and voltage levels. If you have a SmartSolar with bluetooth and access to a ESP32, the solution above is very nice. @syssi: I saw you also contributed to bluetooth solution - thanks for your great work!
Hello,
I have been running this code "Victron-MPPT-ve.direct-to-MQTT"on an ESP8266 for months without any errors. HW ESP8266 with a 5V to 3.3V level shifter and the standard pin configuration. After an electrical overstress of the power supply of the ESP8266, it died. After that I saw the new "VictronMPPT ESPHOME" code switched to the ESPHOME version and ever since I never got a complete message from the microcontrollers. I have the code in two setups with different HW both have the same issue. Setup 1: ESP32 with direct connection to the Victron MPPT Setup 2: ESP8266 with connection through level shifter Victron MPPT In both cases I only get either half of the values from the MPPT. Situation 1: Only Batttery voltage, Panel Current, Panel Power... Situation 2: Only error code, Yield today, Yield Yesterday, Yield Total... It seems like the readout of RS232 interface is interrupted by some other routine of the ESPs. Depending on the timing of flashing or read logs I sometimes get Situation 1 and sometimes Situation 2 on both devices. ESP32 has Situation 1 and ESP8266 has Situation 2 in the logs below.
Any help is very much appreciated - thanks a lot in advance!
Code ESP32: