Custom Component: IoTaWatt Energy Monitor integration

Yeah, so I have similar ones but they simply aren’t coming through to HA

image

This is a side effect of HA wanting to having “unique” ID for sensors which IotaWatt’s output can’t have.

So they aren’t showing under the IotaWatt integration filter. But they are there.

Search for accumulated ; some will show under “sensor” and the input ones will show under “iotawatt”

Thank you! I just checked in the states dev page and they are there. Cheers

Sorry to post relating to the core HA integration rather than this custom one, but I can’t get the entities into the Energy dashboard.

I created the outputs as described in the official HA docs but HA won’t let me add the accumulated Wh entities. As far as I know they have the correct attributes.

Any tips?

Are you running the HACS or only the official one?

Core one .

Someone reported an issue in the integration, where the integration wasn’t retrieving any data.
Turned out that the time wasn’t set on the iotawatt so it was using 1970-1-1 to store data. And the HA integrations uses UTC local time when making a query.

Check the logs for any errors.

I’m getting all the data come in, I just can’t add the sensors to the HA Energy dashboard. It seems that HA thinks the sensors don’t have the required attributes even though they do.

Problem is that the attributes have changed over time.
Was last_reset
then total_increasing, and now “total”

If you are running 2021.11 ; the attributes it now needs is "total:

state_class: total
type: Output
last_update: '2021-11-29T03:06:00+00:00'
unit_of_measurement: Wh
friendly_name: Export.wh Accumulated
device_class: energy

I’m surprised that what you have is “total_increasing” this should no longer be the case with the latest version.

This is why I keep asking if by any chances you wouldn’t be running the HACS version, because it seems that you are.

Check the custom_component folder, and make sure there’s no iotawatt stuff in there.

I’m definitely using the core integration, I never had the custom integration installed. I previously used Rest sensors to grab the data from the iotawatt.

well, I’m not seeing the attributes as I’m seeing here, so something is amiss.

Though, it should work with total_increasing (unless they removed support for it as it made little sense to start with)

My sensor has the same attributes as your example above:

sensor.mains_export_wh_accumulated

state_class: total
type: Output
last_update: 2021-11-30T00:16:00+00:00
unit_of_measurement: Wh
friendly_name: Mains_Export.wh Accumulated
device_class: energy

The picture you had above showed total_increasing.

It’s very puzzling indeed. And I have no answer on why that wouldn’t work.

I would suggest deleting and reinstalling and see what happens? Could be some underlying corruption that might be fixed by that?

Hi - I have a main panel and a subpanel and want to monitor circuits in both. Is it possible in HA to integrate two separate IoTaWatts and see the individual circuits from both? What’s the high-level on how to accomplish that?

Just set two iotawatt in the integration settings.

Thanks - I see that the IoTaWatt integration asks for a host, but obviously can’t get past that part as I don’t have one yet. I wasn’t sure if I could add one host, then go add the same IoTaWatt integration a second time with a second host.
Can you confirm that’s the case?

That’s how it’s designed to work yes. Some people use this setup already

2 Likes

So I have been running iotawatt for a couple years now. I just saw that the IotaWatt can be added to HA. I just pointed it at my existing config and all my inputs all show up under the device, but the outputs show up as just sensors not tied to a device. Did I do something wrong?

You didn’t do anything wrong.
This is a constraint imposed on the integration because the outputs can’t be given a unique ID that will not change over the lifetime of the iotawatt.

So Input shows up as expected as they are unique (they are matched to the input number)

If you use the HACS integration instead, that drawback doesn’t exist and so it behaves like anyone would expect.

It sucks, but that’s how HA wants it