-
Notifications
You must be signed in to change notification settings - Fork 66
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 Modbus Sunspec compatibility to opendtu-onbattery #1150
base: development
Are you sure you want to change the base?
Conversation
This reverts commit 5617240ce1fb15a3796d1ed558cc89f9ba72d8d5.
… "Total Power" and "Total Yield" into registers.
merge 23.6.26
prevent sending 0 as "e_energy_exported" to avoid peaks and gaps in solarweb statistic
merge v23.6.28
merge v23.8.3
thanks for your effort. another thing, it would be good, if your changes would be based on helgeerbe:development or :master, too. right now, your changes are based on a fork of the upstream project, which makes it difficult to compare or include as there may be many more changes than you actually want to add. On the other hand, it is now only "+278/-3", which is much less than the previous "+3,652/-2,191". So I think the developer can work with that. |
merge v24.8.5
I am sorry for the confusion In a yet (in my repository) not commited change I created configuration for the necessary sunspec fields so it may be compatible with other inverters which do the same. I will update this PR as soon as I have tested all the changes well enough. |
add configuration for elements to equip with custom vendor strings.
There are still a lot of unrelated changes, please make sure that you base your branch off of the OpenDTU-OnBattery development branch.
Please do not commit any file within |
@@ -76,6 +76,16 @@ struct CONFIG_T { | |||
bool Enabled; | |||
} Mdns; | |||
|
|||
struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add bool verboseLogging
to your struct and use that to enable/disable logging within your Modbus module instead of commenting the logging lines.
@@ -45,6 +45,7 @@ lib_deps = | |||
nrf24/RF24 @ 1.4.9 | |||
olikraus/U8g2 @ 2.35.19 | |||
buelowp/sunset @ 1.1.7 | |||
https://github.com/emelianov/modbus-esp8266#master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we point to a specific commit or release-tag instead of a branch?
This might break builds at any point in the future without us knowing whats going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently not, as there is a change which is most probably needed in master only:
emelianov/modbus-esp8266#292
as soon as there is a 4.1.2 (or whatever) released I think this one could be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you specific the commit hash with #a5872af7250e03e9a5cd578366b0c2cdc097fcc9
instead of #master
you can make sure that the dependency won't get updated randomly with the next push to master
// mb.Hreg(0x9cbb, 0); | ||
// mb.Hreg(0x9cbc, 0); | ||
// mb.Hreg(0x9cbd, 0); | ||
// mb.Hreg(0x9cbe, 0); | ||
// mb.Hreg(0x9cbf, 0); | ||
// mb.Hreg(0x9cc0, 0); | ||
// value = (inv->Statistics()->getChannelFieldValue(TYPE_AC, CH0, FLD_YT)*1000); //done above already! | ||
// if (value > _lasttotal) { | ||
// _lasttotal = value; | ||
// mb.Hreg(0x9cc1, hexbytes[1]); //done above already! | ||
// mb.Hreg(0x9cc2, hexbytes[0]); //done above already! | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove commented lines if they are not needed
|
||
ModbusDtuClass ModbusDtu; | ||
|
||
ModbusDtuClass::ModbusDtuClass() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense if we call it ModbusSunspec
or SunspecModbus
to explain what this is actually doing?
Do you have any documentation about the protocol that youa re implementing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this implementation is (maybe only partially) modbus-sunspec compatibility to simulate a sunspec energy-meter.
as far as I could google, this should match to "sunspec meter" registers in float mode.
I could not check if it is the complete protocol or only partial.
at least, if I check against fronius documentation, it is complete.
91cc2fc
to
8ff94e7
Compare
this implementation is (maybe only partially) modbus-sunspec compatibility to simulate a sunspec energy-meter.
to have calculation (especially self-consumption) correct for e.g. fronius solar web you need to either place a 300€ fronius smart meter before each "foreign" inverter.
With this PR it is possible to configure OpenDTU with it's IP-address as a "Smartmeter" on Fronius Gen24 or Fronius Symo inverter. so the Fronius Inverter is able to poll current production and overall production continuously like a from a real fronius-smartmeter.
necessary configuration on OpenDTU:
configuration on an Gen24 Inverter:
visualisation on an Gen24 inverter:
visualisation of the additional "Smartmeter" in Fronius Solarweb as "Additional AC Source":
visualisation of the "Smartmeter" data in Solarweb is available as common curve like other inverters are:
for my OpenDTU (and also some other users of photovoltaikforum.com) this implementation is running now over a year (more or less) flawless.
to the PR: the tree conflicting files webapp_dist/* need to be resolved on merge. other conflicts I could solve.