Hi, I just want to share with you my configuration for getting the generated power from my Beem Solar panels.
Since there is no local API, alas, I configured a sensor that get the generated power through their (unexposed) remote API.
template:
- sensor:
- name: post_data
state: '{"month":{{now().strftime("%m").lstrip("0")}},"year":{{now().strftime("%Y")}}}'
sensor:
- platform: command_line
command: "curl -X POST -H --location 'https://api-x.beem.energy/beemapp/box/summary' --header 'authorization: Bearer ********************' --header 'content-type: application/json; charset=UTF-8' --header 'Accept: */*' --data '{{ states('sensor.post_data') }}'"
name: "Solar Power"
scan_interval: 60
value_template: "{{ value_json[0].wattHour }}"
unit_of_measurement: W
unique_id: "Solar Power"
You can get your bearer token inspecting with Chrome their website (a web app in Dart I think): Beem Energy. As for now there is no exposed API and no exposed methos to get the bearer token.
In the API usage youâll find the POST Iâm using above.