Home Assistant Installation Stopped Working

I have had an IotaWatt Home Assistant installation operating fine for a couple of months. A few days ago the IotaWatt stopped getting data so all the values show “Unavailable”. No changes occurred in HA or the IotaWatt in that time period. The RSSI is -59dB and the IP is fixed. I can see the IotaWatt device with the iotawatt.local command and all looks good there. In HA in the IotaWatt Integration box it says "Retrying setup: ‘NoneType’ object has no attribute ‘status_code’ ". If I uninstall the IotaWatt Integration and try to reinstall it I get “Unexpected error” message in the IotaWatt host box for HA. I have a second IotaWatt which I have not installed yet but did set it up and when I try to install this in HA as in integration I get the same message “Unexpected error”.
I have rebooted HA, restarted HA, power cycled the IotaWatt, and rebooted the IotaWatt multiple times again to no avail. I restored HA from a backup still with the same negative results.

Here is the message log from the last restart.
** Restart **

SD initialized.
3/11/22 11:14:10z Real Time Clock is running. Unix time 1646997250
3/11/22 11:14:10z Reset reason: Software/System restart
3/11/22 11:14:10z Trace: 1:3, 1:1[5], 1:2[6], 9:0[6], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:3, 1:1[6], 1:2[7], 9:0[7], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 10:2, 10:3
3/11/22 11:14:10z ESP8266 ID: 542798, RTC M41T81 (68)
3/11/22 11:14:10z IoTaWatt 5.0, Firmware version 02_07_05
3/11/22 11:14:10z SPIFFS mounted.
3/11/22 06:14:10 Local time zone: -5:00, using DST/BST when in effect.
3/11/22 06:14:10 device name: IotaUp
3/11/22 06:14:10 HTTP server started
3/11/22 06:14:10 timeSync: service started.
3/11/22 06:14:10 statService: started.
3/11/22 06:14:10 dataLog: service started.
3/11/22 06:14:10 dataLog: Last log entry 03/11/22 06:14:05
3/11/22 06:14:14 WiFi connected. SSID=Private, IP=, channel=3, RSSI -58db
3/11/22 06:14:14 MDNS responder started for hostname IotaUp
3/11/22 06:14:14 LLMNR responder started for hostname IotaUp
3/11/22 06:14:14 Updater: service started. Auto-update class is MINOR
3/11/22 06:14:15 historyLog: service started.
3/11/22 06:14:15 historyLog: Last log entry 03/11/22 06:14:00
3/11/22 06:14:15 Updater: Auto-update is current for class MINOR.

Don’t know what to do at this point, HELP!


It looks like mine isn’t working either. Unfortunately I have no control or even influence over the junkshow that is the HA IoTaWatt integration. It was taken over by a user that has been uncooperative.

I have the original HACS integration that was simple, straightforward and does everything needed. I’ll try installing that in my HASS setup and see if it resolves the problem. Probably looking at a day or two fopr me to come back up to speed on HASS and you know - restart, restart again etc.


It appears to me that there is a problem with the integration. I get the same “Unexpected Errror” when I reinstall the integration. The log shows:

Don’t know exactly what that means, but the iotawatt.local name, the only thing I’ve entered, does resolve on my network. So this may be an issue for the HASS folks.

OK this is all good information but how do things proceed from here to get that resolved with HA?
It would seem that this issue will start rippling across other HA installations.

Is there any clean way to get the installation working again without the HASS people fixing their integration?
Right now my setup and yours from what you said does not work and I was getting ready to install the second iotawatt I have to my system but that obviously does not make any sense at the moment since neither will work in HA.


That’s where it gets messy. It’s not “their” integration. It was contributed by an IoTaWatt user, then changed by the HASS folks to conform to their “rules”, then it was modified by another IoTaWatt user to try to compensate for his poor WiFi. I objected to all of the changes to the original to no avail.

Now getting rid of the hacks that were inserted for the crappy “high accuracy” feature would be a breaking change. So its a sad situation tht could have been easily avoided with a little patience and taking the time to understand the problems.

I don’t know if what is going on now is related to any of the changes or if it’s just something else that broke. I got a pretty up-close look at the process of putting out the monthly HASS release and nothing would surprise me.

What I am not hearing is a procedure on how to get the IoTaWatt working again in HA.
So what you are saying is my installation is broken and you cannot provide any information on how to get it working again?

The original code you spoke of can’t that be used as a custom component to get it working or something along those lines.


I don’t know. The messages from HA don’t provide much to go on. “Unexpected Error” and “Name does not resolve” are not useful to me.

I tried to install the HACS version. First problem I had was that the version of HACS on my install was outdated. I tried several times to update using the provided button. It did something I suppose, and I did the required restart, but the HACS version didn’t change.

I tried installing my vesion of the integration using the old HACS version but no luck there. So not being very successful, I have given up on that. If you would like to give it a try, I have the HACS version that I have the most confidence in (it worked for me until I installed the “official” integration). You can get it from my repo at: GitHub - boblemaire/iotawatt_ha: IoTaWatt for Home Assistant

If you have any luck, maybe you can document how to install it FBO others who will no doubt have this problem.

I just replaced the iotawatt.local in the HA Integration and it found the IoTaWatt device.
I had tried this before and it did not work but I did restore from backup after I tried that and did not try it again until now.
HA for some reason is not resolving the iotawatt.local to an address but the browsers do without issue so a bit of a strange situation.

Don’t know how to correct that in HA but the IP address is working so that is something at least.


Yes, I reinstalled HACS and installed Greg’s submitted version. I still had the unknown error issue on initialization but like you had success with the IP address. As a resolution, you would need to be sure the IP address is fixed in your router.

I’m going to stick with the HACS version for now as it doesn’t have the convoluted “high accuracy” queries and entities. The IoTaWatt docs show how to properly use integrators to produce monotonically increasing Wh entities to track import and export.

UPDATE: When did your integration stop? Mine appears to have stopped on March 10 in the morning between about 8 and 9 am.

UPDATE: older HACS version no longer works properly.

Curious, mine stopped close to the same time and date.

My older HACS version no longer works with the Energy component. I’ve switched back to the “official” version using the IP address. It’s sorta working but have a huge spike of thousands of kWh for today. I don’t believe it’s caused by using the old integration because the entity names were never accepted by Energy.

Looking over some of the PRs and issues submitted to HASS (I’m not included in the vetting), there are additional changes that were made that I disagree with. It seems like anybody can toss a PR over the wall and get it approved.

IMO the effort to move to 5 second sampling is a quick and dirty change that could have benefited from a wider discussion. The current integration creates 3 entities for each sensor. The proponents of 5 second updates justify it by a need to monitor power so as to have automations that react quickly to changes in power. @jyavenard pointed out the heavy cost in database growth. It seems to me that a change like that could have been made specific to the power entity (Watts).

Some of the earlier integrations used the status API to return power. That seems like a better approach for real-time control as it can be updated as often as once per second.

Running a lot of queries to IoTaWatt can have a detrimental effect on sample frequency. The current integration does three queries per interval. The query used for so called Wh Accumulated is redundant and less accurate than a Wh feed based on IoTaWatt’s integrator function.

In short, somebody ought to step up and straighten this mess out before it gets completely out of hand.

1 Like

With the IP address instead of the local address mine is work fine at the moment with the official HA.

Fortunately I have not had an issue with the large spike you mentioned but I know someone who did.
They went into the database and deleted it to resolve the issue it created in the data.
It has only occurred once for them.

I agree with the points you made and from my own experience with HA I question some of decisions made in areas I have had issues with.

My integration stopped working with 2023.05 version.
2023-05-10 12:01:17.413 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration iotawatt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2023-05-10 12:01:53.927 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for iotawatt

File “/config/custom_components/iotawatt/init.py”, line 16, in async_setup_entry

2023-05-10 12:03:49.799 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for iotawatt

File “/config/custom_components/iotawatt/init.py”, line 16, in async_setup_entry

2023-05-10 12:04:35.275 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for iotawatt

File “/config/custom_components/iotawatt/init.py”, line 16, in async_setup_entry

2023-05-10 12:07:33.937 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for iotawatt

File “/config/custom_components/iotawatt/init.py”, line 16, in async_setup_entry

2023-05-11 21:37:46.022 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry for iotawatt

File “/config/custom_components/iotawatt/init.py”, line 16, in async_setup_entry

What problem?

The problems is an update with HA and the custom integration you are using

I would suggest look at removing the custom integration and go to the official one (although that has its own issues)


You are right! Removed custom integration and now all perfect working.
Thank you for help.

I am now unable to even set up my iotawatt using the HA official integration - getting this in the log:
AttributeError: 'NoneType' object has no attribute 'text'

My iotawatt had been working fine in HA for more than a year, then it gradually started to drop data. (Perhaps after an HA software update?) This situation got progressively worse to the point that there is almost no data getting to HA from the iotawatt.
RSSI -62 or better; I have an Eero satellite in the garage with the iotawatt.

I tried a clean slate installation of home assistant to no avail. I also tried the two HACS integrations (kuralabs and gtdiehl).
Iotawatt itself is functioning fine and the grapher shows no data gaps.

It may be fruitless to post HA issues in this forum, but perhaps someone else found a solution to this issue?

Likely unrelated but I am still on HA core 2023.3.1

When I upgraded to HA core 2023.5.1 my IoTaWatt integration (and a couple of other integrations no longer worked). I’ve no idea why and am yet to resolve it. These issues are beyond my understanding.

As a result I am still on 2023.3.1, which is not optimal as eventually I’ll need to upgrade presumably as other integrations will eventually require it.

Thanks for the suggestion. I ran
ha core update --version 2023.3.1
and upon trying to reload the iotawatt integration I am still getting getting:
Retrying setup: 'NoneType' object has no attribute 'text'

I’ll keep looking around for another solution. It seems weird that I’m the only one with this problem, as I’m running vanilla HA.
(Also, I may be missing something in HA versioning. I now have:)

Home Assistant 2023.3.1
Supervisor 2023.08.1
Operating System 10.4
Frontend 20230302.0 - latest

Wish I could help. I understand the frustration.

1 Like

I have not checked recently, but I seem to recall finding this git issue for getting access to fix the library: