PyPi_GrowattServer icon indicating copy to clipboard operation
PyPi_GrowattServer copied to clipboard

[FR] Option to use official web API

Open Saentist opened this issue 2 years ago • 2 comments

As was suggested by @marcovtwout

It's better to use and official way to GET data and SET parameter's documentation link https://www.showdoc.com.cn/262556420217021

Templates by device models can be made also.

And will be more informative then this basic scrape in configuration.yaml with work from lot of time

multiscrape:
  - name: HA scraper
    resource: https://server.growatt.com/singlePage/getPlantData
    scan_interval: 300
    method: POST
    headers:
      Content-Type: application/x-www-form-urlencoded
    payload: 'plantId=xxxxxxx' #plant id number
    sensor:
      - unique_id: 4200TLXE_today
        name: Inv1 day 
        value_template: '{{ value_json.obj.eToday }}'
        unit_of_measurement: kWh 
      - unique_id: 4200TLXE_month
        name: Inv1 Month
        value_template: '{{ value_json.obj.eMonth }}'
        unit_of_measurement: kWh 
      - unique_id: 4200TLXE_total
        name: inv1_tot
        value_template: '{{ value_json.obj.eTotal }}'
        unit_of_measurement: kWh 
        device_class: energy
        state_class: total_increasing
      - unique_id: 4200TLXE_now
        name: inv1_realtime
        value_template: '{{ value_json.obj.pac }}'
        unit_of_measurement: kW 

Saentist avatar Jan 25 '24 22:01 Saentist

hello, if i understand it correctly this is only usefull for installers or distibutors isnt it? I cant seem to create an account on oss.growatt.com if i am not either of those two. Is there a way around this? thanks

simonf2004 avatar Jul 11 '24 17:07 simonf2004

End user portal server.growatt.com

Saentist avatar Jul 15 '24 15:07 Saentist