Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Victron Cerbo / VRM portal #377

Closed
wants to merge 5 commits into from

Conversation

stromibaer
Copy link

Hello,
to get information about the Hoymiles inverters in the Victron VRM Portal i add some code like the MqTT Homeassistant implementation for the Victron Cerbo. Enabling the MqTT part for Victron in the MqTT settings:

image

And putting the inverter to the right current phase (L1,L2 or L3):

image

The OpenDTU is sending the serial to Victron Cerbo and the devices will be registered as MqTT device via the https://github.com/freakent/dbus-mqtt-devices installed on Victron Cerbo:

image

After the registration the OpenDTU is publishing via MqTT the values of the Hoymiles inverters to the Victron Cerbo:

image

And in the Victron VRM portal you will see an inverter:

image

It is possible to set the position of the inverters on AC-IN or AC-OUT, when the services.yml is adopted like: freakent/dbus-mqtt-devices#23

image

And when setting the current phase in the inverter menu to "None" or "L0", the inverter will be disabled in the Victron Portal:

image

and can be removed from the device list with:

image

added some source to publish Hoymiles values via MqTT to Victron Venus OS mosquitto server, subscribe at Victron OS mosquitto server to get portal ID and deviceInstance.

Add support for Victron Cerbo / VRM portal

Some new functions and variables for publishing values via MqTT to Victron Venus OS mosquitto server.

code cleaning

victron part in webapp

Current phase input

publisch phase

bugfix current phase

bugfix

hh

lll

df

ll

dsgdsg

xvccxv

sfsfd

sdfsdf

dgfsdf

hh

ff

dgdfg

d

dsfdsf

asf

Update code from master

Runden und Schleifenänderung

round#1

round#2

round#3

round#4

Searching for value 0 in Voltage

Finding some errors

Fieldname and value corrected

sfdsdf

adfdsf

Try to save some memory

Loopänderung um Registrierung nicht alle 5 sekunden auszuführen.

Changed inverter registration procedure, similar to Hass

Fehler in Variablenvereinbarung behoben.

Maxpower & Errorcode in loop eingefügt
Copy link
Owner

@tbnobody tbnobody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did a first rough review.
Some general remarks: It would be nice if the victron code would be as much as possible in the dedicated victron class. Is there really a need to move it into the MqttPublishing class?

VSCode also provides an auto code formatter. Just press F1 and choose "Format Document" (or "Dokument formatieren"). This would lead to a unique code style.

include/Configuration.h Outdated Show resolved Hide resolved
include/MqttSettings.h Outdated Show resolved Hide resolved
include/MqttVictronPublishing.h Show resolved Hide resolved
src/Configuration.cpp Outdated Show resolved Hide resolved
src/MqttSettings.cpp Outdated Show resolved Hide resolved
src/MqttPublishing.cpp Outdated Show resolved Hide resolved
src/MqttSettings.cpp Outdated Show resolved Hide resolved
src/WebApi_inverter.cpp Outdated Show resolved Hide resolved
src/MqttPublishing.cpp Outdated Show resolved Hide resolved
src/MqttPublishing.cpp Outdated Show resolved Hide resolved
@tbnobody
Copy link
Owner

Another general hint... you should not merge my future commits into your branch. This would lead to the following commit order (sample):

  • my changes
  • my changes
  • your changes
  • your changes
  • my future changes
  • your future changes

This is very bad if I want to merge this later on.
It would be better if your commits are always on top of the current master:

  • my changes
  • my changes
  • my future changes
  • your changes
  • your changes
  • your future changes

This can be achieved by rebasing your changes on top of mine. This is described here: https://ardupilot.org/dev/docs/git-rebase.html

This can also be done in the VSCode UI. Your current branch should be your feature branch and you should rebase onto the upstream master:
grafik

The downside of this technique is, that you are rewriting your git history because you are changing the order of your commits compared to the upstream master.
That means that you cannot just push them to your remote repo. You have to force push. This is bad practice if you are developing in a branch which other people cloning and using. But if you are developing in a feature branch which is also a Pull request it's ok

@stromibaer stromibaer deleted the branch tbnobody:master November 26, 2022 20:49
@stromibaer stromibaer closed this Nov 26, 2022
@stromibaer stromibaer deleted the master branch November 26, 2022 20:49
Copy link

github-actions bot commented Apr 8, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants