Victron/Fronius off-grid PV Energy Dashboard - MQTT and modbus integration

I would like to come back to the 1.0 factor story. I could not understand why the power of the Victron inverter had to be at least equal to that of the Fronius inverter? So I asked the question on the Victron community and the answer is obvious! When the Fronius delivers its maximum power to a load and if that load is stopped suddenly, the energy delivered by the Fronius must be absorbed somewhere before the regulation takes place. The only place where this can happen is into the battery through the Victron inverter, and therefore the inverter must obviously support a power level equal to or greater than that of the Fronius.
By the way, in your case your 2 Fronius have a power of 16.4 kW and your 3 Victron only 15 kW so they are slightly undersized. :slight_smile:

1 Like

I am not really familiar with the Victron community either, but would 100% recommend diysolarforum.com. Internet at its best! Amazing knowledgeable people. I could build my off grid system in the cabin despite being a real noob and having no engineering education (I am a partner at a law firm lol).

The Victron forum can be a bit ‘you should consult with your local electrician’ (which of course should be done, but perhaps not necessarily during the planning phase).

I have the MultiPlus II in my cabin, it makes no noise when the load is on the lower side, say Max 1000 watts, but when you go higher than that it starts to make a noticeable humming sound.

It’s definitely an issue that can be “built away”. I got an indoor pool in my year round house and the pool pump of course makes a lot more noise, but with proper isolation the sound barely escape the room it’s stored in.

BTW, I am 100% sold on the combined AC/DC coupled system you proposed above. Think 5kw DC coupled + 5kw AC coupled fits my need perfectly.

This is my kWh consumption:

And my kw load:

The one thing that has be wondering a bit is that with a Fronius 5.0-3 + MultiPlus II 48/5,000 or RS 6000 I wouldn’t be able to provide any 3 phase AC power. That means that the stove and a bigger stone oven I have would have to be run by the grid.

I also don’t have an electric/PHEV car yet, but is looking to change the GLS for an EQS SUV when that is released. These electric cars are charged with 3 phase right?

What do you guys think, is it better to plan for 3 phase right away? Perhaps get like 3 MultiPlus 48/3000?

I have tried countless ways to add these elements to my sensor.yaml file, but in every case they seem to require a platform. When I use “energy” they don’t show up, and I can’t find another that works (e.g. “template” has different naming conventions). Any input would be much appreciated!

Hello there, missed your comment on 3-phase so late re-comment. Personally I run large oven and appliances on 1-phase as the max current remains well under max permissible load of 63A for the internal wiring. This will depend on local regulations and the specific wiring sizes of your installation. I went 1-phase instead of 3 for simplicity but with hindsight it is, in my case, a 50/50 decision. The added complexity of 3-phase pays out when you run large asynchronous motors such as swimming pool pump (mine is 3HP or ~2200Watt) as it is easier to speed-control them and they are more efficient in 3-phase. As for EV charging I know nothing so will not comment.

Difficult to comment as you’re not giving lots of information.
From your image (note, better use the “preformated text” of the editor which you can do with the </> formatting as I have done below) it appears your grid_to_house sensor is the result of a calculation. If that is the case, you need to use the template integration. Assuming you are declaring this sensor in the configuration.yml file then:

template:
  - sensor:
      - name: Grid to House
        unique_id: grid_to_house
        unit_of_measurement: 'W'
        state_class: measurement
        device_class: power
        state: [write here the template]

Can you try this and report back on whether you get the sensor to show-up? Then we can go the next step.

Hi Isgv. You have a very nice installation. I have couple of question to it:

  1. You wrote in original post that you want to compare the kWh price of your system with on-grid prices. Did you make it already? What kWh price you are getting now, assuming typical lifetimes for batteries, solar panels, generator fuel etc?

  2. Did you make thinking what would reduce this price per kWh even further? What optimizations could be done - more solar, less batteries, less solar, more batteries?

  3. You are using MQTT to connect to HA. Is it possible only via Viktron Gateway CCGX? Are you able to control power flow from HA in order, for example, limit charging from the generator, when you expect sunny day tomorrow?

  1. The total cost of the PV installation was 36k€ including cabling, protections and enclosures. My yearly total consumption is in the order of 22MWh.
    Since I started collecting statistical electricity prices in early April this year (8 months) I have consumed 17MWh and the equivalent statistical energy price using Spain’s index is 4,9k€ to which you have to add connections costs, electricity meter renting costs and tax for a grand total in the order of 5,7k€. At this rate, the return on the investment of 36k€ is 4,2 years.
    This is the daily energy cost curve

  2. I’m going to extend the installation by covering a new carport with panels. I’ve run simulations and this will allow me to harvest almost enough energy to never have to use backup generator. I’ll write about that in another post.

  3. I’m actually not using MQTT anymore but modbus. And yes, I’m controlling parameters such as forecast production and max charge current to fine tune the use of the generator. I’m planning on covering these features in the post, when I have a bit of time.

1 Like

Yes please it would be very interesting that you describe your solution using modbus :slight_smile:

Working on it…the write-up I mean.

1 Like

Is there any way to connect Victron devices directly to Home Assistant, i.e. just plugging the different Victron connection to USB-cables to a RPI running HA?

Not that I know. Here is a link to an official Victron document you might have read.

1 Like

Thank you for your impressive write-up. It has helped me alot to implement the HA energy dashboard.

Unfortunately I have a problem with MQTT disconnects. The MQTT keepalive has been implemented using the /keepalive method as detailed here: GitHub - victronenergy/dbus-mqtt: Venus OS service mapping the D-Bus on Venus OS to MQTT. If I close my VRM portal page (https://vrm.victronenergy.com/), the MQTT messages stop about a minute later on my Cerbo and then obviously shortly thereafter also on my Mosquitto broker.

I noticed that MQTT messages re-appear on MQTT Explorer the moment I re-open my portal page again.

Even though the keepalive is executed successfully, it seems it has no effect once I close the VRM portal page on my browser. Other devices that also connect to my Mosquitto broker continues to work without any issues. My Cerbo is on firmware version 2.94 and I noticed on the Victron Github forum that other users also experience the same problem after a Cerbo firmware upgrade.

Any suggestions how this can be resolved?

Thank you,

Nico

Can you share the code of your keep alive automation?

It seems the problem is with the /keepalive method. I replaced “/keepalive” with “/system/0/serial” and it works fine now. See the content of my automation.yaml file below:

alias: Refresh MQTT Victron
description: Request the data on the MQTT server
trigger:
  - platform: time_pattern
    seconds: /30
condition: []
action:
  - service: mqtt.publish
    data:
      topic: victron-home/R/c0847d9b49b3/system/0/Serial
      payload: >-
        {["system/0/Dc/Battery/Soc","settings/0/Settings/CGwacs/BatteryLife/SocLimit","system/0/Dc/Battery/Voltage","system/0/Dc/Battery/Temperature","system/0/Dc/Battery/Power","system/0/Ac/Consumption/+/Power","system/0/Ac/Grid/+/Power","grid/30/Ac/Power","system/0/Dc/Pv/Power","battery/512/Soc","solarcharger/+/Yield/Power",,"solarcharger/+/State","system/0/Ac/ActiveIn/Source","system/0/SystemState/State"]}
mode: single

Ok, good to know you could solve it.

I have been scouring the Internet for a solution to what I want to do but all I get is a lot pieces to the puzzle but I can’t see the picture to put it all together. I know this question is a bit off-topic, but I am hoping someone could point me in the right direction.

I have a Victron setup with a Cerbo GX which I have successfully integrated with Home Assistant. I can get readings from my Victron Inverter, Pylontec batteries etc. I have wired my garage door sensors to the digital IO pins of the Cerbo and I can read the states via MQTT and show them with button cards in HA.

What I now want to do is to control the doors (open and close) with the relays on the Cerbo by pressing the buttons in HA. I have wired the relays to the garage door openers, and I can trigger them via the Cerbo’s remote console. What I am having difficulty with is how to do this with HA. With all the different options in HA it is difficult to figure out what the “correct” way is to accomplish this, automations, services, covers, template etc. etc. It is a bit overwhelming!

The relays should be “pulsed”, IOW they shouldn’t stay in the open or closed position but be in the open state for say 300ms then close again. Repeating this moves the doors in the opposite direction to what they did before. So, if the door is closed, sending a “pulse” to it, opens it. If you pulse it again, the door stops, pulse it again and it closes again etc.

If I can get some guidance, or a post that solves this use-case, I’d be very grateful.

Thank you very much and my apologies for the hijack!!

Indeed that is quite a stretch but hey, we’re here to try to help aren’t we?
Try this [Solved] Pulse relay on tapping I don’t see why it wouldn’t work for you.

But a remark if I may. It’s not because you can do it that you should. I explain myself. The Cerbo has 2 relays and one day you’ll want to control more stuff and then what? Maybe you should think about long term using things like KNX or similar which are made for what you need and are scalable.

Indeed, this is not a scalable solution, but it is all I need for the moment. When I outgrow the Cerbo I will look into other solutions.

Thank you for the link. Much appreciated!

My issue when using the “/keepalive” was the incorrect use of the brackets {} in the payload statement. It should have been: [“system/0/Dc/Battery/Soc”,"settings/…] i.e. without the {…}.

:see_no_evil: