Hi, I just want to see if anyone knows how to integrate a JSON Output from a solis-inverter (Solar Panels) to Home Assistant, to be able to read it’s values. I have the following json output:
You do have problem with the json since there appear to be some trailing commas which makes the json invalid. For instance,
"model":"00B7",,"firmwareMain"
You have two consecutive commas here which is invalid json. Not sure how to clean this up, but maybe you can use a regular expression to parse the output since the word “power” only appear once in the json output.
You have two consecutive commas here which is invalid json. Not sure how to clean this up, but maybe you can use a regular expression to parse the output since the word “power” only appear once in the json output.
My bad, I removed some information like MAC address and Serial Number, I might have skipped some commas in the process.
I did look at this https://www.home-assistant.io/integrations/rest/ before asking the question, but the only way I can get some specific data from the JSON output would be to use this line in cmd:
They seem to be a subdivision of energy. If I add the value_template as
‘{{ value_json.total }}’ or {{ value_json.today }}’
There is no data passed to home assistant. But if I write {{ value_json.energy }}’ I am getting the 2 values at the same time without proper formatting: something like
Also, if you haven’t figured it out, you dont need to restart Ha everytime you change the value_json, just go to server management and click on RELOAD REST ENTITIES AND NOTIFY SERVICES.
Wow thank you for both things, the value_template worked and yes I did reload HA each time I modify the configuration.yaml file. Way better to just reload rest entities and notify services.