HomeAssistant energy management component

Interesting. This isn’t anything I urgently need. Is the longer term plan to have the official integration be the one to use or HACS? I can wait a bit to enable the integration if that is the long term plan. I’ve had to migrate other things from HACS to standard integrations and it can be painful.
On a side note, it seems so dumb they’ve setup HA in such a way that updating seemingly small things like integrations forces releasing an entire update for the whole thing. I have been hoping HACS, but better/easier to use, will be the way you install integrations. More like a plugin. For example, there was a long string of time where my Chamberlin MyQ garage door kept getting broken due to API changes. So HA was releasing entire new releases just for that fix.

I’m not going to get into how HA runs their business. I’m just looking out for IoTaWatt users and what I think serves them best.


Fair enough.
Do you view the longer term path to be the HACS implementation or the built-in integration?

I’d like to understand this also. I’ve been holding off on upgrading any of my IotaWatt<->HA integration components as it seems like the path forward is somewhat in a state of flux. It would be great to get some info from the guys who have been working on this as to what the best long term strategy is going to look like. Obviously things change, but its difficult from a user perspective to know what to do right now.

Thanks to everyone involved in this so far. Looking so forward to this integration getting settled down as both projects are awesome!

Not going to get into everything that is going on, except to say that we are going to fix this using some changes to IoTaWatt and what is anticipated to be a HACS integration. I’m disappointed that Hass decided to release something that I objected to and its reflecting badly on IoTaWatt. They have their reasons I suppose.

What I currently have in development works well with the original 0.0.6 @gregtd HACS integration. I hope to have that out in ALPHA in a few weeks. There is another user that has improved on that and has committed to doing the work on a HACS version that will optimize the new feature in IoTaWatt.

Rules in HA make submitting that version for release impossible. I don’t want to get into a discussion on this. Design by committee is overrated. Comments will be welcome when the new effort is released.

1 Like

Sounds good. I’ll hold off as the dust settles some.

We appreciate your work on this and the product as a whole! FWIW my Iotawatt is one of those devices that I plugged in and setup, then just forgot about. As it quietly just does it’s job. No painful maintenance, no manual reboots. It just works!

I’m hopeful that as the HA stuff matures that could be a great long term win. Having HA be the center of data collection and display makes a lot of sense and should be easier for users to setup and maintain. It lines up well with my preferred approach of having a solid, dedicated device like Iotawatt or Hue hub doing the core of the real work and HA as the thing that can tie lots of things together.

As @overeasy mentioned, I as well I don’t want to go into details that are in the past. I can speak to the current state of affairs.

We currently have two main release streams for the IoTaWatt integration. Which I hope at some point will be dropped to only include the HA bundled integration.

HA 2021.9.0 is bundled with an IoTaWatt integration but for the sensors to appear in the Energy Dashboard you have to create entries in the configuration.yaml file for each sensor you want to have appear in the Dashboard. As well to if you are monitoring solar on an Input on the IoTaWatt that is doing both import and export you have to create Outputs, splitting the Outputs from the IoTaWatt web interface is required using either version of the integration.

The custom_component IoTaWatt integration available through HACS is available with the 0.2.1 being the latest release. This has a similar code base as the bundled HA integration but the main difference is you do not need to manually add an entry in the configuration.yaml for the sensor to appear in the Energy Dashboard. Another change, is the addition of the Accumulated sensor that has a more accurate Wh reading based on how we query the IoTAwWatt, this is thanks to @jyavenard hard work! There are other smaller changes but those are this biggest ones.

As I mentioned I hope that the bundled HA IoTaWatt integration will at some point be the only version, so for now as code gets changed in either integration PRs will be opened and code merged. But as @overeasy pointed to on the HA side it is a committee and some changes do not get approved :disappointed:. Which means the custom_component will have what I guess I would term our vision of what the integration should support and do.

1 Like

@gregtd, @jyavenard , and @overeasy - Thank you all for working on this integration with Home Assistant. Your efforts are much apprciated!

Quick question about the 0.2.1 HACS integration - Am I correct to assume that when configuring the HA Energy feature, that the “Accumulated” sensors are the ones to choose? This makes the most sense to me, but I just wanted to double check.

Also, does the 0.2.1 HACS version support multiple IoTaWatt devices? Can I simply add a second IoTaWatt integration for a second IoTaWatt device?


@ogiewon The accumulated sensor would be the one to choose. Depending on your Output calculation on the IoTaWatt the .wh and the Accumulated sensor could be the same or off. I would say to error on the side of caution and use the accumulated sensor.

As far as supporting multiple devices it should. I personally haven’t tested it, but early on during coding a person did discover two IoTaWatts and the only issue was the Voltage sensor for the second not appearing. That was fixed.

1 Like

@gregtd - thank you for the quick response. I appreciate it.

All of my Outputs are configured to simply output Watts, not Wh, and no solar. So, the accumulated sensors it is! :slight_smile:

The accumulated sensor in @jyavenard 's version is a valient attempt to overcome an inherent deficiency in Energy. It is a real-time dashboard, not a time-series database. There is no provision for providing lost data after any sort of outage. The new feature in IoTaWatt will maintain the running import and export totals so that after an outage, at least the daily totals will be correct. The integration does it’s best to get data for short outages, but in the end is limited by the fact that it’s working from net data that gets less and less accurate as an outage duration increases. I should note that this situation is not unique to IoTaWatt. It is a characteristic of Energy.

I am using 0.0.6 with multiple devices.


For iotawatt inputs or outputs that are just defined as just the addition of another you can use the .wh just fine, the results will be the same.

If your outputs are using min/max or other operators you just use the « accumulated » ones

That’s incorrect. The accumulated sensors will remain accurate even after an outage. When connection resume, the integration fetches the missing data since the last successful query.

I’m just barely dipping my toe into home assistant integrations and just recently got my Iotawatt up and running. I’ve not been successful with EMONCMS yet, but I’m working on that. Are there tutorials or guides out there someone can recommend to get HA and Iota talking to each other from a newbies perspective?

I’m researching this device - I have read it can provide real-time data, what is the update frequency of power available in Home Assistant? I want to view real-time power changes with at least a one second update interval - is that possible? If the Home Assistant integration doesn’t do one second updates, is there an output stream (json, mqtt, etc) available as I could write a script to read that stream and create a real-time sensor in HA. Thanks

There are currently 2 versions avail - the bundled HA version and the custom integration version. I’m sticking with Greg’s custom version as it automatically adds all Iotawatt’s sensors. You can get the step by step at link

1 Like

3 posts were split to a new topic: Corrupted Datalog

Question: How taxing is this integration on the IoTaWatt?

I was looking around trying to find how often it’s actually polling the IoTaWatt. Given that the IoTaWatt can’t sample while answering queries, I want to make sure to make sure it wasn’t doing anything too crazy.

I just started playing around with some smart switches and automations in Home Assistant and thought it would be fun to integrate my also new IoTaWatt with it. This custom integration works great and the values are very close to what the IoTaWatt itself is reporting in the Graph+ graphs. I’m not exactly sure were the differences come from, but it’s probably close enough. For instance, the Graph+ graph shows my total consumption for yesterday at 41.2 kWh while the Energy screen in HA is showing 41.31 kWh. Likewise, my HVAC usage shows as 9.34 kWh in Graph+ and 9.38 kWh in HA.


What is the current recommendation for setup with the HA Core integration?

Do I need to create template integration sensors at outlined here or can I just use the wh sensors in Home Assistant?

It is trivial. The queries are less taxing than requests made by the status display every second. The actual queries are for a single time period and so take only a few milliseconds. If you want to know the impact on sampling, those metrics are displayed in the statistics section of the status display. The maximum sample rate possible is 40 cycles/second at 60HZ and 33.3 at 50Hz. The samples per cycle should never be effected.

I am not recommending the current HA integration. It was a pretty good idea when it was a HACS offering, but was edited hastily by the HA folks and is now difficult to use. They are just getting into the energy business and will probably discover and improve things as time goes on.

There is a development release of IoTaWatt that will support an updated HACS integration that should be super easy to use and very accurate. I expect it will be generally available in about a month.

There are still issues with HA energy in that it does not have an updatable time-series database, and so it can’t be a reliable place to go for any kind of analysis of historical usage, but it can be a pretty good real-time or daily dashboard if the communications link is reliable.