RavenSystem / esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)
Other
2.76k stars 361 forks source link

JSON readability suggestion #871

Closed i3laze closed 4 years ago

i3laze commented 4 years ago

As @RavenSystem told million times there's little space in the Flash to store all the "Relay" "Accessory" and other Words of the JSON config, that is why shortened "l","e","t","t","e","r","s" were introduced.

Every time once a year when I try to reconfig HAA, I'm down for an hour into Wiki. It's always hard for me to decipher JSON, and https://glumb.github.io/haa-configurator/ barely helps.

Suggestion: Please, introduce an alternate JSON view (some checkbox on HAA Setup webpage) with words exploded to "Accessory", "Type", "Relay" and then strip them on the fly back to "a","t","r" when saving to flash. I believe such two-way replace code for Setup page will be dozen lines long.

Example - empty accessory: {"c":{},"a":[]} Same example with explode checkbox On: {"Config":{},"Accessory":[]}

As your JSON input field is too narrow I cross-posted a suggestion here: https://github.com/glumb/haa-configurator/issues/8

i3laze commented 4 years ago

Just an illustration of HAA config readability compared with Tasmota:

image

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

freddair commented 4 years ago

+1 for this!

RavenSystem commented 4 years ago

JSON is as it because memory and storage are very important. You can use a simple find and replace to create your own tool.

beren12 commented 4 years ago

It would be nice to have the ability to switch back and forth though, feed the tool one and it spits out the other :)