OK, I’ve temporarily swapped the 2GB RPi4 unit and its power supply adaptor for another set (used for another purpose in the house) and reconnected the USB SSD holding the HA software to this replacement RPi4.
Two observations:
- after 30 minutes runtime, I’ve seen no reoccurrence of the ethernet port going down - so I may be looking at a hardware issue with the first unit or an under-spec power supply.
- The P1 meter device is once more showing as permanently unavailable.
All I see in the log is:
2021-04-05 14:11:57 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] config_flow __init__
2021-04-05 14:11:57 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] config_flow async_step_zeroconf
2021-04-05 14:11:57 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] config_flow async_step_check
2021-04-05 14:11:57 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] entry_info: {'host': '192.168.178.143', 'port': 80, 'api_enabled': '1', 'path': '/api/v1', 'product_name': 'P1 meter', 'product_type': 'HWE-P1', 'serial': '3c39e722c8c0'}
No further sign of any data flowing into HA. I tried a reload of the integration, but then I got:
2021-04-05 14:42:18 ERROR (MainThread) [custom_components.homewizard_energy.sensor] Error connecting to the Energy device at 192.168.178.143
2021-04-05 14:42:18 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up homewizard_energy platform for sensor
Traceback (most recent call last):
File "/config/custom_components/homewizard_energy/sensor.py", line 128, in async_setup_entry
await energy_api.initialize()
File "/usr/local/lib/python3.8/site-packages/aiohwenergy/hwenergy.py", line 50, in initialize
await self.update()
File "/usr/local/lib/python3.8/site-packages/aiohwenergy/hwenergy.py", line 54, in update
status, response = await self.request('get', 'api')
File "/usr/local/lib/python3.8/site-packages/aiohwenergy/hwenergy.py", line 96, in request
raise RequestError(
aiohwenergy.errors.RequestError: Error requesting data from 192.168.178.143: Server disconnected
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 200, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/homewizard_energy/sensor.py", line 136, in async_setup_entry
raise ConfigEntryNotReady
homeassistant.exceptions.ConfigEntryNotReady
I then simply restarted (not rebooted) HA. Once again, the P1 devices/entities come up as unavailable, with only this in the Core log:
2021-04-05 14:44:30 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] config_flow __init__
2021-04-05 14:44:30 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] config_flow async_step_zeroconf
2021-04-05 14:44:30 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] config_flow async_step_check
2021-04-05 14:44:30 DEBUG (MainThread) [custom_components.homewizard_energy.config_flow] entry_info: {'host': '192.168.178.143', 'port': 80, 'api_enabled': '1', 'path': '/api/v1', 'product_name': 'P1 meter', 'product_type': 'HWE-P1', 'serial': '3c39e722c8c0'}
So now I seem to be back to the original problem: the P1 device/entities are permanently unavailable. Should I try simply reinstalling the HomeWizard Energy integration via HACS? Thanks.