Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: 8 - 10 plug out of 25 detected in discovery phase #12

Closed
joostwestra opened this issue Feb 17, 2023 · 18 comments
Closed

[BUG]: 8 - 10 plug out of 25 detected in discovery phase #12

joostwestra opened this issue Feb 17, 2023 · 18 comments
Assignees
Labels
bug Something isn't working

Comments

@joostwestra
Copy link

Describe the bug.

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)

What version of Home Assistant Core has the issue?

2023.2.5

What was the last working version of Home Assistant Core?

none

What type of installation are you running?

Home Assistant Container

How did you install plugwise-beta?

HACS

What kind of Plugwise device is having issues?

USB: Stick

What firmware version is your Plugwise product at?

2011-05-13 09:17:07

Logging

No response

Diagnostics information

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

Additional information

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.

@joostwestra joostwestra added the bug Something isn't working label Feb 17, 2023
@joostwestra
Copy link
Author

Now 9 plug are detected by getting many warnings and error's
Screenshot 2023-02-18 at 10 24 45

@bouwew
Copy link
Contributor

bouwew commented Feb 19, 2023

@joostwestra which version of Plugwise-beta do you have installed?

@joostwestra
Copy link
Author

Thanks for looking into this.
I am using 0.34.5
To me it appears that most issues already originate in the pyhton-plugwise part.
Mainly the stick.py code,

@bouwew
Copy link
Contributor

bouwew commented Feb 19, 2023

Please update to v0.34.6b2 (becomes visible via Redownload - enable Show beta-versions in HACS).
See plugwise/python-plugwise#271 for the changes between v0.34.5 and v0.34.6b2

Yes, the magic happens in the backend python-plugwise - stick.py. But there are a large numbers of connected files.
@brefra is the main contributor to the code that adds support for the Stick.

@joostwestra
Copy link
Author

I have updated to v0.34.6b2:
So far the discovery phase is not going much better:
Screenshot 2023-02-20 at 10 27 47

Will update if I manage to get it connected to the circle+

@joostwestra
Copy link
Author

Eventually again ended up with 8 plugs connected (with version v0.34.6b2:)
The debug logs grow very fast. So here the is a smaller debug log.
home-assistant_plugwise_2023-02-20T10-28-49.911Z.log

I also have a bigger debug log. But that one is already 350Mb.

@brefra
Copy link
Contributor

brefra commented Feb 28, 2023

@joostwestra Thanks for the log !
It revealed a bug which randomly stops the communication for up to a minute. I've release a test version v0.34.8b0 that contains the reference to the backend fix.
Be aware it requires the latest HA version (2023.3) which is scheduled to be released tomorrow so it won't show in HACS yet.

@joostwestra
Copy link
Author

Thanks @brefra for looking into this. The logs are definitely looking cleaner with v0.34.8b0

However so far it appears that still too many timeouts are hit in the discovery phase.
And so far only 9 devices detected.

Will keep trying a combination of keeping it running and reloading to see if it will pick up more.|

I attached some logs:

[home-assistant_plugwise_2023-03-02T08
home-assistant_plugwise_2023-03-02T08-47-59.105Z.log
-36-01.226Z.log](https://github.com/plugwise/plugwise-beta/files/10869357/home-assistant_plugwise_2023-03-02T08-36-01.226Z.log)

@joostwestra
Copy link
Author

After some more testing it again appears to get stuck between 8-10 plugs with versions.
Maybe my setup has more "hops" between the stick and the plug and more plug than most setups.

@bouwew
Copy link
Contributor

bouwew commented Mar 2, 2023

@joostwestra after every restart of HA the Stick must rediscover/reconnect to all the devices in the network.
I would advise to let the system run for several hours and then check how many Circles/Plugs in total it has found.

@joostwestra
Copy link
Author

Current stuck at 11 plugs after waiting for much over 24 hours.

@joostwestra
Copy link
Author

Is there anything more I should do myself to help? Fork repo and play with variables myself? Show that the same setup works with other libraries?

@joostwestra
Copy link
Author

Problem persists with release
v0.34.8 Bugfixes for Stick, P1 legacy

I also do not really see any additional stick related fixes verses xv0.34.8b0

Any recommendations on to further actions?

@joostwestra
Copy link
Author

update @brefra:
Even though the setup was working fine with OpenHab. I went back to the windows application and cleaned up met deployment, mainly removing devices that are not directly available. And now devices that are available are detected correctly it appears.
So this setup is somehow more sensitive to deployment with plugs that are not available (anymore).

@CoMPaTech CoMPaTech transferred this issue from plugwise/plugwise-beta Apr 19, 2023
@joostwestra
Copy link
Author

Did a new deployment today.
Again many of the powered up plugs were not detected.
FIX:
Go to plugwise source and make sure ALL! the plugs are available in the Source Application. If you powered up en need less plug make sure you remove them form the network.
Now remove and reinstall the integration an all plugs are detected.

@dirixmjm
Copy link
Contributor

dirixmjm commented Jan 7, 2024

@joostwestra although I don't expect the problem to be solved, could you please try with beta-version 0.40.5a1 and report back?
To avoid a huge logfile, please set loglevel to info (that should enable sufficient data to get started).

logger:
  default: warning
  logs:
    custom_components.plugwise_usb: info
    plugwise_usb: info

@joostwestra
Copy link
Author

@dirixmjm Good to see you are picking this up. It might take while for me to test this, because I am currently using the system with a smaller deployment and less "hops" that work more stable.

@dirixmjm
Copy link
Contributor

@joostwestra version v0.40.5 has just been released. Please update and test.
If the problem cannot be reproduced any longer I think it is best we close the issue report for now, and you can open a new one in the future if you find more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants