mysensors.json file structure
-
Hi @sindrome73 by instructions here https://home-assistant.io/components/mysensors/ you chose path to .json file (and it is automatically created after that) by adding path to it to your configuration.yaml
@sindrome73 It's not used unless you use Home Assistant as a controller for mysensors.
@Richard-van-der-Plas It's a JSON file, so you can use any editor that understands json to edit it. No need to use nano or vi.
I personally use notepad++ to remote edit files on my server, it has a nice json plugin to pretty print json files. You could also use an online editor, e.g https://jsonformatter.org/ or something.
-
@maghac problem is my limited editor / shell on chrome os makes it a tediuos job on selecting the line :(
can you paste the formatted data back to the file? (with enters etc?). i thought the first round mysensors edits the file its a flat file again ?. -
I use atom editor where there's a plugin that can automatically format the json prettily. But we can add formatting to the dump, I don't see anything hindering that.
I'll happily except a PR that adds indentation to the json dump. Otherwise I can do it when I find some time.
-
Hi all.
@maghac Can you please share what plugin do You use? I already use np++ but have not thought of that, thanks.@martinhjelmare Can atom editor can connect to my home assistant files through
sshwithout using samba shares as np++ can with plugins? If so, I should check that.Otherwise, no worries about rushing this implementation and thanks for your work.
-
Hi all.
@maghac Can you please share what plugin do You use? I already use np++ but have not thought of that, thanks.@martinhjelmare Can atom editor can connect to my home assistant files through
sshwithout using samba shares as np++ can with plugins? If so, I should check that.Otherwise, no worries about rushing this implementation and thanks for your work.
I don't think atom can connect via ssh.
-
I think this plugin does what you want:
https://atom.io/packages/remote-ftp -
@sindrome73 It's not used unless you use Home Assistant as a controller for mysensors.
@Richard-van-der-Plas It's a JSON file, so you can use any editor that understands json to edit it. No need to use nano or vi.
I personally use notepad++ to remote edit files on my server, it has a nice json plugin to pretty print json files. You could also use an online editor, e.g https://jsonformatter.org/ or something.
@maghac I loved https://jsonformatter.org and also uses https://codebeautify.org/jsonviewer
-
Hi all.
@maghac Can you please share what plugin do You use? I already use np++ but have not thought of that, thanks.@martinhjelmare Can atom editor can connect to my home assistant files through
sshwithout using samba shares as np++ can with plugins? If so, I should check that.Otherwise, no worries about rushing this implementation and thanks for your work.
-
I use atom editor where there's a plugin that can automatically format the json prettily. But we can add formatting to the dump, I don't see anything hindering that.
I'll happily except a PR that adds indentation to the json dump. Otherwise I can do it when I find some time.
I made a pull request over on github, if @martinhjelmare accepts it we should be good to go.
