This integration uses cloud polling from the CheckWatt EnergyInbalance portal using a reverse engineered private API.
The strategy for this integration is to reduce the amount of sensors published while at the same time maximize the information available and provide them as attributes.
The integration also aims to balance the user needs for information with loads on CheckWatts servers why some data may not always be up-to date.
Out-of-the box, this integration provides two sensors:
- CheckWatt Daily Net Income : Your estimated net income today
- CheckWatt Annual Net Income : Your estimated annual net income
- Battery State of Charge: Your batterys state of charge
The Daily Net Income sensor also have an attribute that provides information about tomorrows estimated Net Income.
- The integration uses undocumented API's used by the EnergyInBalance portal. These can change at any time and render this integration useless without any prior notice.
- The monetary information from EnergyInBalance is always provisional and can change before you receive your invoice from CheckWatt.
- The annual yeild sensor includes today's and tomorrow's estimated net income.
- CheckWatt EnergyInBalance does not (always) provide Grid In/Out information. Why it is recommended to use other data sources for your Energy Panel.
- The FCR-D state and status is pulled from a logbook parameter within the API and is a very fragile piece of information. Use with care.
- The integration will update the Energy sensors once per minute, the Daily Net Income sensor once every fifteenth minute and the Annual Net Income around 2 am every morning. This to not put too much stress on the CheckWatt servers (the net income operation is slow resource heavy)
- Make sure you have git installed on your machine.
- Navigate to you home assistant configuration folder.
- Create a
custom_components
folder of it does not exist, navigate down into it after creation. - Execute the following command:
git clone https://github.com/faanskit/ha-checkwatt.git checkwatt
- Restart Home-Assistant.
Go to Settings / Devices & Services / Integrations. Click + ADD INTEGRATION
Find CheckWatt from the list of available brands:
Enter your EnergyInBalance credentials and press SUBMIT:
Take note that Home Assistant will store your credentials and if this is a security concern for you, abort at this stage.
The integration will now install and assuming it all went well you will get a success message and the possibility to add its sensors to an area of your choice.
On your Overview you will now have two new sensors in a new group:
These sensors will show you your estimated daily and annual net income alongside with some basic attributes like Street Address, Zip Code and City.
The Daily Net Income sensor will also show tomorrows estimated net income as an attribute.
The integration provides basic sensors for most peoples needs. The integration can also be a one-stop-shop for the Home Assistant Energy panel and can therefore be configured to also fetch all required data for that from EnergyInBalance.
For those who need additional information, detailed attributes can be provided by configuring the integration accordingly. Through the detailed sensors you can get gross revenue, fees, fee rates, FCR-D status and much more.
If you need more sensor and more detailed attributes in the sensors, configure the integration as follows.
Go to Settings / Devices & Services / CheckWatt. Click CONFIGURE:
Select if you want the integration to provide energy sensors and if detailed attributes shall be provided.
Press SUBMIT and the configurations will be stored:
After the configuration is done you need to restart the integration. Click ... and select Reload
After the system as reload you will have 1 device and 9 sensors available.
Your sensors will now also contain a lot of detailed attributes.
With the energy sensors provided by the integration, it is possible to configure the Home Assistant Energy Panel. The Energy panel is available on the left-hand menu of Home Assistant by default.
When you enter the energy panel the first time you will be guided by a Wizard:
For the Grid Consumption, select the Import Energy sensor from the integration and complement it with the cost tracker using the Spot Price VAT sensors.
Take note that you should use the sensor that includes VAT for Electricity that you purchase. Please also note that this sensor does not include markups from your electricity provider.
For Grid Consumption, select the Export Energy sensor from the integration and complement it with the cost tracker using the Spot Price sensors.
Take note that you should use the sensor that excludes VAT for Electricity that you sell.
When configured, it looks like this. Press SAVE + NEXT to continue the Wizard.
Add the Solar Energy sensor from the integration and press SAVE + NEXT
Add the Battery Energy sensors from the integration. Energy going in to the battery = Battery Charging Energy Sensor Energy going out of the battery = Battery Discharging Energy Sensor
Press SAVE + NEXT
Finish off the Wizard and the result will look like this. Please be advised that it will take a few hours before the Energy Panels start showing data.
Also, currently EnergyInBalance does not always provide proper Grid Input and Output why this data cannot be relied upon.
For now, you need to pull that data from another integration.
When the system is fully set-up it you have sensors that provides you with your daily and annual net income and if you have configured it accordingly, you also have sensors available for the Home Assistant Energy Dashboard.
The final result can look like this:
The integration publish events which can be be used to drive automations.
Below is a sample of an automation that acts when CheckWatt fails to engage your battery and deactivates it.
alias: Deactivated
description: ""
trigger:
- platform: state
entity_id:
- event.skarfva_fcr_d_state
attribute: event_type
from: fcrd_activated
to: fcrd_deactivated
condition: []
action:
- service: notify.faanskit
data:
message: "CheckWatt failed, please investigate."
mode: single
If you think that some of the attributes provided should be sensors, please consider to use Templates before you register it as an issue. If it can be done via a Template Sensor, it will most likely be rejected.
This is an example of a Template based Sensor that pulls tomorrows estimated daily net income from the attribute of the CheckWatt Daily Net Income sensor.
It goes without saying, but this should be put in your configuration.yaml
:
template:
- sensor:
- name: "CheckWatt Tomorrow Net Income"
unique_id: checkwatt_tomorrow_yield
state: "{{ state_attr('sensor.skarfva_checkwatt_daily_yield', 'tomorrow_gross_income')}}"
unit_of_measurement: "SEK"
device_class: "monetary"
state_class: total
The result will look something like this:
The names of the attributes can be found in the Home Assistant Developer Tools section in your Home Assistant environment under the STATES sheet:
This integration was loosely based on the ha-esolar integration. It was developed by @faanskit with support from:
This integration could not have been made without the excellent work done by the Home Assistant team.
If you like what have been done here and want to help I would recommend that you firstly look into supporting Home Assistant.
You can do this by purchasing some swag from their store or paying for a Nabu Casa subscription. None of this could happen without them.
The integration is provided as-is without any warranties and published under The MIT License.