Shutdown MPPT's during negative energy price

Hi @ErikBTD

Any progress or updates? It’s been a few days.

Hi @anon39974850 ,
I’ve been busy a while as my wife has cancer (hospital visits and family stuff etc.).
But meanwhile I made some progress. Seems to be MQTT-communication between HA and the ESS stops. While starting up the connection with MQTT explorer the automations in HA worked well (very shortly).

I’ll keep you posted, but I can take a while :wink:

I’m so sorry to hear that about you wife. I apologise for the nudging. I wish her the best for a positive outcome.

So… search for information on ‘Cerbo GX MQTT keep-alive’ ! or more generally ‘MQTT keepalive’, CerboGX 3.5x+ I think, uses FlashMQ. Remember about JSON formatting

I think if you do the search you’ll learn more, than me simply spoon feeding the answer.

Just to say MQTT keeps a record of each connected ‘client’, if it doesn’t hear from them in a while it considers the connection terminated or failed.

If you get stuck feel free to reach out, but I think you are almost there!

@anon39974850 : no hard feeling!
I really appreciate your help and understand your curiousity :wink:

Well for some reason my MQTT broker constanly stops working. When I push the “start”-button in the add-ons section it does start. But when I go to another page and get back to the Mosquitto broker I see it has stopped.


Just checked the log:

Have you configured the Cerbo as the MQTT broker?
Heads-up, HA can only have one configured MQTT Broker.
The fact it shows ‘core-mosquitto’ means that is the default HA broker.

Install the MQTT integration via Settings-> Devices & Services.

Then configure it with the details of your CerboGX (IP adress etc) (This is the MQTT Broker we are going to be communicating with).

Counter-intuitively DO NOT click on ‘Configure’. Click on the 3 vertical dots to the right and select ‘Reconfigure’

Screenshots

You’ll see this:

Broker - IP address of your cerbo

Port as shown

Username - blank

Password - blank

Click submit, you should get confirmation that HA connected to the Cerbo MQTT broker… or not (report back if this is the case)

To start with DO NOT have your Cerbo setup with a Network Security other than unsecured.
Why? This is the simplest form of setup to test proof of concept. Later you can fiddle with secured profiles and SSL self-signed certs etc.

It’s more rewarding to get it working then improve things a little later at this stage.

As far as I know I did’nt setup the Cerbo GX as a broker. I don’t have many options by the way:

There is no security within my network.
Just put the setting as you suggested. But it still doesn’t work.

Hi Erik,

The Cerbo acts as a broker.
The setup needs to happen in HA. Did you take a look at the screenshot in my previous post?

The security I was mentioning is the security for the Cerbo. What version of Venus OS are you running?

Well, finally got it working.
I made some mistakes:

  • there was a fault in the action I made (not according JSON format)
  • Put in the IP-address of the Cerbo as the broker
  • I removed “victron” out of the beginning of the Topic

Now it works properly. You really helped me out! Thanks for that!

You’re welcome!

I’m so glad you were able to get it working. It took a while but you stayed the course!
Hopefully now you are using HA to put the MPTTs into off, as you wanted?

If you could mark this as ‘Solved’ that would be very helpful for me.

I hope you and your wife all the best!

For the people that want to use Node-Red for this purpose, I created a NR flow for this. It’ll fetch the current price from VRM and if <=0 it switches off charging on my MPPT RS but only if the grid connection is active. Let me know if you need the json file. For some reason, I cannot seem to share it here.