john30 / ebusd

daemon for communication with eBUS heating systems
GNU General Public License v3.0
540 stars 128 forks source link

JSON like DSL instead of CSVs #30

Open john30 opened 7 years ago

koen-lee commented 2 years ago

I think this is a good idea that will make contributing easier. The CSVs have quite a learning curve and are error-prone. Could you elaborate on the reasoning of removing it from the milestone?

john30 commented 2 years ago

It is still on the road map and actually I was browsing for good JSON libs last week for another thing. Anyway, this is a very time consuming thing to do and it will still take a while. In the meanwhile I'm working on a web UI that is supposed to allow clicking configs together and talk directly to ebusd to update the definitions online.

anticultist commented 1 month ago

Maybe a intermediate json format could be a good starting point. So you can transform between the json format and the current csv based format back and forth but ebusd would only understand the "old" csv based format. With this approach you could test a new json based configuration without rewriting the existing code.

By the way do you know json schema? It is a powerful json-based meta-description of the structure of a json file. With that you can get error checking or auto-completion in modern code editors like VS Code while you work with a json file. Maybe it could be useful here.

john30 commented 3 weeks ago

thats already there and of course I know json schema and there is a schema for what ebusd offers on its http port already in the openapi spec. the same schema is also produced by ebusd when using --dumpconfig=json

nevertheless I'm already working on that topic, recently by using typespec