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 on my network 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.
My HA core and supervisor are versions 2022.3.3.
This seems like an issue with the IoTaWatt HA Integration as it will not complete the installation of a new IoTaWatt or if I uninstall the current installation it will not complete a reinstall of that device.
Currently no data can be received from a previously install IoTaWatt.
It seems like the IoTaWatt Integration is broken.
2022-03-12 09:02:16 ERROR (MainThread) [iotawattpy.connection] Err: [Errno -2] Name does not resolve
2022-03-12 09:02:16 ERROR (MainThread) [homeassistant.components.iotawatt.coordinator] Unexpected error fetching iotaup.local data: 'NoneType' object has no attribute 'status_code'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/components/iotawatt/coordinator.py", line 67, in _async_update_data
is_authenticated = await api.connect()
File "/usr/local/lib/python3.9/site-packages/iotawattpy/iotawatt.py", line 48, in connect
if results.status_code == httpx.codes.OK:
AttributeError: 'NoneType' object has no attribute 'status_code'
It is saying the name does not resolve but it does if I put it in a browser it finds it without issue.
Yes there is something odd
.
I just tried the HA Integration and I used the IP address of the IoTaWatt and now it did find it.
I had tried that before and it did not work but I did restore from a backup after that attempt.
So for some reason HA is not resolving the iotawatt.local address when it did before but the direct IP is working.
As previously stated browsers can resolve the iotawatt.local without issue.
Not sure how to troubleshoot the name resolution issue but at least the IP allows it to work.
Any suggestions on how to troubleshoot the iotawatt.local not resolving?
You had iotaup.local in your setup, for whatever reason
Did you actually try with ioTawatt.local?
I had renamed the device because ultimately I will have more than one but yes I did try the original name to no avail.
It seems like the .local addressing is shaky in HA since it seems to be the only thing that cannot resolve it.
During my troubleshooting and debug I had rebooted all routers to try and rule that out but that still did not correct the .local addressing issue.
Only the direct IP address works in HA now although the .local did up until a few days ago.
Normally I use an assigned IP address on all my devices but this originally was the one exception.
Now as I previously stated I moved the IoTaWatt to its assigned IP address in the HA Integration and it is working fine so it is more of academic interest as to why it stopped working with the local address this week as it had been working with the local address for many months.
I am using HAOS running under VirtualBox in Windows.
I just hit this too upgrading from 2022.2.2 to 2022.3.6 and the supervised OS to 7.5.
I didn’t notice any breaking change comments in the release notes.
Ok, I’m confused how to work around the mdns problem. Where can I update the iotawatt address to the numerical ip address?
I’ve typically used iotawatt.local.
I don’t have any iotawatt host name or address specified I configuration.yaml. I don’t see any host name type entry in the integration gui settings either. I don’t have to delete and read the integration do I ?
Have you found the way? I am in the same situation, I went around in all config files but cannot find any ip address to change. My iotawatt changed IP after a reboot and my stupid modem does not allow me to reserve a fix IP.
I just encountered this issue today. I upgraded from HA OS 9.0 to 9.3 and 2022.9.x to 2022.10.5 and am now getting the error Retrying setup: 'NoneType' object has no attribute 'status_code'. I am running local DNS with my pihole.
Edit - not sure how upgrading broke it, but there was an issue with my DHCP/DNS setup that I got sorted out. All is well for me now.
Similar issue to this one. I’m helping a friend who has two Iotawatts installed. One works fine (installed some time ago), yesterday we installed the new one and this gives this error in the log:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/components/iotawatt/coordinator.py", line 76, in _async_update_data
await self.api.update(lastUpdate=self._last_run)
File "/usr/local/lib/python3.10/site-packages/iotawattpy/iotawatt.py", line 76, in update
await self._refreshSensors(timespan, lastUpdate)
File "/usr/local/lib/python3.10/site-packages/iotawattpy/iotawatt.py", line 264, in _refreshSensors
sensor.setValue(values[0][idx + 1])
IndexError: list index out of range
So I deleted it and tried reloading but it refuses to load the integration.
or if I enter the static IP address assigned to the unit instead of http://iotawatt.local I get the same thing.
HA log shows this:
Unexpected exception
11:43:56 AM – (ERROR) IoTaWatt - message first occurred at March 22, 2023 at 9:12:25 PM and shows up 5 times
Err: [Errno -2] Name does not resolve
11:43:56 AM – (ERROR) components/iotawatt/config_flow.py - message first occurred at March 22, 2023 at 9:12:25 PM and shows up 5 times