Plugwise Smile custom_component (BETA)

The integration is not installing on my system.
After the installing window it pops back to the integration list. Rebooted everything, same result.

In what git should I report this, HA core or your Plugwise Smile?

I am currently running on 111.1

||amd64|

| --- | --- |
|dev|false|
|docker|false|
|hassio|false|
|installation_type|Home Assistant Core|
|os_name|FreeBSD|
|os_version|11.3-RELEASE-p9|
|python_version|3.7.6|
|timezone|Europe/Amsterdam|
|version|0.111.1|
|virtualenv|true|

Still dumping all info here.

2020-06-12 13:20:43 ERROR (SyncWorker_25) [homeassistant.util.package] Unable to install package Plugwise_Smile==0.2.13: ERROR: Command errored out with exit status 1:
     command: /srv/homeassistant/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ytzy5xzz/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ytzy5xzz/lxml/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-ytzy5xzz/lxml/pip-egg-info
         cwd: /tmp/pip-install-ytzy5xzz/lxml/
    Complete output (3 lines):
    Building lxml version 4.5.1.
    Building without Cython.
    Error: Please make sure the libxml2 and libxslt development packages are installed.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available.
You should consider upgrading via the '/srv/homeassistant/bin/python3.7 -m pip install --upgrade pip' command.
2020-06-12 13:20:43 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/config/config_entries.py", line 112, in post
    return await super().post(request)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/data_entry_flow.py", line 73, in post
    "show_advanced_options": data["show_advanced_options"],
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/data_entry_flow.py", line 117, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 518, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 322, in async_process_deps_reqs
    hass, integration.domain
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/requirements.py", line 78, in async_get_integration_with_requirements
    hass, integration.domain, integration.requirements
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/requirements.py", line 130, in async_process_requirements
    raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for plugwise not found: ['Plugwise_Smile==0.2.13'].

According to the information in the log you need to install above packages, these are missing on your system.

I had not updated the HA plugin in Freenas (FreeBSD jail) in a while.
That update installed al the missing packages and the integration is running now.

Great news :+1:

A heads-up on what @CoMPaTech and I are working on: OPTIONS and zeroconf discovery.

In the Plugwise-beta integration there will be an additional “button”:


Clicking this OPTIONS-button will allow you to change the scan_interval for the integration.

Auto-discovery via zeroconf: the Smile(s) will be auto-detected, only the Plugwise-password(s) will need to be entered.

Coming soon to Plugwise-beta 0.3.

To follow up on the announcement of Plugwise-beta v0.3.0, we are looking for testers for this release.

Are you able and willing to manual edit a Core-file (homeassistant/generated/zeroconf.py) before installing this update, then you are what we are looking for!

When the testing is successful, we will roll out these updates into Core so all Plugwise users can enjoy the new functions.

Please respond in this topic if you can help in testing the v0.3.0-update.

Hi,
Think i’m able to help testing. What are the edits I should make?

FYI, three PR’s have been added to the HA Core github, implementing config_flow OPTIONS, Zeroconf discovery and updating the documentation.



For those interested: Plugwise-beta version 0.4.0 is available.

1 Like

Updated via HACS from 0.2.4 to 0.4.0 without any issue. Only wondering what the added notification binary_sensor is able to do. Thanks for the continous development!

Ok, great!

In case you didn’t notice, Plugwise-beta must now be set up via Configuration --> Integrations. Config via configuration.yaml is no longer supported.
Also, via the OPTIONS-button on the integration the default scan_interval can be changed.

About the latest feature added: we found out, a little by accident, that there sometimes is a notification present in the XML-data on the Smile: until now I’ve seen warning- and info-messages. This should correspond to a Notification in the Plugwise App. But I’ve never noticed these. Turns out the notifications disappear pretty quickly and also the Notifications in the Plugwise App, so easy to miss.

Now, with version 0.4.0, there will be HA Core Notifications that do not disappear until you dismiss them. And from the history of the binary_sensor you can see when the notifications appeared, if you are interested in this.
In practice, there will not be many notifications. I have an Adam controlling the pump of my floor heating, via a Plug configured as a pump-controller. Now, during summer, I irregularly see a message telling me that “the pump has not run for 24hrs so it is run for 2 minutes to avoid rust-forming in the pipes”.
Another one: when I remove a (standard) Plug there will appear a warning-notification after 20-30 mins.
Also, I would expect a notification when there has been a firmware update.

1 Like

Today our installation was due to be serviced (yearly) and therefore the boiler was of course disconnected shortly from my Plugwise Smile gateway. As expected using the latest version of this custom component a notification shows up in Home Assistant in the notification area, as well as in the history of the sensor. However dismissing the notification does not change the state of the sensor, so after a couple of seconds another notification pops up. Looking in the Smile gateway itself everything is working fine, it is able to communicate with the boiler and there is no notification (anymore) in the gateway itself anymore. Is there another workaround to change the state of the notification sensor that could be provided to users of this custom component. To be honest I haven’t tried restarting Home Assistant as this is a last resort to ‘fix’ things to my believe and I want to be able to understand what is going on / wrong(?).

BTW the year and installation date values were always ‘Unspecified’, so that is not the trigger for the notification and I also reperformed the Update boiler protocol.

Capture

Capture2

That is strange!

Can you look at this URL: http://<your-smile-ip>/core/domain_objects
You will need to enter your username (smile) and your smile-password.
In the XML-data that is shown, search for notification. Please let us know what you find.

There is no mention of ‘notification’ in the XML file:

Searching for the word ‘boiler’ in the same file does give results, but these results/values are not related to a issue / notification.

Ok, thanks.

If that is the case: no notification present, the binary_sensor.xyz_plugwise_notification should return to the OFF-state and then the HA Core Notification should be dismiss-able.

And that is not happening in your system, correct?

What is the HA Core version that you are running?
And which Plugwise-beta, which version are you on?

Based on what you describe I think you are not using the latest version, or maybe you are not using the latest Plugwise-Smile version. How did you install Plugwise-beta?

Home Assistant 0.113.2

Capture6

Sorry, I’ve modified my post above while you were answering :slight_smile:

Version 0.4.0 should work, which Plugwise-Smile version is shown in the Plugwise-beta file manifest.json?

Content of manifest.json:

{
  "domain": "plugwise-beta",
  "name": "Plugwise Beta for Home Assistant",
  "documentation": "https://github.com/plugwise/plugwise-beta",
  "requirements": ["Plugwise_Smile==1.1.2"],
  "codeowners": ["@CoMPaTech","@bouwew"],
  "config_flow": true,
  "zeroconf": ["_plugwise._tcp.local."]
}

I install Plugwise-beta through HACS as well as updating. I am running 0.4.0 as shown in the screenshot. The update to 0.4.1 doesn’t seem usefull for me (i.e. the auxiliary modulation level).

That is the correct version. Hmm, what’s going on…

Time to look at the debug-messages in the HA Core Logs.
Can you please enable debugging for plugwise-beta?
Write this in configuration.yaml:

logger:
  default: warn
  logs:
    custom_components.plugwise-beta: debug

And reboot HA.

After the reboot, if the binary_sensor still has the state ON, please look at the HA Core Logs and “Load the full Home Assistant Log”. Scrolling down, you will see many debug-messages from plugwise-beta. Search for the word “notification”. What does the debug-message with this word show?

Also, version 0.4.1 fixes also other icons that are not correctly displayed.
Like the icons for the Auxiliary Devices sensors, which you should have?