E3DC binding

Tags: #<Tag:0x00007f1731e2d1d8>

It was a long wish of mine to replace the nice modbus solution (to connect my E3DC) with a proper binding.

This binding is not based on modbus as this has several restrictions (few values, readonly, …) but the AES encrypted RSCP. I could just come to this point as @bvotteler has already solved nearly all the struggl around RSCP and AES in his library and example.

There is an early stage prove of concept which I would love to share (by now it’s read-only). Please expect to find bugs and please expect that the code is far away from being ready to start the merge process (expect some log-noise).

To get it working you need:

  • Two files
    the addon and
    the bouncycastle encryption lib that both should be placed in the Addon directory of a version 3+ openHAB installation.
  • You need to have the E3DC portal registered (username, password) and in the E3DC an RSCP password set. Furthermore you need the IP adresse of the E3DC device
    With that you should be able to setup the thing.

How would I like the work to continue:

  • There is a ton of data that one could get from the RSCP protokoll. I pulled with a test programm everything I could get but for a lot of data I don’t have any clue what it is about and what we could use it for, so I’d be happy for any suggestion what data is useful/any usecase. Data that could be pulled are (very likely) strings from the tags that include the string ‘REQ
  • In the same file there are some ‘SET’ activities that correspond to writing. I didn’t look into that deeper.
  • From another example (function ControlLoadData line 116) I’d conclude that TAG_EMS_REQ_SET_POWER_MODE is quite interesting to steer when and with what power the battery is (un)loaded (so switch from auto to manual mode)
  • Get the code merge-ready … :slight_smile:

If you want to have a look at the current state of the code you can find it here.

1 Like

Björn thanks for your work. Out of the box it works. As posted before, I would like to replace the calculation of energy consumption, with pulling it directly form the E3Dc. This is an appreciated feature :blush:.
Sadly my circuit brakers form the batteries come today, so I assume I have some failure in the controlling board or the batteries. In best case they are only deeply unloaded. So I have to wait for the service before I can test the binding further.

Thanks for the feedback. Touch I have an example I’m struggeling a bit with the precision as I tried to rebuild the daily figures that I could see on the E3DC page. Unfortunately it’s not possible to get just some counter but only the values for a range. Not sure which range would be best for a openHAB addin: daily, hourly, 5 min, time between pulls, …

Will add that to the list of features that I try to implement first.

I know the pulling is done via range. As I remember E3Dc is publishing every 15 min into their cloud service. But every 5 min is nice, if you want to do persistence within Openhab.
In KNX you can create new channels to every thing you created. I don’t know if it is possible, to make it flexible to everybody, the binding can provide such channels, where you can create defined ranges for day, weeks, month, as you like. But this is for sure a deluxe solution.

Because my system has had a failure, I had a call yesterday. E3Dc is checking some parameters, such Battery Temp, voltage between battery cells. This is only for surveillance or predicative maintenance but no real use case. But Errors would be helpful.

Additional Use Case, in the E3Dc App there is a forecast available providing the amount of energy possible available during the day. I have to admit I didn’t find it within the RCSP documentation.

Additional Use Case not for me today, but maybe for others, Charging from E-Vehicles. Releasing Charing, or Stopping.
But in the end pretty amazing how fast the first version was available. Thanks a lot for your work.

forum down, so once more:

I extended @bjoernbrings version with writing capabilites for the power settings (Smart charge - weather forecast, SmartPower)

  • WeatherRegulatedCharge
  • PowerLimitsUsed
  • MaxDischarge
  • MaxCharge
  • DischargeStart
  • PowerSave

direct download for the jar: https://github.com/RealMalWare/openhab-addons/releases/download/poc%2B%2B/org.openhab.binding.e3dc-3.1.0-SNAPSHOT.jar

PR is created: Added write function for power settings by RealMalWare · Pull Request #1 · bjoernbrings/openhab-addons · GitHub

1 Like

For better understanding (though with german texts) I put the channel names on a screenshot of the E3DC S10 Portal.

Setting PowerLimitsUsed to off, resets the enclosed charging values. I’m not sure yet what happens if the values get changed afterwards. They should be ignored…

1 Like