Closed andreondra closed 1 year ago
wonderful \o/
My small contribution : https://github.com/sbechet/sermatec-ess
@sbechet Great find! If you want, you may add these to the docs folder in this repo and send a PR. I'll translate the files and we can use them to enhance the script.
Hello andreondra,
Thank you for your work. I added a small script to manage the translation automation to plan the next versions of the android application.
json file is self supporting for documentation
I think it will be a better idea to use this json file directly. I don't know if you mean rust but we can use clap
crate for cli, json serde
crate to deserialize the json file then, maybe nom
crate for some of the rest. It seems to me that it will be less work than rewriting everything manually.
What do you think ? Good or bad idea ?
Hi @sbechet,
the files you found appear to contain all the information needed (the file I found had a different structure and some information were missing, so it was kinda unreliable source). If we verify that these files contain correct information, we should use them directly, as you say, that's the way the original app works.
That would allow us not only to generate the Markdown documentation easily, but also to load all the information in the script directly from the files - now as you can see the commands are hard-coded, which was OK for a few commands but if we want to support all of the them (and keep up to date), it would be a pain to maintain.
However, there are some things we need to adjust in the original jsons: 1) Translate the descriptions and check the translations for the syntactical or semantic errors. 2) Add tags to fields where they are missing so we can use them to generate an output json in the script (the field names are also hard-coded in the current script version = horrible).
So I suggest we inspect the structure of the jsons, verify the compatibility and write a script that will preprocess the files (translate, add the tags and probably some more enhancements). The cn2en.sh
is a good start.
From the preprocessed files we can generate the docs and load the commands in the script, making the json files the single source of truth.
Thank you for your suggestion and let me know what do you think.
Information in file seems really useful, checked few addresses in my proxy, seems that we're on the good way doing something amazing... ^_^
Hi @andreondra,
I'm checking out all information in this file, I'll made a PR to update your sensors.
Tested the file data : seems really reliable, don't get all informations filled, but probably due to my hardware setup...
Hi @mathieupotier,
good job! That sounds wonderful. I'll focus on making a protocol.json parser and I'll also open new relevant issues, so have a look and let me know if you wanna work on any or open another issue. :)
This issue will be closed now, because the project will be now re-implemented as I described in this comment based on @sbechet's suggestion.
A file describing whole protocol was found - it can't be published in its original form but it will probably help to implement the rest of the protocol without a need of a packet sniffing.
Rewrite the information from the file to the documentation