Plugwise Plugs component

I did solve this isssue at my local installation by making sure the backend lib “pushes” a value update and present the updated value of 0. This changes the state value from unknown to 0.
Currently busy to get all the bits and pieces ready to have an updated integration (and depending backend library) available in HACS.

:shushing_face: The upcoming version will expose two additional sensors for both the inbound and outbound signal strength levels. Both sensors are disabled by default, so you have to enable them from the UI manually.

1 Like

I’ve requested to add the “Plugwise USB-stick” integration to HACS.
If you can’t wait => manually add https://github.com/brefra/home-assistant-plugwise-stick as “custom repository” in HACS. :yum: Edit: The integration is now available in HACS

Updates in the version available in HACS:

  • Adds two addional sensors for the RSSI levels. Be aware those are default disabled.
  • Fixes most of the “Unknown” issue

At the “To Do” list:

  • Fix the “Unkown” issue for the general “power usage” sensor. Just noticed I missed this one. :thinking:
  • Add proper change log/versioning to the HACS integration doc.
  • Fix “Entity ID already exists…” messages when a device is discovered after a discover failure during startup of the integration.
  • Add linking/registration of new devices (and removal)
  • Add support for other devices (Scan, Sense, Sting)
  • Any other feature request??
1 Like

Great, thanks!

After installing the latest version I’m seeing two “unknown” values:
sensor.power_consumption_current_hour_xy1z2 and
sensor.power_usage_xy1z2

I’ve now installed it via HACS! Works great and now with the new plugwise images :blush:
Actual power usage read is the thing I mostly use, as you said this is still giving a lot of times Unknown.

Thanks a lot!

I’ve just released an updated version (1.2.0) of this integration in HACS:-

Fixes

  • Solve the “unknown” issue when the measured power consumption remains at 0 since start-up.
  • Make devices properly available afterwards when they are not online during the startup of Home Assistant.
1 Like

Great, just installed through HACS, works fine.

Only thing to complain about is the Plugwise logo being used. It seems the logo has a white background instead of transparant. On default white theme this is fine, but when using a dark theme it looks like this:

image

PS another minor thing, the Stealth devices are still detected as Circle

1 Like

Ok, you’re apparently running the 114 beta release. Indeed I have to fix the logo background. Thanks for reporting.

I’m still busy to figure out a different way to detect the difference between the Circle and Stealth devices. Currently the device type is based on reported hardware ID, which is the circle one for your stealth devices.

After updating to the new version, I’m seeing this in Logs:

Log Details (ERROR)
Logger: python-plugwise
Source: /usr/local/lib/python3.8/site-packages/plugwise/stick.py:81
First occurred: 9:57:23 AM (1 occurrences)
Last logged: 9:57:23 AM

###>- dept version -<###
1 Like

:grimacing: forgot to remove this log entry before building/publishing the backend lib
Fortunately it doesn’t harm in any way. It’s only one log entry during startup. Please ignore it for now, I’ll fix it in next release.
Thanks for reporting :+1:

After updating to Core 0.114.0, I’m seeing this in Logs:

Log Details (ERROR)
Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:313
First occurred: 2:57:56 PM (1 occurrences)
Last logged: 2:57:56 PM

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.8/site-packages/plugwise/stick.py", line 701, in _watchdog_loop
    if not self.connection.read_thread_alive():
  File "/usr/local/lib/python3.8/site-packages/plugwise/connections/connection.py", line 103, in read_thread_alive
    return self._reader_thread.isAlive() if run_reader_thread else False
NameError: name 'run_reader_thread' is not defined

Thanks @bouwew for reporting the exception.
I’ve fixed this in the updated v1.2.1 release. Please update the custom Integration from HACS.

1 Like

@brefa, an observation and some feedback, if you don’t mind :slight_smile:

I see you are showing as an attribute the “today_energy_kwh” value. When looking at the value: 0.002 at the moment, and looking at my own sensor for the same entity: 2.2, it looks like your value is a factor 1000 wrong.

I also see that you are showing the device_class “outlet” as an attribute.
FYI, switches don’t have device classes, see here: https://www.home-assistant.io/docs/configuration/customizing-devices/#device-class
Click on each entity to see the allowed device_classes per type of entity.

@bouwew, I’m happy with any feedback :wink:

Nice catch, the today_energy_kwh is definitely miscalculated. I have fixed it in the latest version 1.2.2.

I have assigned the “outlet” device_class according to this development page. Apparently the user documentation is kind of missing the switch entity.
Do you experience any negative behavior due to this device_class setting?

Thanks for the fix, the value is correct now.

Also, thanks for the link, I hadn’t looked there :slight_smile:
Indeed, the documentation is not great.

Just FYI, not to steal your thunder @brefa :slight_smile: , initial support for the Plugwise Stretch with firmware 3.1 is available in Plugwise-beta. Please leave a message in the Plugwise Smile custom_component (BETA) topic if you are interested in helping us test.

@brefa I just noticed that after the latest update the sensors for power_consumption_today_xyz and power_consumption_yesterday_xyz are always zero.

@bouwew, sorry I cannot reproduce the problem you are reporting. Do you experience this for all plugs and do the values remain at 0 even after one day?
If possible could you collect some debug logging of the startup process (first few minutes should be enough) so I’m able to investigate this.

logger:
  default: warning
  logs:
    custom_components.plugwise_stick: debug
    python-plugwise: debug

Sneak preview for next release:
Getting support for Scan devices and automatic accepting (joining) of new or reset devices is almost finished:


Still some code polishing and reorganization to do…

I’ve just checked again: false alarm, the numbers are no longer 0 :slight_smile:
Must have been a glitch in my system, sorry!

Hi, first off thank you for all your hard work. I was very excited to see that my plugs aren’t useless anymore. I do have a problem with configuring the USB stick. It gives me the following error: ‘Initialization of Plugwise USB-stick failed’ when selecting the stick. I followed the 3 steps written in the first post, anything I overlooked? thanks.

Did you restart HA Core after installing the integration?
This is not in the first post but is required.