E3DC with the new modbus binding

@mal Great. :re the Wallbox config: I am only interested displaying the charging power and the PV-charging power in realtime, so uncommented the two things you already put in, created the resp. items and added them to the sitemap… so really pretty easy job based on your excellent work.
Some time in the future, I will start working on some charting, similar to what you show in your post.

I would really like to be able to control the E3DC system via Openhab at some point in time. Anyone of the experts interested in developing a binding for that, using the E3DC RSCP interface?

here is my next question: I have a ton of entries in the event log. How can I reduce that effectively? I tried to insert an entry for the modbus binding in the log-config file … but that did not work.
thanks for your help.

can anyone please help a newbe out here.
I tried to limit the amount of log entries coming from the E3DC Modbus by adding the following lines to the logging.cfg file, but it did not change the logging level at all :

Custom Log levels

Modbus

log4j2.logger.org_openhab_binding_modbus.name = org.openhab.binding.modbus

log4j2.logger.org_openhab_binding_modbus.level = WARN

log4j2.logger.org_openhab_io_transport_modbus.name = org.openhab.io.transport.modbus

log4j2.logger.org_openhab_io_transport_modbus.level = WARN

Perhaps that’s the part to fix. What kind of entries? (sample?)

all of the entries are “INFO” type entries, I guess … I like to change the logging level to “Warning”.

2018-11-02 16:15:09.921 [vent.ItemStateChangedEvent] - E3DC_Voltage_String2 changed from 518 to 521

2018-11-02 16:15:09.931 [vent.ItemStateChangedEvent] - E3DC_Current_String1 changed from 20 to 21

never mind … found a way to get this fixed with a filter added to the log config file
Filters in Log - Config File

Okeydoke; the logs come from OH Item updating, not Modbus particularly.

You could perhaps poll voltages less often (do you really care about small changes?) but even then I expect you want fairly frequent current polls.

Hi Marco,

thank you - so great that you wrote this tutorial.

Unfortunately my Things seems to get no Updates. I think i configured everything right, as my “E3DC Modbus TCP” shows the Status “online”. But all other Things show “Offline-Communication Error”

Do you know where to start my search? I use Openhab 2.4.
image

Thank you in advance
Alex

Have a look in openhab.log for modbus related messages.

Just for info - latest version of modbus binding includes a new feature, allowing you to greatly reduce Item updates when polling a value that doesn’t change.

1 Like

Hi, I just went through your instructions step by step.
I would also like to have the graphic from the top of your description.
I have the whole thing installed on the Raspberry.
Can you help me?
What can I post here to make you transparent where my mistake lies?
Thank you.

Danke für die Anleitung.
Ich hatte Openhab 2.3 mit funktionierendem Modus Bindung für E3DC. Nach der Aktualisierung auf Openhab 2.4 funktioniert es nicht mehr.

Mit dieser Anleitung hab ich das Modbus Binding für meine E3DC-Anlage wieder hingekriegt.

Lediglich der Wert für den Hausverbrauch wird nicht korrekt ausgelesen:

Thing data Consumption “E3DC Consumption” [ readStart=“71”, readValueType=“int32_swap”]

Number E3DC_Haus “E3DC Hausverbrauch” <poweroutlet> (E3DC) { channel=“modbus:data:e3dc:polling:Consumption:number” }

Ich hab Thing und Item schon gelöscht und neu angelegt. Lt. log wird der Wert einmalig ermittelt (aber mit nem falschen Wert) … dann erfolgt kein Update mehr.

Wie komm ich dem Fehler auf die Spur ?
Danke

Jürgen

Ist es normal, dass er bei Things unter dem Modbus garnichts anzeigt?

image

Die Dateien liegen unter folgenden Verzeichnissen:
/usr/share/openhab2/addons/org.openhab.binding.modbus-2.4.0-SNAPSHOT.jar
/etc/openhab2/things/E3DC.things
/etc/openhab2/items/E3DC.items
/etc/openhab2/transform/e3dc-ems_de.map
/etc/openhab2/sitemaps/E3DC.sitemap

Fortschritt:


Jetzt muss ich nur noch die Grafik von oben hin bekommen und dann über Homebridge ins Apple Homekit bekommen…

Hello everybody,
how can it be that I have wonderful data in the web interface but not in the iOS app. It’s also strange that it does display the German translations in iOS but not on the web interface.
Can someone tell me where to change something?
Thank you.

Hi, just used this great tutorial to integrate the E3DC in openhab. It is working flawlessly.
i have one question: how can you set switches? currently everything is just reading. how does writing Modbus states work? I want to trigger “Ladesperre” for example using openhab automation.

Regards
Mario

That would be this Item, yes?

This is not going to be straightforward.
First thing you need to find out is if the device (about which I know nothing) will actually let you switch this from modbus?
If so, how? There is no rule that modbus status and control have to in the same register or even register type.

If we assume the likely case for now, reading and writing from the same modbus register, we run into a snag.

Thing data EMS_Charge_Lock		"E3DC EMS charging locked"		[ readStart="84.0", readValueType="bit"]
Thing data EMS_DisCharge_Lock		"E3DC EMS discharging locked"		[ readStart="84.1", readValueType="bit"]
...

This group of device status are represented as single bits in a 16-bit register. (that the 84.0 part, bit 0 in register 84)
It is not possible for modbus binding to write a single bit in a register.
The closest you can do is write the whole register with that one bit set as you wish.
That would not be too difficult - but the hard part is what about the other bits? Presumably you need to remember what they are and write the register with all of the important bits set the way they last were, except the one you want to change.

That can be done with some coding, but I won’t go into it unless needed. Find out how your E3DC expects modbus writing to happen.

The general idea for bits-in-register writing is here

Thanks for your explaination.
i’ve just checked the vendor documentation and on top of the document it says “control via modbus is not possible, only read access” :frowning:

That’s disappointing. Marketing decision perhaps.

As I mentioned above, for controlling the E3DC via openhab, we would need a binding that builds on the E3DC RSCP interface.

“I would really like to be able to control the E3DC system via Openhab at some point in time. Anyone of the experts interested in developing a binding for that, using the E3DC RSCP interface?”