From this thread, which lead me to this one.
With the caveats above I do recommend it.
Hello, sorry for bumping an older thread, but this appears to be the most active/recent thread with a lot of good discussion.
I have a simple US split phase setup, with no solar or other complications.
I got the iotawatt setup and my ct clamps connected, and I setup the output to combine the 2 mains.
I have the official integration installed and it has started pulling the mains_total stats.
My question/confusion, is how to use the remaining CT inputs.
I have (1) CTās on all of the 220v breakers, and on most of the 110 breakers.
Are the non main CT inputs supposed to go into the HA āgridā section or the āindividualā devices section?
While I assume that the 220ās that power specific individual devices should go to the devices section, I am less certain where the generic 110 circuits should go, as they are not āindividualā devices (in my head).
I do have some local energy monitoring devices such as hs300 and ikea smart plugs already listed in the indiv devices.
But I donāt necessarily know which specific circuit breaker a particular device may be on. (the house is old, and the breakers/circuits are not consistently labeled/wired).
TLDR;
are CT (non main) circuits considered āgrid sourcesā or āindividual devicesā as related to HA energy?
Itās really up to you how you assign CTs in your circuit board, what they measure and how you wish to use them in Home Assistant.
But in general you will have CT(s) assigned to monitor the mains (as you have) and be the only inputs used for the āGrid Sourceā in the HA energy dashboard, unless you have a second source of power supply (e.g. an off-grid system).
You may also have CTs for monitoring any solar PV and/or battery inverter(s) for the solar and battery sections (if using Iotawatt for monitoring these then there is some special set up required).
Then CTs for individual circuits as you see fit which would all go into the individual appliance section of the HA energy dashboard if you so choose.
If you do choose to add some of general power or lighting circuits (which will naturally cover many things) to the individual devices section of the energy dashboard, then as you say you may have smart plugs doing some overlap in measurement on those circuits.
To avoid double counting, you can create a Home Assistant template sensor which deducts one from the other, e.g. If CT #10 was used to monitor a general 110V power circuit which happened to be supplying kitchen power outlets and you have a plug in power monitor for a kitchen appliance (e.g. a fridge), then you can create two new template sensors from your existing ones:
General kitchen circuit (net) power = CT10 power - Fridge power
Obviously you will have you own names for stuff, itās just illustrative.
Then create a new integral sensor to accumulate the energy from this new ānetā power sensor.
Then you can add the new net energy sensor and the fridge energy sensor each as their own individual devices into the energy dashboard.
I hope that makes sense.
TIP:
For individual devices/appliances you wish to monitor (e.g. a fridge) then itās a good idea to create power and energy template sensors dedicated for each, then use the output from your power monitoring smart plug or device to āfeedā that sensor.
While this might seem like unnecessary doubling up on sensors measuring the same thing, there is good reason for it. Smart plugs will fail and may get replaced, or you may wish to reassign them to other duty.
So if (or really when) a plug fails, is replaced or is reassigned, then you just change the input to the (e.g. fridge) power template sensor which in turn feeds the fridge energy template sensor.
This way the āfridgeā sensor history is not affected, it can carry on with a new smart plug feeding it with data. You do not lose the history for that appliance and donāt need to keep adding new inputs to the energy dashboard (it can quickly get messy).
Thank you for the clarifications, detailed response and awesome tips!
Using template sensors to do logical grouping and decoupling from the physical sensors is just ingenious!
Seems Iām now experiencing an old issue, the Iotawatt integration failing. Been fine for weeks since I set it back up at our new home.
This error originated from a custom integration.
Logger: custom_components.iotawatt.coordinator
Source: helpers/update_coordinator.py:380
integration: IoTaWatt (documentation)
First occurred: 5:58:20 AM (28 occurrences)
Last logged: 6:40:00 AM
Unexpected error fetching iotawatt.local data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/iotawatt/coordinator.py", line 67, in _async_update_data
is_authenticated = await api.connect()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/iotawattpy/iotawatt.py", line 48, in connect
if results.status_code == httpx.codes.OK:
^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'status_code'
The Iotawatt itself is online and reporting normally. Itās the integration with HA thatās falling over and I have little clue as to how to fix it.
I suspect itās not the integration but a networking issue on my end.
My Iotawatt was reporting via a 169.254.x.x IP address, and not appearing with itās normally assigned IP address, which tells me itās a probably DHCP issue with my router.
Iām working through that, have assigned it a new static lease outside of the DHCP dynamic assignment range.
Itās back talking with Home Assistant. Will monitor.
So Iāve been super slack on adding my devices to the HA Energy Dashboard and started looking at this today.
I have a strange issue where my Energy Integral is calculating in kWhās instead of Whās despite the power figure coming out of the iotawatt in W and me not using a multiplier in the Integral calc.
Any ideas whatās going on here?
sensor:
- platform: integration ### Calculate energy from power
source: sensor.mains_export ### grid out
name: energy_grid_feed
unique_id: REDACTED
# unit_prefix: k
round: 2
I donāt know why my energy integral is multiplying by 1000 (ie: becoming kWh) and I canāt change it in the settings for the entity because it just wont change.
This wonāt save:
Dave it is way better if you do the power to energy integration in the IoTaWatt.
Setup ā Integrators
I thought about that but only looked at āoutputsā and saw that energy wasnāt an option⦠I didnāt even think to look at the other options available in that menu. Iāll go and set it up now.
Thanks mate!
When you setup yours, did you have the option to simply use your already configured iotawatt outputs as the source for the integrator?
It looks like I need to do the full calculation again before getting iotawatt to integrate power to energyā¦
You can only use inputs for the integrators.
I have single phase so not as complicated as yours. Except for the mathematical gymnastics to reject my inverter self consumption from the solar output, so ignore that and concentrate on the grid:
Inputs:
Grid input is fed to the integrator:
The integrator creates grid.neg
and grid.pos
which I then use as outputs for export and import.
This will generate both power and energy entities.