Hello,
at our home we have solar panels from Autarco. i have contact them about a API
and this was wat i get.
GET https://my.autarco.com/api/site/[key]/power
Je locatie heeft een identificerende sleutel, een string van 8 tekens die je in de URL van je locatiepagina in MyAutarco kan terugvinden.
Met de optionele query parameter “d” kun je een datum meegeven in de vorm van Ymd, dus bijv. 20180912. Default is vandaag.
Met de optionele query parameter “r” kun je een range opgeven, ofwel “day” of “week”. Default is day.
GET https://my.autarco.com/api/site/[key]/energy
Met de optionele query parameter “d” kun je een datum meegeven in de vorm van Ymd, dus bijv. 20180912. Default is vandaag.
Met de optionele query parameter “r” kun je een range opgeven “month”, “year” of “total”. Default is month.
If i request it with my browser i get the following Json file:
{"dt_config_changed":"2017-11-13T14:14:07+00:00","inverters":{"970016810165":{"sn":"970016810165","dt_latest_msg":"2021-08-04T16:24:16+00:00","out_ac_power":206,"out_ac_energy_total":6138,"error":null,"grid_turned_off":false,"health":"OK"},"950017307305":{"sn":"950017307305","dt_latest_msg":"2021-08-04T16:24:35+00:00","out_ac_power":277,"out_ac_energy_total":3381,"error":null,"grid_turned_off":false,"health":"OK"}},"stats":{"graphs":{"pv_power":{"970016810165":{"2021-08-04 00:00:00":0,"2021-08-04 00:15:00":0,"2021-08-04 00:30:00":0,"2021-08-04 00:45:00":0,"2021-08-04 01:00:00":0,"2021-08-04 01:15:00":0,"2021-08-04 01:30:00":0,"2021-08-04 01:45:00":0,"2021-08-04 02:00:00":0,"2021-08-04 02:15:00":0,"2021-08-04 02:30:00":0,"2021-08-04 02:45:00":0,"2021-08-04 03:00:00":0,"2021-08-04 03:15:00":0,"2021-08-04 03:30:00":0,"2021-08-04 03:45:00":0,"2021-08-04 04:00:00":0,"2021-08-04 04:15:00":0,"2021-08-04 04:30:00":0,"2021-08-04 04:45:00":0,"2021-08-04 05:00:00":0,"2021-08-04 05:15:00":0,"2021-08-04 05:30:00":0,"2021-08-04 05:45:00":0,"2021-08-04 06:00:00":0,"2021-08-04 06:15:00":0,"2021-08-04 06:30:00":0,"2021-08-04 06:45:00":0,"2021-08-04 07:00:00":29.67,"2021-08-04 07:15:00":194.67,"2021-08-04 07:30:00":243.67,"2021-08-04 07:45:00":493.67,"2021-08-04 08:00:00":732,"2021-08-04 08:15:00":578.67,"2021-08-04 08:30:00":749.67,"2021-08-04 08:45:00":323.33,"2021-08-04 09:00:00":586.67,"2021-08-04 09:15:00":612,"2021-08-04 09:30:00":487.67,"2021-08-04 09:45:00":451.33,"2021-08-04 10:00:00":545.33,"2021-08-04 10:15:00":1163,"2021-08-04 10:30:00":1329,"2021-08-04 10:45:00":978,"2021-08-04 11:00:00":1316.67,"2021-08-04 11:15:00":1318.67,"2021-08-04 11:30:00":1289,"2021-08-04 11:45:00":1283,"2021-08-04 12:00:00":1309.67,"2021-08-04 12:15:00":1272,"2021-08-04 12:30:00":717,"2021-08-04 12:45:00":850.33,"2021-08-04 13:00:00":344,"2021-08-04 13:15:00":287.67,"2021-08-04 13:30:00":373,"2021-08-04 13:45:00":825,"2021-08-04 14:00:00":960,"2021-08-04 14:15:00":767,"2021-08-04 14:30:00":344.33,"2021-08-04 14:45:00":320.5,"2021-08-04 15:00:00":731,"2021-08-04 15:15:00":256.67,"2021-08-04 15:30:00":150.33,"2021-08-04 15:45:00":157.67,"2021-08-04 16:00:00":158.67,"2021-08-04 16:15:00":222,"2021-08-04 16:30:00":292.67,"2021-08-04 16:45:00":261.67,"2021-08-04 17:00:00":237.33,"2021-08-04 17:15:00":187.67,"2021-08-04 17:30:00":187.67,"2021-08-04 17:45:00":234.33,"2021-08-04 18:00:00":254,"2021-08-04 18:15:00":240.5},"950017307306":[],"950017307305":{"2021-08-04 00:00:00":0,"2021-08-04 00:15:00":0,"2021-08-04 00:30:00":0,"2021-08-04 00:45:00":0,"2021-08-04 01:00:00":0,"2021-08-04 01:15:00":0,"2021-08-04 01:30:00":0,"2021-08-04 01:45:00":0,"2021-08-04 02:00:00":0,"2021-08-04 02:15:00":0,"2021-08-04 02:30:00":0,"2021-08-04 02:45:00":0,"2021-08-04 03:00:00":0,"2021-08-04 03:15:00":0,"2021-08-04 03:30:00":0,"2021-08-04 03:45:00":0,"2021-08-04 04:00:00":0,"2021-08-04 04:15:00":0,"2021-08-04 04:30:00":0,"2021-08-04 04:45:00":0,"2021-08-04 05:00:00":0,"2021-08-04 05:15:00":0,"2021-08-04 05:30:00":0,"2021-08-04 05:45:00":0,"2021-08-04 06:00:00":0,"2021-08-04 06:15:00":0,"2021-08-04 06:30:00":0,"2021-08-04 06:45:00":0,"2021-08-04 07:00:00":0,"2021-08-04 07:15:00":0,"2021-08-04 07:30:00":15.33,"2021-08-04 07:45:00":46,"2021-08-04 08:00:00":116,"2021-08-04 08:15:00":154.33,"2021-08-04 08:30:00":217,"2021-08-04 08:45:00":163,"2021-08-04 09:00:00":248.67,"2021-08-04 09:15:00":237.67,"2021-08-04 09:30:00":206.67,"2021-08-04 09:45:00":192,"2021-08-04 10:00:00":216,"2021-08-04 10:15:00":431.5,"2021-08-04 10:30:00":567,"2021-08-04 10:45:00":561,"2021-08-04 11:00:00":551,"2021-08-04 11:15:00":640,"2021-08-04 11:30:00":669,"2021-08-04 11:45:00":687.33,"2021-08-04 12:00:00":744,"2021-08-04 12:15:00":770.67,"2021-08-04 12:30:00":500.33,"2021-08-04 12:45:00":615.33,"2021-08-04 13:00:00":238.67,"2021-08-04 13:15:00":182.67,"2021-08-04 13:30:00":244.33,"2021-08-04 13:45:00":347.33,"2021-08-04 14:00:00":920.67,"2021-08-04 14:15:00":717.67,"2021-08-04 14:30:00":339.67,"2021-08-04 14:45:00":269,"2021-08-04 15:00:00":675.67,"2021-08-04 15:15:00":182.67,"2021-08-04 15:30:00":105.67,"2021-08-04 15:45:00":83.33,"2021-08-04 16:00:00":91.33,"2021-08-04 16:15:00":208,"2021-08-04 16:30:00":301.67,"2021-08-04 16:45:00":341.33,"2021-08-04 17:00:00":301.67,"2021-08-04 17:15:00":151.33,"2021-08-04 17:30:00":166.33,"2021-08-04 17:45:00":367.33,"2021-08-04 18:00:00":489.67,"2021-08-04 18:15:00":288.5}},"no_comms":[]},"kpis":{"pv_now":483}}}
My question is how do i get for example: “pv_now” in my home assitant?
i tried the following:
- platform: command_line
name: Autarco_Power
command: curl -s 'https://my.autarco.com/api/m1/site/********/power' | jq 'pv_now'
scan_interval: 10
unit_of_measurement: W
but i dont get it to work.
i hope somebody can help me?