VictronMPPT-ESPHOME icon indicating copy to clipboard operation
VictronMPPT-ESPHOME copied to clipboard

Switch for load output possible?

Open snipah opened this issue 2 years ago • 13 comments

As the load output is configurable/ switchable via the Victron App, I want to ask if this is achievable via MQTT as well? It would be great to have control over the load output via Home Assistant.

snipah avatar Dec 18 '22 10:12 snipah

This implementation uses the read-only ve.direct ASCII protocol right now. I assume we have to switch to the binary version to control the device.

syssi avatar Dec 18 '22 11:12 syssi

This implementation uses the read-only ve.direct ASCII protocol right now. I assume we have to switch to the binary version to control the device.

And even the BLE version ;)

SeByDocKy avatar Jan 02 '23 11:01 SeByDocKy

There is theoretical an other way:

By the Victron MPPT Charger you can configure that the RX pin is "binary". if is there a voltage from 0V - Disable the Output, and Enable by 5V.

Now you can build in ESPHome a Switch-Component (or Relais?) to raise the voltage to 5V on the RX-Pin

Git-ChrisSc avatar Jun 14 '23 12:06 Git-ChrisSc

This sounds odd. If you pull-up the voltage at the RX pin you won't be able to receive data anymore. :-)

syssi avatar Jun 14 '23 12:06 syssi

Ah, I understand the concept now. The RX pin is the unused one in a read-only setup.

syssi avatar Jun 14 '23 12:06 syssi

https://www.victronenergy.com/media/pg/Manual_BlueSolar_MPPT_75-10_up_to_100-20/de/configuration-and-settings.html#UUID-b6cabb55-8d14-4fc9-190f-c0856aab60d3

Here is an Manual for Bluesolar

Git-ChrisSc avatar Jun 14 '23 13:06 Git-ChrisSc

I can confirm, that this way is working.

If you put 5V on RX Pin and config RX for switching the Load-Output in the Bluetooth-App.

After this, you have to build a "switch-component" in ESPHOME

Git-ChrisSc avatar Jun 15 '23 21:06 Git-ChrisSc

Could you try to drive the load output using a GPIO with 3.3V TTL:

switch:
  - platform: gpio
    name: "${name} load output"
    pin:
      number: GPIO14
      mode:
        pulldown: true

syssi avatar Jun 16 '23 06:06 syssi

Hi,

Oh, i can test it after my vacation - because my "Jerrycan-Battery" is actuall in use and allready solderd with iron.

But: Why with 3V? For stability (in longterm use) I use a cheap logic level converter, because i wouldn't use 5V on the ESP32 Pins. https://www.amazon.de/gp/product/B07BZJ73LV/

i using not the TTL as Output, i have solderd a "Jumperbridge" on the platin for XOR. grafik

On the HV-Side i solderd the VCC from Victron and on HG is the Victron GND connected. H1 and H4 connected to RX und TX Pins on the Victron.

Git-ChrisSc avatar Jun 21 '23 09:06 Git-ChrisSc

Let's ignore the voltage level of the UART communication for now (off-topic). If we focus on "how to control the load output of a victron device using the RX pin" we have to apply some voltage to this pin. If we simply attach a GPIO to the RX pin the voltage level will be 3.3V because the ESP is a 3.3V device. The RX pin probably expects 5V here (on some victron devices). I would like to know the lower voltage level is sufficient to drive the load output.

syssi avatar Jun 21 '23 10:06 syssi

"UART communication for now (off-topic)" I think that i get missunderstand, because my english isnt good. My intention wasn't to discuss about the voltaglevel by UART.

Some facts for the focus: When i apply 3.3V on the RX Pin the Victron will switch the load output to on. (This i have just tested it, for 5 Minutes, was easier then i think and i have tested it in my vacation)

In the previous post, I only just wanted to warn that 5V is not a good idea for long-term use on the RX of the ESP, and that you could switch everything via a logic-level converter that doesn't just do TTL.

So the Answere of the question above is:

  1. You can switch the load output with an ESP(and ESPHome) and there is no need of this lib: But you have to config the Victron in the Right-Way **1.
  2. Switching the Load Output need no more additional Hardware: But for reading Victron it's safer to use a Logik-Level-Converter and now you can also use it for switching the Output with right 5V

**1 And as an additional Answer: I use it and tested it in the Last 5 days. Every nigth. In the App you have to configure

  1. under menue-point: Battery -> Operation-Mode: Always on
  2. under menue-point: RX port -> RX port function: Load output on/off normal .... i have NOT tested it with some other options as battery-safer or something else

** if it is of interest, i will present the project in a few words.

Git-ChrisSc avatar Jun 21 '23 11:06 Git-ChrisSc

It took some time to understand your idea. :-) Long story short: The TX channel of a (two channel) level shifter can be used to drive the load output using 5V.

syssi avatar Jun 21 '23 11:06 syssi

just a quick not from me: i do have a 75/10 and a 75/15 in a setup with Rx pin set to "Load output on/off normal" and putting Rx to GND in the victron. This turns off the load on closed and turn back on after releasing the relais. (it takes a few seconds until the victron actually switches the load)

zechnkaas avatar Mar 25 '24 15:03 zechnkaas