Plugwise core and custom_component

@bouwew first hour:

Doesn’t look like it. Keep it running a bit longer.

Ok I’ll report to @brefa.

1 Like

@herwinjs, Thanks for testing and reporting.

to help futher investigate. Could you install/enable the profiler integration and the start the profiler.memory services at the Developer Tools using the service settings like below:

service: profiler.memory
data:
  seconds: 300

After 5 minutes Homeassistant will notify you about a generated *.hpy file. Please share this file so I can have look into the memory issues.

@brefra Send a PM

@herwinjs thanks a lot. The log gave a nice hint the memory leak is located at the code part that is responsible for collecting the energy history.
So I tried to quick fix for that and just released a test version v0.34.6b1. Would you like to give this version a try?

@brefra The new code is running, keep you posted.

1 Like

@brefra helaas…

First 15min are stable so that might give a clue where to look now…

1 Like

I discovered there could be cases the integration would request the same energy information multiple times. I added some changes to prevent this in an new test released v0.34.6b2.
Please let me know how this one behaves.

First 30 minutes looks stable now!! Keep it running for few more hours als let you know.

1 Like

@brefra this more like it!!

Thanx for the effort!

@herwinjs And what is the status of the memory after a few days of testing? Still OK?

@bouwew @brefra Here is the update:
I think still a little memory leak, but much more usable.

1 Like

Is anyone running this component stable with 20+ plugs and using the usb stick?
Looking at the existing issues it appears multiple people are having similar problems. I my case I never get more than 10 plugs detected.

:fire: :rotating_light: :warning: Announcement with breaking-changes for USB users :warning: :rotating_light: :fire:

TLDR;

  • :rotating_light: If you are using a USB Stick *) do not update to the latest version of the custom_component (see bottom of post for breaking change note if you do). Remain on v0.34.10 or switch to the new custom_component.

  • :white_check_mark: If you are using Plugwise available within Home Assistant core, nothing really changes for you

  • :white_check_mark: If you are using a Smile (P1/Anna/Adam) or Stretch, nothing (really) changes for you

*) Using it directly, i.e. plugged in to your Home Assistant device. This does not apply to the Zigbee USB device attached to your Adam or Stretch

In short:

Using the USB stick directly in your Home Assistant device? You have two options:

Using a Smile either in Core or through the custom_component? Just update when we release new versions. There are no (breaking) changes and there is no need to install the new component.

Background

We have recently worked on our (custom_component) code an started refactoring some of the code. As time goes by code from HA Core goes into the custom_component and tested new functionality flows back to HA Core.

We cleaned up thoroughly in preparation to make a new attempt at upstreaming the USB code and asking the Core team how we would best approach this. Back in 2020 there was no proper way to have multiple ‘different products’ from a single vendor, hence the request to combine forces and proved Smile and Stick support from a single integration. Currently there is no requirement for this anymore and having separate integrations makes a lot of sense (e.g. there is not much ‘shared code’ between the components from our side).

We have recently worked on ‘splitting’ the code again, after our merge back in the days. This provides a cleaner visibility of things we have in beta and/or are not ready (or eligible) for upstreaming + it paves the way for finally supporting USB Stick directly from HA Core. (Though that is still a work in progress and will take time)

Breaking changes (USB users only)

Versions of the beta custom_component above v0.34.10 are not supporting USB anymore. Likewise for the backend module python-plugwise v0.27.10. Again, if you have a Smile based product (P1, Adam, Anna, Stretch), there is nothing changing for you an no breaking changes.

If you are using plugwise and use USB, please refrain from updating and stick to v0.34.10 or better yet; add https://github.com/plugwise/plugwise_usb-beta as an additional repository in HACS. (See the readme on te repository for more information).

There is no new functionality - but having a new component does unfortunately mean that your existing sensors (and data) will not ‘transfer’ to the new component.

If you updated to v0.40 or above and lost connectivity, just use the ‘three dots’ in the top right in HACS (i.e. HACS → Integrations → Plugwise-beta then click the three dots) and choose ‘Download again’ and select v0.34.10 and after the mandatory restart you should have USB working again.

Testers (of the USB functionality)

Again thanks for all your time, testing and creating issues and feature requests. Issues that we not closed have been moved to the new repository. To prevent backscatter in e-mails we decided not to move closed issues to the new repository.

2 Likes

FYI the link to https://gitHub.com/plugwise/plugwise_usb-beta` is incorrect, it has an extra backtick at the end. Should be https://github.com/plugwise/plugwise_usb-beta

Tnx, I actually forgot to close the backtick on the version, reworded and fixed accordingly

Hi all,

I’ve got a question and I’m not sure if it is a bug in the integration:

Previously I had a setup with Adam/Anna and Lisa’s/Tom’s. Now I’m switching to a setup where I replace the Anna with a Lisa (due to a renovation in our house).
So I use Adam without an Anna.

I’ve removed the Anna from the Plugwise app and setup the integration from scratch, but the integration keeps adding an Anna entity that seems available and also provides (static) sensory data:

(other Lisa’s still to be added)

(data for Office Tom is empty due to the addition of the Lisa recently, still need to update the graph)

Anyone familiar with this?

Delete the Plugwise integration in HA, restart HA, and add the Plugwise integration again.
That should completely “refresh” the scope of the Plugwise integration in HA.

I just followed your steps (didn’t do a restart between deleting and adding the integration before), but without success:

Is there any debug info that I can provide that might be helpful?