HomeAssistant energy management component

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.

~Dan

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.

2 Likes

Have these updates been released?

The new “integrator” capability in IoTaWatt is in the latest release. It allows highly accurate tracking of energy import and export.

The situation has not changed with HASS however. It is still only reliable as a real-time dashboard as it has no capability to recover history after any lapses in communication or server reset. Moreover, the user who has taken over the HA IoTaWatt integration is unwilling to make recommended changes after modifying it for his own purposes.

So it’s fine as a real-time dashboard but I would recommend using the IoTaWatt Graph+ Or PVoutput for serious performance analysis.

This is unfortunate. I prefer Home Assistant as my main interface and bought IoTaWatt specifically after the Energy integration was releases.

Is there a public issue we can comment on? Its hard to follow exactly what the issue is.

Are there still plans to make a custom component that works better with IoTaWatt?

The main problem has nothing to do with IoTaWatt or any other data collection device regardless of how it is integrated. HASS energy component only allows adding real-time data, so if there is any lapse of communications or server availability (restarts, power fail), NO integration can provide it with the lost data. So historical data is only as good as the historical connection and uptime availability.

IoTaWatt has uploaders for three external time-series databases - influxDB, emoncms and PVoutput. Whenever there is any lapse in communications or server availability, it will send the missed data. Unfortunately that’s not possible with HASS as there is no way for an integration to provide anything but real-time data.

Issues with the current integration are secondary to that design flaw of HASS energy. They are user interface issues that make it somewhat more difficult to use, but do not restrict functionality.

You have the best tool available for sending energy data to HASS, it’s just that HASS Energy itself is very lightweight.

3 Likes

I see. Thanks for the detailed explanation.

Assuming I am using Home Assistant, is it better to use the wh, wh_accumulated sensors, or the watt sensor with integration being calculated on Home Assistant side?

EDIT: Nevermind… I see you updated the documentation with your recommended setup using the Integrators feature. Thank you!