plugwise / plugwise_usb-beta Goto Github PK
View Code? Open in Web Editor NEWCustom-component / development version of the USB Plugwise Home Assistant platform
License: MIT License
Custom-component / development version of the USB Plugwise Home Assistant platform
License: MIT License
In the lasttest version, de switching is working again, but stop after a couple of hours.
This is also noticeable on the measurements of the energy readings. See attached graph, the arrows: First one is the update/restart of HA and the second one is the moment the measurement is stopping regularly updating. At 5 AM I restarted HA again and the readings become normal again.
0.40.2
No response
2023.8.1
Home Assistant OS
HACS
USB: Stick
latest
No response
No response
No response
This integration shows no icon in the integrations overview and broken icons in the devices list
Would be nice to add an icon/logo for it.
Adding an icon/logo can be done with a PR at https://github.com/home-assistant/brands
Not really, just visually not great.
Home Assistant OS
HACS
USB: Stick
n.a.
n.a.
I thought about making a PR myself, but not sure which icon/logo to use.
Original text from plugwise/plugwise-beta#361
Following https://plugwise.github.io/progress/diff.html
Adding # pw-beta
tags where appropriate to ease up differences
PR is also meant as a step-up to see if we can carve out a way for the Core Team to decide on embedding USB into the Core Plugwise environment. E.g. making sure the 'mammoth' that is now https://plugwise.github.io/progress/diff.html can be used as an oversight and from that we can chunk PRs in a relative quick pace to ensure we embed USB within a month between releases. As such re-breathing live into Core PR 35713
Checklist as per Progress diff core/beta beginning of March 2023: (note that all COORDINATOR
relations are under coordinator.py
to not re-iterate across all domains)
plugwise/__init__.py
replaces placeholders when upstreamingplugwise/binary_sensor.py``dataclass
structure needs conformance/decision between beta and coreplugwise/climate.py
though mainly 'options' which won't upstreamplugwise/config_flow.py
foremost USB flow handling + some exceptionsplugwise/const.py
const & dataclassplugwise/coordinator.py
untouched, needs alignment between beta and coreplugwise/diagnostics.py
*) except coordinatorplugwise/entity.py
only isortedplugwise/gateway.py
mostly beta-only related thingsplugwise/manifest.json
no actions needed specificallyplugwise/number.py
needs alignmentplugwise/select.py
*) except coordinatorplugwise/sensor.py
dataclass
structure needs conformance/decision between beta and coreplugwise/strings.json
plugwise/switch.py
plugwise/util.py
(not in plugwise/plugwise-beta#361) This also depends on python-plugwise issue 131 to have more proper testing involved, but we might leverage community effort there as well once we have upstream in place.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/hassfest.yaml
actions/checkout v4.1.6
.github/workflows/test.yml
actions/checkout v4.1.6
actions/setup-python v5
actions/cache v4
actions/checkout v4.1.6
requirements_commit.txt
.pre-commit-config.yaml
astral-sh/ruff-pre-commit v0.4.8
pre-commit/pre-commit-hooks v4.6.0
asottile/pyupgrade v3.16.0
codespell-project/codespell v2.2.6
PyCQA/bandit 1.7.8
adrienverge/yamllint v1.35.1
pre-commit/mirrors-prettier v3.1.0
cdce8p/python-typing-update v0.6.0
igorshubovych/markdownlint-cli v0.41.0
After migrating an existing Stick/Windows PC installation with 7 Circles, by moving the Stick to a HA on RaspberryPi, only the Circles without a marking "Don't turnoff" for manual switching show up with their entities in HA. The Plugs that were marked do not show up at all. HA en Plugwise-beta are at the latest version
I installed the latest version of plugwise-beta. I have a stick usb, circle+, and 35 plugs. In plugwise source, I see all the plugs. In Home assistant in the beginning, the program found 17 plugs, and then it progressed to 25 plugs. Now it's stuck on 25 for 2 days. Should I just wait or is 25 maybe the limit of the plugin. It's great that some people are willing to put some effort in devlopping programs. Can I do something else to help? I am new to all this.
Only a portion of the plugs are detected. Looking at the logs it appears to be a timing and logic issue.
What appears to be happening is that on first discovery the plug do not al reply on time (probably that total timeout is too short).
A retry does not happen "to speed up discovery"
And then because the types are not yet known they are automatically assumed to be battery operated devices (which they are not).
The result later is that they are never picked up.
(the same network does work with OpenHab)
2023.2.5
none
Home Assistant Container
HACS
USB: Stick
2011-05-13 09:17:07
No response
When trying to reproproduce It appears I even get a timing problem with added the circle+:
home-assistant_plugwise_2023-02-17T09-19-46.296Z.log
I did a number of complete integration reinstalls:
First try: 10 Plugs
second try: 8 plugs
3 : no circle +
4 : no circle +
5 : no circle +
I am quite comfortable modifying python code and constant if you can give me a pointer on the dependencies.
Copy of plugwise/python-plugwise-usb#107 as most applies to this repo as well - and yes, coincidence exists both issues being 107 :)
Bare minimum applied in #106 to grease the wheels again.
Follow-up from #1 merge, as per @bouwew comments
custom_components/plugwise_usb/models.py
L28-31
This part is no longer needed after the split.Also below all plugwise_api=STICK, lines can be removed.
L35-36
Rewrite to class PlugwiseEntityDescription(EntityDescription):
Or remove this class and rename below classes to SensorEntityDescription, etc.
Maybe even better, move all descriptions (back) into the relevant files, as done in Core Plugwise
Not really a todo, more like a bug, but there is no bug issue type.
When trying to use the "Download diagnostics" option from Home Assistant for the plugwise beta integration it just fails. I see this error below in the logs.
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/plugwise/diagnostics.py:18
Integration: Plugwise Beta (documentation)
First occurred: 18:34:18 (1 occurrences)
Last logged: 18:34:18
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 246, in get
data = await info.config_entry_diagnostics(hass, config_entry)
File "/config/custom_components/plugwise/diagnostics.py", line 18, in async_get_config_entry_diagnostics
coordinator: PlugwiseDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][
KeyError: 'coordinator'
I just tested installing the plugwise USB beta (after actually only disabling the plugwise beta) and it found all the circles ๐ Is this the correct way?
Secondly, where are all the circle names, sensor names and area settings stored? Is there any way to copy this over instead of manually editing each circle in the HA web GUI from scratch?
Thanks!
No response
Home Assistant OS
HACS
USB: Stick
Latest
......
No response
On all my Circles and Circle+ the Energy Consumption Today stats stop working. They worked the first time i set it up, and maybe after a HASS restart, but then they stop updating. The Power Usage sensors work perfectly fine.
2012.22
No response
Home Assistant Container
HACS
USB: Stick
Not sure about stick but most circles are on 2011-06-27 10:52:18 and some on 2015-09-18 10:53:15
Here's the current logs without additional debugging enabled:
2022-12-19 04:45:48.684 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:46:08.703 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:46:28.719 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:46:48.734 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:47:08.756 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:47:28.766 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:47:48.782 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:48:08.810 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:48:28.817 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:48:48.837 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:49:08.851 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 04:49:28.864 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F00004BE237 because max retries 3 reached
2022-12-19 08:06:16.389 WARNING (send_messages_thread) [plugwise.controller] Cannot resend unknown request b'3614'
2022-12-19 13:51:20.337 WARNING (SyncWorker_44) [homeassistant.loader] We found a custom integration plugwise 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
2022-12-20 05:40:47.026 WARNING (send_messages_thread) [plugwise.controller] Cannot resend unknown request b'0011'
2022-12-20 05:40:58.544 WARNING (send_messages_thread) [plugwise.controller] Drop CirclePowerUsageRequest to 000D6F0000AF50EB because max retries 3 reached
2022-12-20 10:53:39.797 WARNING (serial_reader_thread) [plugwise.parser] Invalid message length received for NodeSwitchGroupResponse, expected 38 bytes got 22
2022-12-20 14:51:38.813 WARNING (serial_reader_thread) [plugwise.parser] Invalid message length received for NodeSwitchGroupResponse, expected 38 bytes got 22
2022-12-20 18:50:18.049 WARNING (serial_reader_thread) [plugwise.parser] Invalid message length received for NodeSwitchGroupResponse, expected 38 bytes got 22
2022-12-20 20:04:55.468 WARNING (serial_reader_thread) [plugwise.parser] Invalid message length received for NodeSwitchGroupResponse, expected 38 bytes got 22
2022-12-21 03:37:47.880 WARNING (send_messages_thread) [plugwise.controller] Cannot resend unknown request b'5A9A'
2022-12-21 07:25:42.336 WARNING (serial_reader_thread) [plugwise.parser] Invalid message length received for NodeSwitchGroupResponse, expected 38 bytes got 22
2022-12-21 07:49:45.883 WARNING (send_messages_thread) [plugwise.controller] Cannot resend unknown request b'0001'
2022-12-21 08:48:41.773 WARNING (serial_reader_thread) [plugwise.parser] Invalid message length received for NodeSwitchGroupResponse, expected 38 bytes got 22
2022-12-21 09:06:22.282 WARNING (serial_reader_thread) [plugwise.parser] Invalid message length received for NodeSwitchGroupResponse, expected 38 bytes got 22
This is only a snippet, there's many more lines lole like this.
Applies to all of them so not sure how useful
I used Plugwise2Py before, which seems as if it kept track internally on the energy usage over time. But i do recall that back when I used the Windows software with these plugs, it worked fine. So doesn't seem like a hw issue.
As discovered by both @CoMPaTech and @bouwew mypy
throws a spanner in the works when upstreaming to Core. As such mypy
should be part of our routine when updating/adding code to this repository.
n/a
Home Assistant OS
HACS
Smile: Adam (including Lisa, Tom, Floor)
core-dev
n/a
Todolist
script/run-in-env.sh mypy homeassistant/components/plugwise/*.py
into core-testing - branch mypy
plugwise/plugwise-beta#267homeassistant/components/plugwise/coordinator.py:30: error: Argument "update_interval" to "__init__" of "DataUpdateCoordinator" has incompatible type "float"; expected "Optional[timedelta]" [arg-type]
- branch mypy_coordinator
plugwise/plugwise-beta#266homeassistant/components/plugwise/config_flow.py:86: error: Incompatible return value type (got "Tuple[Dict[str, str], None]", expected "Dict[str, str]") [return-value]
homeassistant/components/plugwise/config_flow.py:101: error: Incompatible return value type (got "Tuple[Dict[str, str], Any]", expected "Dict[str, str]") [return-value]
homeassistant/components/plugwise/usb.py:202: error: "PlugwiseEntityDescription" has no attribute "should_poll" [attr-defined]
homeassistant/components/plugwise/gateway.py:89: error: Argument 3 to "PlugwiseDataUpdateCoordinator" has incompatible type "timedelta"; expected "float" [arg-type]
plugwise/plugwise-beta#266homeassistant/components/plugwise/entity.py:18: error: Type argument "PlugwiseData" of "CoordinatorEntity" must be a subtype of "DataUpdateCoordinator[Any]" [type-var]
homeassistant/components/plugwise/entity.py:21: error: Incompatible types in assignment (expression has type "PlugwiseDataUpdateCoordinator", base class "CoordinatorEntity" defined the type as "PlugwiseData") [assignment]
homeassistant/components/plugwise/entity.py:29: error: Argument 1 to "__init__" of "CoordinatorEntity" has incompatible type "PlugwiseDataUpdateCoordinator"; expected "PlugwiseData" [arg-type]
homeassistant/components/plugwise/sensor.py:111: error: Invalid index type "str" for "str"; expected type "Union[SupportsIndex, slice]" [index]
homeassistant/components/plugwise/sensor.py:159: error: "SensorEntityDescription" has no attribute "state_request_method" [attr-defined]
homeassistant/components/plugwise/select.py:105: error: "SelectEntityDescription" has no attribute "current_option" [attr-defined]
homeassistant/components/plugwise/select.py:110: error: "SelectEntityDescription" has no attribute "options" [attr-defined]
homeassistant/components/plugwise/select.py:115: error: "SelectEntityDescription" has no attribute "command" [attr-defined]
homeassistant/components/plugwise/number.py:96: error: Argument 1 to "async_send_api_call" of "PlugwiseEntity" has incompatible type "float"; expected "str" [arg-type]
homeassistant/components/plugwise/number.py:96: error: "NumberEntityDescription" has no attribute "command" [attr-defined]
homeassistant/components/plugwise/binary_sensor.py:208: error: "BinarySensorEntityDescription" has no attribute "state_request_method" [attr-defined]
homeassistant/components/plugwise/switch.py:152: error: "SwitchEntityDescription" has no attribute "state_request_method" [attr-defined]
homeassistant/components/plugwise/climate.py:112: error: Incompatible return value type (got "Optional[Any]", expected "str") [return-value]
Hi to all!
Last week my stretch got corrupted due to a sudden power-loss at the exact moment of a configuration store. There seems no option te revive the Stretch (factory reset doesn't solve the corrupt files and I am unable to find a Stretch firmware image anywhere to overwrite the corrupted xml file with a stock one). So I pulled the stick from the stretch and switched to Plugwise USB beta integration. It is running for 5 days now, but things are no where to being stable.
I run this environment on my Synology with VMM and these packages:
Core 2024.2.4
Supervisor 2024.02.0
Operating System 12.0
Frontend 20240207.1
What I encounter is that 4 circles where discovered within 1 hour. Then over the next days slowly 1 circle at the time is being added. I have ~15 active circles. The network was rock solid when in use with the stretch and no circles where moved during the migration. Also the USB stick is within 20cm of the location where it was inside the stretch.
After 5 days the integration found 12 circles, but the last took 2 days to be found. The main problem is that the circles randomly show Not available and seem to drop from the network. Even the circle within 30cm of the stick (RSSI -45dbm) and the circle within 30 cm of the Circle+ show this behaviour. Beside that is see huge memory spikes every couple of hours with also huge CPU load. Sometimes my HA installation freezes due to running out of memory. When enabling debug log I see thousands of lines of communication of the stick to the circles and seems completely overwhelming the network and sometimes HA as well.
Is there anything I can do to fix this? Can i provide logging to help debug this issue? Please note that my stick has connected to an other 20 circles in the past, but they are offline for years and function as a backup for the future when plugs are dying due to there age. The stretch did see those circles as offline, but never seemed to be impacted by the fact they where there but being offline.
The usb stick has a stable connection with HA and this is confirmed by the logging marking the stick always as 'ready'.
I am a kind of lost and losing the WAF due this issues :) Please advise on how to continue.
0.40.6
No response
2024.2.4
Home Assistant OS
HACS
USB: Stick
2011-06-27
No response
No response
In the lasttest version, de switching is working again, but stop after a couple of hours.
This is also noticeable on the measurements of the energy readings. See attached graph, the arrows: First one is the update/restart of HA and the second one is the moment the measurement is stopping regularly updating. At 5 AM I restarted HA again and the readings become normal again.
And we have a memory leak again after a couple of switches.
lastes
lastes
latest
Home Assistant OS
HACS
USB: Stick
2011-06-27 10:52:18
No response
No response
No response
I noticed the following sets of warnings in my HA logs. These kind of warnings are new in HA 2024.5.0.
I am not entirely sure what exactly triggered it, but I just re-enabled this integration after some downtime of my system. For some reason they did not show up when connecting to the same stick on my dev setup.
Logger: py.warnings
Bron: /usr/local/lib/python3.12/warnings.py:110
Eerst voorgekomen: 14:14:01 (9 gebeurtenissen)
Laatst gelogd: 14:18:25
/usr/local/lib/python3.12/site-packages/plugwise_usb/__init__.py:680: RuntimeWarning: coroutine 'async_setup_entry.<locals>.async_add_binary_sensors' was never awaited _LOGGER.error("Error while executing callback : %s", err)
/usr/local/lib/python3.12/site-packages/plugwise_usb/__init__.py:680: RuntimeWarning: coroutine 'async_setup_entry.<locals>.async_add_sensors' was never awaited _LOGGER.error("Error while executing callback : %s", err)
/usr/local/lib/python3.12/site-packages/plugwise_usb/__init__.py:680: RuntimeWarning: coroutine 'async_setup_entry.<locals>.async_add_switches' was never awaited _LOGGER.error("Error while executing callback : %s", err)
Logger: plugwise_usb
Bron: /usr/local/lib/python3.12/site-packages/plugwise_usb/__init__.py:680
Eerst voorgekomen: 14:14:01 (24 gebeurtenissen)
Laatst gelogd: 14:18:25
Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/binary_sensor.py, line 84: hass.async_create_task(async_add_binary_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/sensor.py, line 44: hass.async_create_task(async_add_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/switch.py, line 42: hass.async_create_task(async_add_switches(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
v0.40.7
No response
2024.5.2
Home Assistant OS
HACS
USB: Stick
Circle+ 2011-06-27 10:47:37, Circle 2011-06-27 10:52:18, 8x Circle 2009-09-08 15:50:31
2024-05-09 14:18:25.739 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/binary_sensor.py, line 84: hass.async_create_task(async_add_binary_sensors(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.739 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/binary_sensor.py, line 84: hass.async_create_task(async_add_binary_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.739 WARNING (serial_reader_thread) [py.warnings] /usr/local/lib/python3.12/site-packages/plugwise_usb/init.py:680: RuntimeWarning: coroutine 'async_setup_entry..async_add_binary_sensors' was never awaited
_LOGGER.error("Error while executing callback : %s", err)
2024-05-09 14:18:25.742 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/sensor.py, line 44: hass.async_create_task(async_add_sensors(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.742 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/sensor.py, line 44: hass.async_create_task(async_add_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.742 WARNING (serial_reader_thread) [py.warnings] /usr/local/lib/python3.12/site-packages/plugwise_usb/init.py:680: RuntimeWarning: coroutine 'async_setup_entry..async_add_sensors' was never awaited
_LOGGER.error("Error while executing callback : %s", err)
2024-05-09 14:18:25.744 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/switch.py, line 42: hass.async_create_task(async_add_switches(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.744 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/switch.py, line 42: hass.async_create_task(async_add_switches(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.744 WARNING (serial_reader_thread) [py.warnings] /usr/local/lib/python3.12/site-packages/plugwise_usb/init.py:680: RuntimeWarning: coroutine 'async_setup_entry..async_add_switches' was never awaited
_LOGGER.error("Error while executing callback : %s", err)
2024-05-09 14:18:25.850 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/binary_sensor.py, line 84: hass.async_create_task(async_add_binary_sensors(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.850 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/binary_sensor.py, line 84: hass.async_create_task(async_add_binary_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.853 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/sensor.py, line 44: hass.async_create_task(async_add_sensors(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.853 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/sensor.py, line 44: hass.async_create_task(async_add_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.855 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/switch.py, line 42: hass.async_create_task(async_add_switches(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.855 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/switch.py, line 42: hass.async_create_task(async_add_switches(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.992 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/binary_sensor.py, line 84: hass.async_create_task(async_add_binary_sensors(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.992 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/binary_sensor.py, line 84: hass.async_create_task(async_add_binary_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.995 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/sensor.py, line 44: hass.async_create_task(async_add_sensors(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.995 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/sensor.py, line 44: hass.async_create_task(async_add_sensors(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
2024-05-09 14:18:25.998 WARNING (serial_reader_thread) [homeassistant.helpers.frame] Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/switch.py, line 42: hass.async_create_task(async_add_switches(mac)), please report it to the author of the 'plugwise_usb' custom integration
2024-05-09 14:18:25.998 ERROR (serial_reader_thread) [plugwise_usb] Error while executing callback : Detected that custom integration 'plugwise_usb' calls async_create_task from a thread at custom_components/plugwise_usb/switch.py, line 42: hass.async_create_task(async_add_switches(mac)). Please report it to the author of the 'plugwise_usb' custom integration.
No diagnostics option
I have been looking through the code a bit and I noticed that the discovered_device
callback methods are calling hass.async_create_task
.
According to https://developers.home-assistant.io/docs/asyncio_working_with_async this is used for starting tasks from async. However I think the stick api (python-plugwise-usb) is using threading, so the discovered_device
device callback is probably called from a thread?
That also seems to match with what the warnings are saying.
I would guess that instead something like below should/could be done?
However I am a bit worried that this could block the thread for a while, so would like a second opinion before trying this out on my setup.
def discovered_device(mac: str):
"""Add switches for newly discovered device."""
asyncio.run_coroutine_threadsafe(async_add_switches(mac), hass.loop).result()
My configuration: USB Stick, Circle+ and 6 more Circles. Latest version 0.14.4 installed. The configuration runs stable and a number of entities (switching on/off; current power usage; power consumption current hour;) work well, however the values of power consumption previous hour; power consumption today /yesterday; on the overview screen remain empty. Are these still work in progress? I checked the Plugwise part by moving the the stick to a Windows PC and "reading" the history with the Plugwise Source application. All connected Circles reported the power-history of the past couple of weeks.
Add services to translations to ensure hassfest is alright and workflow can complete
I have been running into issues with HA memory usage keep growing until it eventually hangs HA. I finally found that when stopping this integration that the memory increase stops. So it seems it is related to this integration.
As an example see the picture below. The blue line is HA memory % usage. I stopped this integration on 16th of July around 13:00 after which it stabilizes. Before that you can see a few spikes where memory usage starts rising. I just restart HA to avoid it causing problems so that is why the spikes go down.
v0.40.1
No response
2023.7.3
Home Assistant OS
HACS
USB: Stick
Circle+ 2011-06-27 10:47:37, Circle 2011-06-27 10:52:18, 8x Circle 2009-09-08 15:50:31
I enabled logging with the "Enable debug logging" option in the integration around 21:45 on 23rd of July.
These are all the lines that have plugwise in them as I could not find the line mentioned in the template.
I don't see the diagnostics download option for this integration. Do see it for others.
Might have started after I added 8 more plugs to the network a while back. Don't think I noticed issues before.
Follow-up from #1 merge, as per @bouwew comments
custom_components/plugwise_usb/strings.json
All translations are related to Anna/Adam/P1, these can all be removed.
Also, other stuff can be removed because the Config Flow is much simpler now.
And, don't forget to update the translation-files
As a team we have been unable to maintain communications with the main tester and developer for the USB legacy devices. If you want to help us maintain the USB code by joining (or reaching out to @brefra) contact us through this issue.
Warm welcome to @dirixmjm who joined efforts on the USB side as of December 2023. Welcome to the team!
I regularly have that some circles are not available such as Circle type F (000D6F000278B66C) or 8b25a all the way, the B66C is close to the Circle + at most 5 to 6 meters away.
I also have problems with some circles when I press the switch it jumps back 15:19 just done see the log below
Circle is : 000D6F000278B257
2021-01-28 15:19:33 INFO (send_messages_thread) [plugwise.controller] Send NodePingRequest to b'000D6F000278B257' using seq_id b'799C'
2021-01-28 15:19:33 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F000278B257 because max retries 3 reached
2021-01-28 15:19:33 INFO (send_messages_thread) [plugwise.controller] Send NodePingRequest to b'000D6F000278B24F' using seq_id b'799D'
2021-01-28 15:19:33 WARNING (serial_reader_thread) [plugwise.controller] Drop NodePingRequest to 000D6F000278B24F because max retries 3 reached
2021-01-28 15:19:33 INFO (send_messages_thread) [plugwise.controller] Resend NodePingRequest to b'000D6F000278B257' using seq_id b'799E', retry 2
2021-01-28 15:19:33 INFO (send_messages_thread) [plugwise.controller] Resend NodePingRequest to b'000D6F000278B24F' using seq_id b'799F', retry 2
2021-01-28 15:19:34 INFO (serial_reader_thread) [plugwise.controller] Received NodePingResponse from 000D6F00005528C5 with sequence id b'799A'
2021-01-28 15:19:34 INFO (serial_reader_thread) [plugwise.controller] Received NodePingResponse from 000D6F00005528C5 with sequence id b'799A'
2021-01-28 15:19:34 INFO (serial_reader_thread) [plugwise.controller] Drop unexpected NodePingResponse using seq_id b'799A'
2021-01-28 15:19:34 INFO (serial_reader_thread) [plugwise.controller] Received CirclePowerUsageResponse from 000D6F00005528C5 with sequence id b'799B'
2021-01-28 15:19:34 INFO (serial_reader_thread) [plugwise.controller] Received CirclePowerUsageResponse from 000D6F00005528C5 with sequence id b'799B'
2021-01-28 15:19:34 INFO (serial_reader_thread) [plugwise.controller] Drop unexpected CirclePowerUsageResponse using seq_id b'799B'
Plugwise might be totally innocent but here's my scenario:
Two fully separate HA installations in different houses. Both are Rpi4 with new original Rpi OEM PSUs. Both with Plugwise USB Stick plugged in. Both regularly crash and need power cycling to get back up again.
In addition to the Plugwise Beta plus Sticks both also have Tasmota installed. Other than that they have a few things installed but not the same on both.
Just curious if the Stick can be part of the problem if anyone else have had issues? And if so if Plugwise beta is something to dig out logs from and so on.
All (both Rpis set up from scratch this spring)
None
Home Assistant OS
HACS
USB: Stick
Circles are firmware: 2015-09-18 10:53:15
No response
No response
No response
Though more likely #9 and a lot of linting to get near acceptable state for Core
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.