+1 same here too. Stopped working on 20th february. I’ve changed scan_interval to 60 and 120. Nothing changed.
Monitoring without cloud:
Should you prefer keeping all the data locally and not use the Envertecportal, there is a solution called enverproxy
It is not something that can be added to HASS immediately, but it provides a script to read data from the Enverbridge locally. I have used it with success, no internet portal is required anymore.
The script listens to incoming data from the bridge and puts it on MQTT. If you are familiar with Node-RED, you could also take a look at the alternative i made: Ported the code to Node-RED · Issue #6 · zivillian/enverproxy · GitHub
I haven’t integrated the Enverbridge in HASS so you are on your own to find out how to do that.
I think Enverech has changed the API in February together with the web interface.
Now I use the values from the inverters. This will work. Only total, day, month and year energy will not work. But this values are calculated by the energy dashboard, if you use total energy from the single inverters.
How did you query the local inverter?
See post number 6.
They have change KWh to kWh, simply change it. Maybe also MWh to mWh, cant validate this.
OLD: value_template: “{{ value_json.Data.UnitETotal|replace(’ MWh’,’’)|replace(’ KWh’,’’)|float}}”
NEW: value_template: “{{ value_json.Data.UnitETotal|replace(’ MWh’,’’)|replace(’ kWh’,’’)|float}}”
This will work. Thank you!
“kWh” → Kilowatt Hours
“KWh” → Kelvin Watt Hours
“MWh” → Megawatt Hours
“mWh” → Milliwatt Hours
So kWh and MWh are correct.
Hello,
I’m a new with Home Assistant. Tried to edit the code given above to get Solar Energy Today -value to my Home Assistant. You can find my edited code below. After editing code, I can’t find selectable sensor for Energy Today.
WBR Pete
rest:
- authentication: basic
resource: https://www.envertecportal.com/ApiStations/getStationInfo
scan_interval: 60
method: POST
params:
stationID: "xxxx"
sensor:
- name: SolarTotalPower
value_template: "{{ value_json.Data.Power|float }}"
device_class: power
unit_of_measurement: "W"
json_attributes_path: "$.Data"
json_attributes:
- "PowerStr"
- "StrPeakPower"
state_class: measurement
- name: SolarTotalEnergy
value_template: "{{ value_json.Data.UnitETotal|replace(' MWh','')|replace(' kWh','')|float}}"
device_class: energy
unit_of_measurement: "MWh"
json_attributes_path: "$.Data"
json_attributes:
- "UnitEToday"
- "UnitEMonth"
- "UnitEYear"
- "UnitETotal"
state_class: total_increasing
- name: SolarEnergyToday
value_template: "{{ value_json.Data.UnitEToday|replace(' MWh','')|replace(' kWh','')|float}}"
device_class: energy
unit_of_measurement: "kWh"
json_attributes_path: "$.Data"
json_attributes:
- "UnitEToday"
- "UnitEMonth"
- "UnitEYear"
- "UnitETotal"
state_class: total_increasing
Did anyone manage to get the envertech bridge back up running?
Ok, it was super easy!
rest:
- authentication: basic
resource: https://www.envertecportal.com/ApiStations/getStationInfo
scan_interval: 60
method: POST
params:
stationID: "HEX Station ID"
sensor:
- name: SolarTotalPower
value_template: "{{ value_json.Data.Power|float }}"
device_class: power
unit_of_measurement: "W"
json_attributes_path: "$.Data"
json_attributes:
- "PowerStr"
- "StrPeakPower"
state_class: measurement
- name: SolarTotalEnergy
value_template: "{{ value_json.Data.UnitETotal|replace(' MWh','')|replace(' kWh','')|float}}"
device_class: energy
unit_of_measurement: "kWh"
json_attributes_path: "$.Data"
json_attributes:
- "UnitEToday"
- "UnitEMonth"
- "UnitEYear"
- "UnitETotal"
state_class: total_increasing
I was interested in seeing the current power generation (Watt) per panel. I grabbed some example code from this thread, looked at the POST-requests in the browser when viewing the portal and then asked ChatGPT for help.
This one you can put in the micro inverter serial (replace 11xxxxxx
two times) to retrieve the power from that specific inverter (duplicate the code for other inverters):
- platform: rest
name: Bijkeuken solar inverter power
unique_id: envertec_bijkeuken_power
resource: https://www.envertecportal.com/ApiInverters/QueryTerminalReal
method: POST
headers:
Content-Type: application/x-www-form-urlencoded
params:
page: "1"
perPage: "20"
orderBy: "SNALIAS"
whereCondition: '{"STATIONID":"xxxxxxxxxxxxxxxxxx"}'
scan_interval: 300
value_template: >
{% set inverter = value_json.Data.QueryResults | selectattr("SN", "equalto", "11xxxxxx") | list | first %}
{{ inverter.POWER if inverter else 'unknown' }}
device_class: power
unit_of_measurement: "W"
json_attributes_path: >
$.Data.QueryResults[?(@.SN=='11xxxxxx')]
json_attributes:
- SN
- POWER
In the same way you can access inverter.ACVOLTAGE
etc. in the value_template
By the way: i have put the Enverbridge in a separate IOT vlan and restricted internet access in my firewall. It only needs access to one address: www.envertecportal.com
over port 10013/tcp
It uses OpenDNS (208.67.222.222) for resolving this domain, but for my IOT stuff i have a NAT rule to redirect outgoing DNS-requests to the DNS of my firewall, so i stay in control.
Where do i need to post this code? My configuration.yalm doesn’t seem to like it.
Still can’t get this to work. I now realise i use the code in configuration.yaml not customisations, which i cannot find.
Still can’t get this to work. I now realise i use the code in configuration.yaml not customisations, which i cannot find.
That’s a typo by me - it should be configuration.yaml
My configuration.yalm doesn’t seem to like it.
You need to be more specific on the error so that someone can help you.
@B.ploeg I have my config split up. The code i posted is in \includes\sensors\envertec.yaml
In my configuration.yaml
i have:
sensor: !include_dir_merge_list includes/sensors/
Thank you so much for sharing your code! It works perfectly fine with my recent 4 microinverter setup. Just wondering if there is a way to add inverter temperature monitoring as well? Can’t seem to locate the proper template
That should be possible, as the temperature is available as “TEMPERATURE”.
Your template would be something like
value_template: "{{ value_json.Data.QueryResults[0].TEMPERATURE|float()}}"
Thanks for the suggestion! Just wondering what the
" |float()}} " bit does
The technical description is documented here: Template Designer Documentation — Jinja Documentation (3.1.x)
What it means in less technical language: Without it you get a data type that is interpreted as a string (text), hence you need to convert it to a float, so that Home Assistant understands it’s a number, not text.