Closed jes1417 closed 2 years ago
In addition to the warnings posted above, I get these:
2020-05-20 10:10:24 WARNING (MainThread) [homeassistant.components.binary_sensor] BinarySensorDevice is deprecated, modify WattBoxBinarySensor to extend BinarySensorEntity
2020-05-20 10:10:24 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify WattBoxBinarySwitch to extend SwitchEntity
2020-05-20 10:10:24 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify WattBoxMasterSwitch to extend SwitchEntity
I have the switch domain excluded in my recorder configuration file. I'm running HA 110.0 now.
And I am getting this error...
2020-05-21 17:09:10 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for wattbox doing I/O at custom_components/wattbox/__init__.py, line 108: hass.data[DOMAIN_DATA][name].update()
@dustinww he fixed this issue already, did you install manually our with hacs? You need to update the custom component.
Thanks for letting me know. That's all it was. Updated through HACS and all is good.
Warnings below appear in the HA log on 111.3:
2020-06-17 16:19:43 WARNING (MainThread) [homeassistant.components.binary_sensor] BinarySensorDevice is deprecated, modify WattBoxBinarySensor to extend BinarySensorEntity
2020-06-17 16:19:43 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify WattBoxBinarySwitch to extend SwitchEntity
2020-06-17 16:19:43 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify WattBoxMasterSwitch to extend SwitchEntity
2020-06-17 16:19:51 ERROR (MainThread) [homeassistant.components.sensor] Entity id already exists - ignoring: sensor.last_update_trigger. Platform mobile_app does not generate unique IDs
2020-06-17 16:19:51 ERROR (MainThread) [homeassistant.components.sensor] Entity id already exists - ignoring: sensor.last_update_trigger_2. Platform mobile_app does not generate unique IDs
2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.binary_sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox100, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30>
2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.switch, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox100, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30>
2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.binary_sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox101, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30>
2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.switch, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox101, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30>
2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox100, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30>
2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox101, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30>
Warnings below appear in the HA log on 111.3:
2020-06-17 16:19:43 WARNING (MainThread) [homeassistant.components.binary_sensor] BinarySensorDevice is deprecated, modify WattBoxBinarySensor to extend BinarySensorEntity 2020-06-17 16:19:43 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify WattBoxBinarySwitch to extend SwitchEntity 2020-06-17 16:19:43 WARNING (MainThread) [homeassistant.components.switch] SwitchDevice is deprecated, modify WattBoxMasterSwitch to extend SwitchEntity 2020-06-17 16:19:51 ERROR (MainThread) [homeassistant.components.sensor] Entity id already exists - ignoring: sensor.last_update_trigger. Platform mobile_app does not generate unique IDs 2020-06-17 16:19:51 ERROR (MainThread) [homeassistant.components.sensor] Entity id already exists - ignoring: sensor.last_update_trigger_2. Platform mobile_app does not generate unique IDs 2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.binary_sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox100, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30> 2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.switch, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox100, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30> 2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.binary_sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox101, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30> 2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.switch, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox101, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30> 2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox100, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30> 2020-06-17 16:20:00 WARNING (Recorder) [homeassistant.components.recorder] Event is not JSON serializable: <Event platform_discovered[L]: service=load_platform.sensor, platform=wattbox, discovered=host=wattboxIP, username=usr, password=passwd, name=wattbox101, resources=['current_value', 'power_value', 'voltage_value'], port=80, scan_interval=0:00:30>
Yea I have had these too for a while
Sorry, forgot they were deprecating the Devices, and that I needed to switch over. The fixes had been staged in my local dev, just forgot to push them when the version came out. The deprecated warnings should be fixed now. Still trying to figure out the JSON serializable part.
I downloaded /wattbox and replaced the existing files and on restart got this:
2020-07-25 03:09:05 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up wattbox platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/config/custom_components/wattbox/binary_sensor.py", line 17, in async_setup_platform
name = discovery_info[CONF_NAME]
TypeError: string indices must be integers
2020-07-25 03:09:05 ERROR (MainThread) [homeassistant.components.switch] Error while setting up wattbox platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/config/custom_components/wattbox/switch.py", line 17, in async_setup_platform
name = discovery_info[CONF_NAME]
TypeError: string indices must be integers
2020-07-25 03:09:05 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up wattbox platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/config/custom_components/wattbox/binary_sensor.py", line 17, in async_setup_platform
name = discovery_info[CONF_NAME]
TypeError: string indices must be integers
2020-07-25 03:09:05 ERROR (MainThread) [homeassistant.components.switch] Error while setting up wattbox platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/config/custom_components/wattbox/switch.py", line 17, in async_setup_platform
name = discovery_info[CONF_NAME]
TypeError: string indices must be integers
2020-07-25 03:09:12 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up wattbox platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/config/custom_components/wattbox/sensor.py", line 16, in async_setup_platform
name = discovery_info[CONF_NAME]
TypeError: string indices must be integers
2020-07-25 03:09:12 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up wattbox platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/config/custom_components/wattbox/sensor.py", line 16, in async_setup_platform
name = discovery_info[CONF_NAME]
TypeError: string indices must be integers
Running HA 113.1.
Oops, looks like somehow I pushed a bad version. I apparently wasn't running the version I though I was running. Sorry about that. https://github.com/eseglem/hass-wattbox/tree/v0.5.1 should be working. With the json serializable issue, but no deprecation warning I believe.
I tried that version this morning. Also tried reloading via HACS, but got the same result.
Thats odd, I was running 0.5.1 without that error, but hopefully the latest will do it. I installed it through HACS and appears to be ok.
Everything is working for me now
Updated through HACS again this morning. ERRORs are gone but WARNINGs have returned. I'm getting the code from here.
Just the JSON serializable warnings. The deprecated sensor/switch warnings are gone as you said.
Has there been any update on these json warnings ? I just installed this, and am getting them.
This error appeared in the HA Log on restart:
2021-07-16 04:52:00 ERROR (MainThread) [custom_components.wattbox] Could not update data - HTTPConnectionPool(host='192.168.3.100', port=80): Max retries exceeded with url: /wattbox_info.xml (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7effcb176490>: Failed to establish a new connection: [Errno 111] Connection refused'))
HAOS 6.1, HA Core 2021.7.3
EDIT. It appears this unit has lost its cloud connection somehow. As my other unit remains cloud connected and no errors for it IP appear in the HA log. I'll continue to investigate the lost cloud connection.
Update: I've corrected the error with a network configuration change on the Wattbox.
New config check for 2021.8.1:
[04:54:07] ERROR: The configuration check did not pass!
[04:54:07] ERROR: See the output below for more details.
Testing configuration at /tmp/config
Failed config
General Errors:
- Component error: wattbox - cannot import name 'VOLT' from 'homeassistant.const' (/usr/local/lib/python3.9/site-packages/homeassistant/const.py)
Same issue for me as garyak on a new install of this integration
While waiting for eseglem to make code changes, I restored most functions and passed a config check by editing the const.py in the wattbox custom_components directory. Specifically, lines 10 and 73. At line 10, I removed , VOLT
and at line 73, added a # at column 1 effectively commenting out the voltage_value sensor type.
Sorry for the delay. The VOLT
issue should be fixed. Is there anything else still having issues with warnings or errors? I have not been able to touch much HA stuff in a while, but will make an effort to see what I can do if there is continued issues.
I've uploaded your latest const.py. No errors or warnings on restart. I'll keep an eye on it today. THANKS!
Still seeing these for all switches:
2021-12-28 15:09:43 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.wattbox1_master_switch (<class 'custom_components.wattbox.switch.WattBoxMasterSwitch'>) implements device_state_attributes. Please report it to the custom component author.
and these for the sensors:
2021-12-28 15:09:51 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.wattbox1_current (<class 'custom_components.wattbox.sensor.WattBoxSensor'>) implements device_state_attributes. Please report it to the custom component author.
Sorry for the delay. Finally getting back to some of this stuff. I fixed that in the latest release, and don't see any more stuff in the logs right now.
I can confirm the warnings no longer appear in the log. Thank you! I use this component frequently.
I am seeing this error in logs?