Custom Component: IoTaWatt Energy Monitor integration

At some stage in the last few days the integration stopped working correctly for me.

At least for the energy dashboard. On about December the 16th to be more specific. Not sure what changed at that time.

@firstof9 How about yours?

What makes things more confusing is that solar and grid seem to be calculating correctly but none of the circuits iotawatt is monitoring are being calculated correctly anymore. And on top of that two of the sensors that have stopped recording correctly in the energy dashboard arenā€™t even from the iotawatt integration :confused:

i.e. Study and Family Room are both Tasmota based smart plugs with energy monitoring.

Everythingā€™s fine here:

I canā€™t figure out whatā€™s going on but here is why my integration currently looks like.


Five days ago:


Thereafter nothing. Four days ago onward. None of the Iotawatt measurements work:

For the first time in almost 2 years since installing the IotaWatt I was forced to go to the garage and power cycle itā€¦ I could ping it but not access the webui and it wasnā€™t feeding data to Home Assistant. I hope all this doesnā€™t mean that its dying.

Probably not dyingā€¦ I know there was an issue recently with a specific firmware update (v2.0.8, IIRC) that negatively impacted some recently shipped units that contained a specific model of microSD memory card. This led the IoTaWatt team to revert all units back to the previous firmware as a safety precaution.

Inside an IoTaWatt is an off-the-shelf NodeMCU ESP8266 microcontroller, plugged into a socket on the mainboard. Should this ever fail, it is pretty easy to replace. Also, there is a microSD memory card which maintains the historical energy usage data. It is possible that this microSD memory card could wear out over time, although I am not aware of this being a common issue with the IoTaWatt.

Hopefully, your IoTaWatt will continue to behave well for many more years to come!

1 Like

This is why I also monitor the firmware version, Hz, wifi rssi, and RTC battery, if my Hz goes wonky or flat lines I know comms are down.

image
image

EDIT: yes I corrected the spelling mistake :stuck_out_tongue:

I know this has been discussed a couple times in this thread at least. I am needing to rename my ā€˜outputsā€™ since the IoTaWatt UI limits the characters. With two units I want to prepend the unit name onto it. I see a report of the HACS version being different but havenā€™t tried it. Do they show as sensors in that one that I can edit?

If anyone else is getting a warning about the component being disabled in 2023.3 it looks like you can fix it by changing line 16 in init.py to
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

I have opened a PR but no activity there for a couple of years :frowning:

is that on the official integration or the custom one. The latter can be considered stale I think

custom. Iā€™m still using it as I hate change :slight_smile:

Can anyone help me with how to install this custom integration? Iā€™m a bit lost.

The ā€œofficialā€ HA IotaWatt integration is dead, so trying to find another way to integrate IotaWatt data into HA. Stumbled upon this custom option.

I can see this after adding the custom repository:

I downloaded and restarted HA but this is all I see.

Iā€™m lost on where to from here.

Thanks!

uh what?

since when?
working fine here

It ran for a day, then died and now the integration refuses to reload. Since thatā€™s a different integration and OT for this thread, hereā€™s the link on that. Seems I am not alone with this problem and there does not appear to be a solution for it:

After installing it in HACS you then need to go to Setting > Devices & Services > Add Integration > Look up IotaWatt (custom one) > follow the prompts.

Worth noting the thread you have referenced is a year old, Iā€™m not aware of any recent issues with the core integration and itā€™s still working fine for me. Might we worth checking your DNS settings.

1 Like

Thanks. This one wonā€™t load either.

Iā€™ve tried the static IP address assigned to my IotaWatt and also http://iotawatt.local as well.

It just gives me an unhelpful error message:
Screen Shot 2023-03-24 at 3.17.42 pm

Thanks. I donā€™t really know what ā€œchecking your DNS settingsā€ means. I looked it up although Iā€™m not the much wiser for it.

I searched my routerā€™s admin portal and see it has a couple of IP addresses listed as DNS servers but there is no option to edit them.

I just had a quick look and the custom integration kinda seems abandoned. Before swapping to the core integration I was using rest sensors instead and that worked really well, Iā€™ve even been thinking of going back to them as they seemed to respond quicker to changes in the sensor values.

Here was my old code in a package file.

iotawatt.yaml
###   Connection to read power data from IoTaWatt Power Monitor

sensor:
  - platform: rest
    name: IoTaWatt
    json_attributes:
      - inputs
      - outputs
    resource: http://192.168.0.16/status?inputs=yes&outputs=yes
    value_template: '{{ value_json.inputs[0].Vrms }}v'
    scan_interval: 5

  - platform: template
    sensors:
      iotawatt_channel_1:
        friendly_name: 'Grid Red Phase Power'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][1].Watts }}'

      iotawatt_channel_2:
        friendly_name: 'Grid White Phase Power'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][2].Watts }}'

      iotawatt_channel_3:
        friendly_name: 'Grid Blue Phase Power'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][3].Watts }}'

      iotawatt_channel_4:
        friendly_name: 'Light Circuits Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][4].Watts }}'

      iotawatt_channel_5:
        friendly_name: 'Power Circuit 1 Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][5].Watts }}'

      iotawatt_channel_6:
        friendly_name: 'Power Circuit 2 Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][6].Watts }}'

      iotawatt_channel_7:
        friendly_name: 'Power Circuit 3 Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][7].Watts }}'

      iotawatt_channel_8:
        friendly_name: 'Power Circuit 4 Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][8].Watts }}'

      iotawatt_channel_9:
        friendly_name: 'Oven Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][9].Watts }}'

      iotawatt_channel_10:
        friendly_name: 'Air Con Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][10].Watts }}'

      iotawatt_channel_11:
        friendly_name: 'Shed Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][11].Watts }}'

      iotawatt_channel_12:
        friendly_name: 'Bore Red Phase Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][12].Watts }}'

      iotawatt_channel_13:
        friendly_name: 'Bore White Phase Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][13].Watts }}'

      iotawatt_channel_14:
        friendly_name: 'Bore Blue Phase Power Consumption'
        unit_of_measurement: 'W'
        value_template: '{{ states.sensor.iotawatt.attributes["inputs"][14].Watts }}'

It might be worth just using this instead.

Its also worth making sure the HA network can connect to the IoTaWatt through a browser, if you go to 192.168.0.74 while on the 192.168.0.x network what do you get?

I get the normal status page, can view all the graphs, change the settings etc.

Same as if I uses iotawatt.local.

Thanks. Someone else suggested REST API to me yesterday, I looked and it didnā€™t make much sense to me but this looks similar. They pointed me to this post:

Just so I understand how this work, this yaml goes inside the yaml.config file?

Are all the data channels accessible? e.g. energy accumulation, voltages, power factors etc?

Presumably if I change the IotaWatt settings, e.g. a swap some CTs around to measure something else and rename it, then I need to change the yaml code, is that right?

Maybe I try to get one data channel working and go from there.