Plugwise core and custom_component

This is about Plugwise Products and our support for them both in Core and for beta-testing in a custom_components. Starting September 2020, we (@bouwew, @brefra and @compatech) have joined forces supporting most (if not all) Plugwise products in beta and aiming for having all of those in Core soon. This includes the USB stick and power-apparel and the networked Smile/Stretch products (climate and power).
Update April 2023: as per recent discussion with a member of the Core team about how to again start upstreaming (i.e. supporting USB from Core, not via custom_component) again time went by and we can have separate components again like @brefra started out with. We will all still be working on the code, it just will be separate components under the Plugwise brand in HA Core (in the near future)

WARNING If you use USB with a Stick and are a current user of the beta custom_component’ please do not update and use the new plugwise_usb-beta component. See this post below for more information

Please note that for active support requests, please create an issue on the appropriate Plugwise (for HomeAssistant) ¡ GitHub repository. While we are following this topic in general, but we might miss your call for help and are more (pro)active on Github.

Questions, support and more about configuration is welcome in this topic, though you are welcome to read the old ‘Network (Smile)’’ and ‘USB’ topics for historical purposes.

If you just got yourself a shiny new or famous legacy Plugwise component - install from the integrations page first. If it doesn’t work we’re on Discord or here in the forums to help. We might ask you to (temporarily) install the custom_component to help us helping you.

If you aren’t shy to try beta software, have a Plugwise Climate or Power product at your hands and want to get it working in Home-Assistant we have the beta and custom_component for plugwise. Difference with the currently upstreamed and HA-core available plugwise component test your ideas, new firmware versions and potentially new products included in the Plugwise brand. Installing the custom_component involves configuring HACS and/or manual tinkering.

To get started, review the README on https://github.com/plugwise/plugwise-beta and share your experiences here and your issues at that repo!

If you’re unsure how to start, if you already use the HA-core component or a previous version: please always read the README or release notes.

On behalf all of us, big thanks to Plugwise and community members @riemers and @tane for their support and obviously all our users and testers who dealt our typos and challenges. Disclaimer, while we are communicating with Plugwise and they expressed their gratitude through their newsletter, we are not part of Plugwise as a company. We are just a bunch of guys anxious to get our (and your) Plugwise products working with Home Assistant.

2 Likes

:warning: BREAKING CHANGE (for USB/Stick-owners):warning:
Migrating from plugwise-stick to plugwise-beta through HACS is a breaking change

BETA-Status: v0.11.0 has been released through our repository and HACS, we sincerely hope you like it and would love your feedback.

For those wondering about the HA Core integration:

Enjoy the weekend, happy beta-testing and stay safe!

1 Like

I’ve been a long time user of brefra’s plugwise stick code in HA next to your plugin for my PW Smile, so happy to hear you’ve joined forces!

I will start testing v0.11.0 today and report back later.

Just to be sure, to migrate we just need to remove Plugwise USB stick integration from HA integrations and HACS, then upgrade Plugwise beta custom component to v0.11.0 right?

PS will the entities keep the same names, so my Grafana configuration stays valid? (yes they do)

No need to answer your question anymore I guess? :slight_smile:

No, after installing the new integration my graphs still worked, so that was pretty obvious :wink:

I see no issues so far. Installation worked fine and almost all of my circles have been detected. :+1:

With the ‘old’ integration I had to restart HA every two days to get measurements back, it seemed the stick would just stop responding after a while. I had a cronjob active to just restart the entire vm. I’ve disabled this for now, to see if this issue is still present.

As the circles keep some historical data, could this data be used to fill any measurement gaps in HA and possibly Grafana? Not really sure if that could work as the integration would need to fill influxdb for Grafana with older data.

In a more generic answer: you might be able to export the ‘recorder’ data and feed that back into influxdb or the like (grafana is just a front-end for your data, it doesn’t neccesarily keep records). But if there isn’t any data from the devices (i.e. entities in HA) than there wouldn’t be anything to backfill I guess :frowning:

Real glad you were able to try out the integration, I didn’t read back the old topic fully but maybe it’s something @brefra is aware of ‘where to look’. It might also be hw-related.

To clarify a bit, the plugwise-beta integration has a lot of improvements compared to the plugwise-stick integration v1.2.2.

New features

  • Support for battery powered plugwise Scan (motion detection) devices.
  • Service plugwise.configure_battery_savings to configure the battery related settings for devices running on batteries.
  • Service plugwise.configure_scan to configure the Scan motion sensor.
    for battery powered devices. Note: this service is only available if battery powered devices are found.
  • Automatically register (join) new Plugwise devices or devices that have been reset to factory defaults.
  • Service to unregister devices from the USB-stick.

Fixes & optimizations

  • Proper model detection (one of the first results of our collaboration :muscle:)
  • Power updates for “Stealth” devices
  • Speedup of initial discovery process at startup of Home Assistant when one (or more) devices are off-line
  • Discovery process is more reliable
  • Improved overall protocol handling which makes the integration more reliable
  • Proper logging levels: info level logs network communication
  • Reduced time to shutdown/restart.

Known issue / behaviour

  • After startup of Home Assistant (or restart of this Integration) battery powered devices will be unavailable until they are awake to send their state(change).

@hapklaar, hopefully this version fixed your “stop responding” issue. If not please report back here. It should definitely be fixed.
Extracting historical data (power consumption per hour) from the circles is possible to some extent. The problem is passing this data to HA. I am not aware of a possibility of some kind of rewriting the history like “This sensor did received this value 3 hours ago”.

2 Likes

Sweet. I think I have a Scan somewhere in a drawer, never used. Will test that as well if I can find it.

In any case I’ll report back in a few days to let you know if the issue has been fixed.

I have 3 Stealths, which are indeed now detected as such (they were circles before). Has anything else been changed for these?

There is no difference in code/functionality between models reported as “Circles” or “Stealth’s”. Previous versions reported the device type while it now reports the model based on the hardware version. Internally it’s still an “Circle” device type.

I would love to join this, but i would need to be able to configure the polling time of the power usage (W)

My network has 19 nodes, so now it takes almost one minute to get a power update.

1 Like

It seems to have fixed it yes. It’s still operational after a week without restarts.

RELEASE plugwise-beta v0.12.0:

2 Likes

I’am using this beta version now with my PW stick and I really like it, thx!

Is there a way to get the production of a whole day/yesterday previous hour just like with consumption?

I don’t have any power production device to test, so I don’t realy know if there is a way to report the power production of today/yesterday. But I do know the today and yesterday power consumption is calculated by retreiving the relevant messurements records of the devices logs, which is collected every hour and stored into its own memory.
As far I’m aware there is only one kind of record stored in memory. Despite of the sensor name called Power consumption yesterday it might represent the the actual power production value in your case.
Does the power consumption sensor show a reasonable number?

Yes “Power usage” and “Power Usage 8 seconds” does show the actual production power right and so does “Power production current hour” but that one is continue so not a 0 value at every hour. The -3.905 is from more then one day.

All power consumption kWh values are not used at all for production(the 0.007 is from a consuming pc as a test)


EDIT:
I just did a test with a Circle without the setting in the Circle properties “delivers energy” in Plugwise Source and then I get positive (right) values on hour/today for production in the consumption entities. That might be a workaround for production at the moment.

Thanks, It looks like there might be some possibilities for this. No promises yet, I have to do some research first.
Just for the reference I registered a feature request for the backend lib.

1 Like

I’ve just installed this beta and P1 & Adam seem to work fine!

However, my Stretch 3.1.11 fails to connect and it’s not clear to me why?

It ends with the error message ‘device has already been configured’ (in Dutch)
But it hasn’t…
Any idea where to look or what might cause this?

Hi Ollem,

Sorry to read that. Can you please show us the detailed error-message that is shown in the Logs?
That will help us find the cause.

Sure! Thanks for the help.

Any recommended log setting? I tried " homeassistant.components.plugwise-beta: debug"
Did not really help me to find out what happened other than this:

2020-11-10 17:27:08 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.140339944461168] Sending {‘id’: 33, ‘type’: ‘result’, ‘success’: True, ‘result’: {‘resources’: {‘component.plugwise.config.flow_title’: ‘Smile: {name}’, ‘component.plugwise.config.step.user.title’: ‘Plugwise type’, ‘component.plugwise.config.step.user.description’: ‘Product:’, ‘component.plugwise.config.step.user.data.flow_type’: ‘Connectie type’, ‘component.plugwise.config.step.user_gateway.title’: ‘Verbinden met de Plugwise Smile’, ‘component.plugwise.config.step.user_gateway.description’: ‘Aub invoeren:’, ‘component.plugwise.config.step.user_gateway.data.password’: ‘Smile ID’, ‘component.plugwise.config.step.user_gateway.data.username’: ‘Smile gebruikersnaam’, ‘component.plugwise.config.step.user_gateway.data.host’: ‘Smile IP-adres’, ‘component.plugwise.config.step.user_gateway.data.port’: ‘Smile poort nummer’, ‘component.plugwise.config.step.user_usb.title’: ‘Verbinden met een legacy USB-stick’, ‘component.plugwise.config.step.user_usb.description’: ‘Aub invoeren:’, ‘component.plugwise.config.step.user_usb.data.usb_path’: ‘USB pad’, ‘component.plugwise.config.step.manual_path.data.usb_path’: ‘USB pad’, ‘component.plugwise.config.error.already_configured’: ‘Dit apparaat is al geconfigureerd’, ‘component.plugwise.config.error.invalid_auth’: ‘Authenticatie mislukt, voer de 8 karakters van je Smile goed in’, ‘component.plugwise.config.error.cannot_connect’: ‘Verbinding mislukt, probeer het opnieuw’, ‘component.plugwise.config.error.network_down’: ‘Plugwise Zigbee netwerk is down’, ‘component.plugwise.config.error.network_timeout’: ‘Network communicatie timeout’, ‘component.plugwise.config.error.stick_init’: ‘Initaliseren van USB-stick mislukt’, ‘component.plugwise.config.error.unknown’: ‘Onbekende fout’, ‘component.plugwise.config.abort.already_configured’: ‘Dit apparaat is al geconfigureerd’}}}

I’m not using the USB stick but the network connection to the Stretch, and I’m sure I selected that option in HA.

Not needed to set debug, errors are always shown in Logs.
But you need to look directly after you’ve encountered the error.

But wait, you see a message from the config-flow, not a HA Core error-message.

Did you ignore the device in the past? Under “Integraties” press the 3 vertical dots on the top-right, select “Ignored” and look if there is a Plugwise Integration being set to ignore? If yes, un-ignore it.

If that is not the case, the best thing to do is to delete all the Plugwise integrations, reboot HA Core, and add the Integrations again. Via Discovery and/or manually.