Hi,
I am wanting to read the current solar generation from my Fronius Inverter and display it in HA, then eventually i want to use this to decide if the Pool Pump should be allowed to activate.
First time looking at HA so much to learn, could anyone give me a rundown on how to do this for a beginner?
sensor:
- platform: rest
resource: http://(Your solar IP)/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Current Power"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.PAC.Value /1000 | float / 10)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'KW'
force_update: true
- platform: rest
resource: http://(Your solar IP)/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Total Power Today"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.DAY_ENERGY.Value /1000 | float / 10)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'KW'
force_update: true
- platform: rest
resource: http://(Your solar IP)/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Total Power This Year"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.YEAR_ENERGY.Value /1000 | float / 10)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'MW'
force_update: true
- platform: rest
resource: http://(Your solar IP)/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
method: GET
name: "Total Power Since Installed"
value_template: >-
{% if is_state('sun.sun', 'above_horizon') %}
{{ (value_json.Body.Data.TOTAL_ENERGY.Value /1000 | float / 10)|round(2) }}
{% else %}
Offline
{% endif %}
unit_of_measurement: 'MW'
force_update: true
Replace (Your solar IP) with your actual IP address of your Fronius. This will give you the sensors for the on the non Lovelace up the top, if you want them on a Lovelace card. I used the Entity card for lovelace and just chose each on from the dropdown.
The above also gives an output to 2 decimal places.
Thank you this is great however I hate to sound silly but not sure how to implement thisâŠ
I updated it with my inverterâs ip and added it to the yaml file but reloading home assistant I donât see anything different? How do I see the inverter output?
Also, I have no idea what you are talking about with Lovelace�
I have never used Home Assistant before so I need the dummies guide pleaseâŠ
Lovelace is a new frontend for Home Assistant. If you havenât enabled it in your configuration.yaml then go to:
http://{replace with you IP}:8123/lovelace, from there you can add cards etc via the 3 dots on the top right and choose âConfigure UIâ.
Otherwise you should see the output of the sensors in the non Lovelace frontend at the top, with the other sensors. Ensure you restart Home Assistant when you have changed you configuration.yaml.
You can also try going to the info page under the dev tools part of the side menu and then clicking on âenable Lovelace uiâ or words to that effect
This was just installed�
I have just typed pip3 install --upgrade homeassistant and now it doesnt open at all, may errors
2019-02-24 22:02:25 ERROR (MainThread) [homeassistant.loader] Unable to find component use_legacy_protocol
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Error during setup of component http
Traceback (most recent call last):
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\setup.pyâ, line 151, in async_setup_component
hass, processed_config)
File "C:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\components\http_init.py", line 152, in async_setup
ssl_profile=ssl_profile,
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\components\http_init_.pyâ, line 210, in init
setup_cors(app, cors_origins)
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\site-packages\homeassistant\components\http\cors.pyâ, line 21, in setup_cors
import aiohttp_cors
ModuleNotFoundError: No module named âaiohttp_corsâ
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of system_log. Setup failed for dependencies: http
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Setup failed for system_log: Could not set up all dependencies.
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of auth. Setup failed for dependencies: http
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Setup failed for auth: Could not set up all dependencies.
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: http
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: Could not set up all dependencies.
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of api. Setup failed for dependencies: http
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Setup failed for api: Could not set up all dependencies.
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of websocket_api. Setup failed for dependencies: http
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Setup failed for websocket_api: Could not set up all dependencies.
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: api, websocket_api, http, system_log, auth, onboarding
2019-02-24 22:02:46 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: Could not set up all dependencies.
2019-02-24 22:02:53 WARNING (MainThread) [homeassistant.setup] Setup of recorder is taking over 10 seconds.
Deleted old config.yaml file when opening get these errors
2019-02-24 23:03:39 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=20 from 2019-02-24 11:53:52.653500)
2019-02-24 23:03:42 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _ProactorReadPipeTransport._loop_reading(<_OverlappedFâŠop_reading()]>)
Traceback (most recent call last):
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\asyncio\events.pyâ, line 127, in _run
self._callback(*self._args)
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\asyncio\proactor_events.pyâ, line 190, in _loop_reading
data = fut.result() # deliver data later in âfinallyâ clause
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\asyncio\futures.pyâ, line 238, in result
raise InvalidStateError(âResult is not ready.â)
asyncio.base_futures.InvalidStateError: Result is not ready.
2019-02-24 23:03:58 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _ProactorReadPipeTransport._loop_reading(<_OverlappedFâŠed result=bââ>)
Traceback (most recent call last):
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\asyncio\events.pyâ, line 127, in _run
self._callback(*self._args)
File âC:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\asyncio\proactor_events.pyâ, line 188, in _loop_reading
self._closing)
AssertionError
I have not installed hass on a Windows machine, but from what I have watched of the video it seems pretty straight forward. Hass.io has some advantages over the bare homeassistant, easier updates and installation of addons.
If you have just started using homeassistant then a fresh install would be my suggestion. Remove your pip3 install of homeassistant then start from scratch.
OK.
I have installed VM Box as per the video and we have Home Assistant running !
Now adding your code to the configuration.yaml file still doesnt help me�
How do we make it display the data?
Clicking the 3 dots doesnt obviously help me�
Are you using lovelace as your frontend?
If you are using lovelace then you should see 3 dots at the top right, click it and choose customize UI. Then down the bottom right you will see a large + button, click it. You should see a number of cards to choose from, choose entities, then you can pick the solar stuff in the entities dropdowns.
Yes, when I click on the plus which is at the top, i get the screen belowâŠ
No matter what drop down box i look through there is nothing referring to solar inverter?
Thats for the tabs, not the card. You should see a + sign down the bottom right for the cards. With a colored circle. Sorry canât screenshot, at work.
On the video on that page you will see an orange buttom down the bottom right, that is what you click to add a card.