Anyone know how to install a second envoy and solar system integration in to a single HA set-up?
I have one EnPhase solar system installed at my main home and integrated in to HA server running at that location.
In another country I have second EnPhase solar system installed and wanted to add it to my home assistant set up in my main home so that I can easily monitor it without having a second HA installation to have to maintain from that location.
I have tried adding a second integration but even adding that locations dns ip does not allow the second home installation to be located. I am able to get mqtt information from the second home in to my HA installation.
It seems that what is needed is an EnPhase integration that uses an EnPhase API and thus has access to the information stored on the EnPhase server account.
So I managed to get a little further and worked out the way to get the data from EnPhase using a cURL command. But I cant get that data in to HA as sensors. The new sensors are created but are blank leading me to think that I have not formatted the JSON part correctly. Can anyone assist me with guidance on the way to get the JSON data and then pass it to sensors in HA?
here is my REST and my attempt at creating the sensors:
rest:
- resource: https://api.enphaseenergy.com/api/v4/systems/3793806/summary?key=TESTING123997d0fca5e67e412438110
method: GET
scan_interval: 900 #EnPhase only get data every 15 min.
headers:
Authorization: Bearer eyTESTING123NiJ9.eyJhcHBfdHlwZSI6InN5c3RlbSIsInVzZXJfbmFtZSI6ImNocmlzdG9waGVyX2FuZ3VzQGhvdG1haWwuY29tIiwiZW5sX2NpZCI6IiIsImVubF9wYXNzd29yZF9sYXN0X2NoYW5nZWQiOiIxNTgzMzEzMDU2IiwiYXV0aG9yaXRpZXMiOlsiUk9MRV9VU0VSIl0sImNsaWVudF9pZCI6IjQ3ZjEyNThmZmRjMjA1NzhmZTI5M2Q2MTQ0MGRmZDE1IiwiYXVkIjpbIm9hdXRoMi1yZXNvdXJjZSJdLCJpc19pbnRlcm5hbF9hcHAiOmZhbHNlLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiXSwiYXRpIjoiYjg3NGM1MTctNjI5OC00MDc5LWFmZTUtMmNlNGMyM2IwN2JlIiwiZXhwIjoxNjc0ODA0NDc3LCJlbmxfdWlkIjoiMTk0MTc3MyIsImp0aSI6IjUzN2M3OTc3LWIyM2QtNDc5OC04YTU3LWFmMmMyN2FmN2UzYSJ9.KUaeZ1jGYxzV1_insvDbZWGvpgju_CO1_PkxKYr6a7YS6p_Efxe4fcIDOurGETcYOtVZgwhi1pUrN0RBlbfDTM41qQmdx7O1LP9KuForFiY_fU8OGznilJ8M3MjARdq85n49gp51re0KHYh1uEp-WAsvZDpmdWMEfxacaxSXaXE'
Content-Type: application/json
Sensors:
sensor:
- name : "Ustou EnPhase system_id"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "system_id"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
- name : "Ustou EnPhase Current Consumption Wh"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "current_power"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'Wh'
device_class: energy
- name : "Ustou EnPhase Energy Produced lifetime Wh"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "energy_lifetime"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'Wh'
device_class: energy
- name : "Ustou EnPhase Solar Production Today Wh"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "energy_today"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'kWh'
device_class: energy
- name : "Ustou EnPhase Number of Inverters"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "modules"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
- name : "Ustou EnPhase Total Array Size (W)"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "size_w"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
- name : "Ustou EnPhase System Status"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "status"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
After a HA Restart I see the new sensors but there is no data:
Hi again, I just wanted to ask again if anyone could assist me for the above and how to get from Json to HA as everything that I tried didnt work so far.
I am in a similar boat but as opposed to two systems on two different houses I have two systems on one house. I have a 400 amp main and one array/4 batteries on one 200 amp and the other array/4 batteries on the other 200 amp splitting the house between them. So I have two gateways both running on the same IP but have different serial numbers and can only add one to HA. When adding to HA it also asks for the serial number so I was hoping I could add the second but when I do it just says this device has already been setup referring to the first gateway. Really wish I could add two gateways.