open3e / open3e

connects E3 (vcal, vdens, vx3...) controller through can uds or doip
Apache License 2.0
97 stars 23 forks source link

Feature Request: Writing to complex DIDs #149

Open Philip-Wiege opened 2 weeks ago

Philip-Wiege commented 2 weeks ago

As far as I know there is currently no way to write complex DIDs without using raw values.

It would improve open3e if individual entries within complex DIDs can be written directly using the Codecs. Open3e would read the complex DID change only the accessed sub-DID and write back the new data.

I will try to implement if I find some spare time and maybe create a branch / fork for this. Feedback is welcome in german or english.

MyHomeMyData commented 2 weeks ago

It is possible to write complex data using JSON format, described in readme.

However, it's not possible to access a single element out of a strcuture, e.g. 538.0=0. I'm not sure if there really would be a big benefit compared to json based solution. For sure we would significantly add complexity to open3e code base.

Philip-Wiege commented 2 weeks ago

@MyHomeMyData I get your point. In my opinion external components like HomeAssistant would benefit from the possibility to write to single Sub-DIDs without handling the other Sub-DIDs in a complex DID. I suggest that I will try to implement the functionality inside of open3e and maybe we can review once it is finished.

MyHomeMyData commented 2 weeks ago

Ok, understood. Let's go ahead. Best would be to do this on a new branch.

Philip-Wiege commented 2 weeks ago

I created the branch: https://github.com/open3e/open3e/tree/149-feature-request-writing-to-complex-dids It is my first time so I hope I didn't mess up anything. As soon as I have a working version we could review.

MyHomeMyData commented 2 weeks ago

@Philip-Wiege Did you use master as base for this branch? We better should derive it from develop to simplify merging later on.

Philip-Wiege commented 2 weeks ago

Yes, I branched off from master which was maybe not the best idea. I will try to fix that and rebranch from develop.

MyHomeMyData commented 2 weeks ago

Ok. Simplest way may be to delete the branch ("View all branches") and the to create it again.

Philip-Wiege commented 2 weeks ago

Done 😄