Skip to content

Commit

Permalink
Merge pull request #1 from plugwise/initial
Browse files Browse the repository at this point in the history
Initial split
  • Loading branch information
bouwew authored Apr 21, 2023
2 parents dfbe457 + 409daaa commit 55424cf
Show file tree
Hide file tree
Showing 66 changed files with 827 additions and 6,410 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Versions from 0.4x

### 0.41x

- Release of standalone USB plugwise_usb-beta `custom_component`
- More formal Split between Networked and USB code
- Refactoring where necessary

## Versions from 0.30 and up

### NEW APR 2023 [0.34.10] Implement latest Core PR's
Expand Down
90 changes: 33 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# Plugwise custom_component (BETA)
# Plugwise USB/Stick custom_component (BETA)

:no_entry::no_entry::no_entry: If you are **not** using USB based Plugwise equipment or have no intention to beta-test our integration, please defer to the **supported** release of this integration **natively** available in [Home Assistant](https://www.home-assistant.io/integrations/plugwise/)! :no_entry::no_entry::no_entry:

:warning::warning::warning: Always **read** the [release notes](https://github.com/plugwise/plugwise-beta/releases) before upgrading, in case there are BREAKING changes! **Do note** the release title on alpha releases and only install them if specifically instructed by our team! :warning::warning::warning:
:warning::warning::warning: Always **read** the [release notes](https://github.com/plugwise/plugwise_usb-beta/releases) before upgrading, in case there are BREAKING changes! **Do note** the release title on alpha releases and only install them if specifically instructed by our team! :warning::warning::warning:

## About

A fully asynchronous approach to supporting Plugwise devices in Home-Assistant. This repository is **meant** for use of beta-testing. As of March 2021 we include testing against latest `dev` in Home-Assistant Core, the above batches should indicate compatibility and compliance.

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/plugwise)
[![Generic badge](https://img.shields.io/github/v/release/plugwise/plugwise-beta)](https://github.com/plugwise/plugwise-beta)
[![Generic badge](https://img.shields.io/github/v/release/plugwise/plugwise_usb-beta)](https://github.com/plugwise/plugwise_usb-beta)

[![HASSfest](https://github.com/plugwise/plugwise-beta/workflows/Validate%20with%20hassfest/badge.svg)](https://github.com/plugwise/plugwise-beta/actions)
[![HA-Core](https://github.com/plugwise/plugwise-beta/workflows/Test%20with%20HA-core/badge.svg)](https://github.com/plugwise/plugwise-beta/actions)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/plugwise/plugwise-beta/main.svg)](https://results.pre-commit.ci/latest/github/plugwise/plugwise-beta/main)
[![HASSfest](https://github.com/plugwise/plugwise_usb-beta/workflows/Validate%20with%20hassfest/badge.svg)](https://github.com/plugwise/plugwise_usb-beta/actions)
[![HA-Core](https://github.com/plugwise/plugwise_usb-beta/workflows/Test%20with%20HA-core/badge.svg)](https://github.com/plugwise/plugwise_usb-beta/actions)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/plugwise/plugwise_usb-beta/main.svg)](https://results.pre-commit.ci/latest/github/plugwise/plugwise_usb-beta/main)

[![CodeFactor](https://www.codefactor.io/repository/github/plugwise/plugwise-beta/badge)](https://www.codefactor.io/repository/github/plugwise/plugwise-beta)
[![CodeFactor](https://www.codefactor.io/repository/github/plugwise/plugwise_usb-beta/badge)](https://www.codefactor.io/repository/github/plugwise/plugwise_usb-beta)

Always first attempt to use the native [Home Assistant](https://www.home-assistant.io/integrations/plugwise/)-component using this button

Expand All @@ -25,17 +23,17 @@ If you don't mind a bug now and then and are interested in helping us test new f

## Required python module (status)

Our [`python-plugwise`](https://github.com/plugwise/python-plugwise) python module accompanies both the native and the `custom_component`. It's status is is:
Our [`python-plugwise-usb`](https://github.com/plugwise/python-plugwise-usb) python module accompanies both the native and the `custom_component`. It's status is is:

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/plugwise)
[![PyPI version fury.io](https://badge.fury.io/py/plugwise.svg)](https://pypi.python.org/pypi/plugwise/)

[![Latest release](https://github.com/plugwise/python-plugwise/workflows/Latest%20release/badge.svg)](https://github.com/plugwise/python-plugwise/actions)
[![Newest commit](https://github.com/plugwise/python-plugwise/workflows/Latest%20commit/badge.svg)](https://github.com/plugwise/python-plugwise/actions)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/plugwise/python-plugwise/main.svg)](https://results.pre-commit.ci/latest/github/plugwise/python-plugwise/main)
[![Latest release](https://github.com/plugwise/python-plugwise-usb/workflows/Latest%20release/badge.svg)](https://github.com/plugwise/python-plugwise-usb/actions)
[![Newest commit](https://github.com/plugwise/python-plugwise-usb/workflows/Latest%20commit/badge.svg)](https://github.com/plugwise/python-plugwise-usb/actions)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/plugwise/python-plugwise-usb/main.svg)](https://results.pre-commit.ci/latest/github/plugwise/python-plugwise-usb/main)

[![CodeFactor](https://www.codefactor.io/repository/github/plugwise/python-plugwise/badge)](https://www.codefactor.io/repository/github/plugwise/python-plugwise)
[![codecov](https://codecov.io/gh/plugwise/python-plugwise/branch/main/graph/badge.svg)](https://codecov.io/gh/plugwise/python-plugwise)
[![CodeFactor](https://www.codefactor.io/repository/github/plugwise/python-plugwise-usb/badge)](https://www.codefactor.io/repository/github/plugwise/python-plugwise-usb)
[![codecov](https://codecov.io/gh/plugwise/python-plugwise-usb/branch/main/graph/badge.svg)](https://codecov.io/gh/plugwise/python-plugwise-usb)

## Changelog

Expand All @@ -45,21 +43,18 @@ Our [Changelog](CHANGELOG.MD) is available as a [separate file](CHANGELOG.md) in

### What do we support (in short)?

- Thermostats
- Adam (firmware 2.x and 3.x) and the accompanying Lisa's, Tom's, Floor's, Koen's and Plugs.
- Anna (firmware 1.x, 3.x and 4.x)
- Notifications for both types
- Power-related
- Smile P1 (firmware 2.x, 3.x and 4.x)
- Stretch (firmware 2.x and 3.x, legacy Circle's and Stealth's)
- Stick (legacy Circle's, Stealth's and Scan's)

#### USB notes

Up to spring of 2023 the `custom_component` `plugwise-beta` [plugwise-beta](https://github.com/plugwise/plugwise-beta/) supported both Networked and USB Plugwise products, as of that time we have split both the backend (python module) and the frontend into separate instances as per recent discussion with the Core team. The `plugwise` integration in HA Core (and therefore `plugwise-beta`) will remain supporting networked Plugwise products under an envisioned `plugwise_bv` Brand umbrella. This paves the way for this repository as upcoming `plugwise_usb-beta` `custom_integration` to being refactored and again upstream to HA Core (which was originally planned but there was no branding umbrella in Core back then).

As such we ask USB users, who are tied in with the `custom_component` as there is no Core integration available yet, for a little patience so we can split and refactor all repositories without loss of functionality for the end users. For our USB users that will however mean some **breaking changes** or customizing under the hood as the `custom_component` name will change and the appropriate naming in HA will do so accordingly. It is for the best though as this will ensure a way forward to HA Core integration, which has been our goal since starting to write Plugwise supporting code for Home Assistant.

### What can I expect in HA Core from this component

- `binary_sensor` and `sensor`: A number of sensoric values depending on your hardware: outdoor temperature, Anna's illuminance, Tom's valve position, Plug's and Circle/Stealth's power-values, P1 power- and gas-values, Plugwise Notifications.
- `climate`: A (number of) thermostat(s) visible in HA, including temperature, presets and heating-demand status, per thermostat. Also, setting of temperature, preset and switching the active schedule on and off. Cooling is only supported in combination with an Anna (fw 3.1 and 4.0).
- `number`: Numerical indication on boiler setpoints.
- `select`: Input selector to choose the active schedule.
- `binary_sensor` and `sensor`: A number of sensoric values depending on your hardware: Plug's and Circle/Stealth's power-values.
- `switch`: The switch-parts of Plugs/Circles are available as switches, also switching them on/off is supported.

### How to install?
Expand All @@ -71,35 +66,16 @@ Our [Changelog](CHANGELOG.MD) is available as a [separate file](CHANGELOG.md) in

#### How to add the integration to HA Core

For each Plugwise Smile (i.e. gateway) you will have to add it as an integration. For instance if you have an Adam and a Smile P1, you have to add them individually. If you have an Anna and an Adam, **do not add the Anna**, only add the Adam.

- [ ] In Home Assistant click on `Configuration`
- [ ] Click on `Integrations`
- [ ] You should see one or more discovered Smiles
- [ ] Click the `Configure` button and enter the Smile ID
- [ ] Click Add to see the magic happens

If there is no discovered Smile present or you are using the USB stick:
If you are using the USB stick:

- [ ] Hit the `+` button in the right lower corner
- [ ] Search or browse for 'Plugwise beta' and click it
- [ ] Select the type of integration: Network or USB
- [ ] Search or browse for 'Plugwise USB' and click it

- For the Network-selection:
- [ ] Enter your Smile IP-address and the 8 character ID of the smile
- [ ] Click SUBMIT and FINISH and hopefully the magic happens
- [ ] Repeat this process to add more Smiles

- For the USB-selection:
- [ ] Select or enter the USB-path
- [ ] Click SUBMIT and FINISH

The config flow will then continue to ask you if you want to put your Smile and detected other devices in area's and presto, things should be available to configure in lovelace.

#### Options

Using the OPTIONS-button, the default Smile-data refresh-interval can be modified. There are no OPTIONS available for the Stick. The refresh interval of the devices connected to the Stick is automatically determined on the number of devices connecteda

## Frequently Asked Questions (FAQ)

### I don't like the name of the sensor or the icon
Expand All @@ -114,20 +90,18 @@ Please note that you can also click the cogwheel right top corner to rename all

If you notice issues please create an issue in the appropriate repository, while we are on Discord and on the [Community forums](https://community.home-assistant.io/t/plugwise-core-and-custom-component/236250) this is not where we are actively checking for support requests.

- [plugwise-beta](https://github.com/plugwise/plugwise-beta/issues/new/choose) - the beta `custom_component` for HA Core we use for testing (also required for USB as Plugwise USB support is not available in Home Assistant Core yet).
- [python-plugwise](https://github.com/plugwise/python-plugwise/issues/new/choose) - the python module interfacing with the plugwise Smile or USB-stick

### Why 'Smile'?

We use the term Smile for the 'device connected to your home network', called Smile P1 for their power-meter, Smile if you have an Anna or Adam.
- [plugwise_usb-beta](https://github.com/plugwise/plugwise_usb-beta/issues/new/choose) - the beta `custom_component` for HA Core we use for testing (also required for USB as Plugwise USB support is not available in Home Assistant Core yet).
- [python-plugwise-usb](https://github.com/plugwise/python-plugwise-usb/issues/new/choose) - the python module interfacing with the plugwise Smile or USB-stick

### Is it tested?

While we try to make sure that everything works as intended, we can't really test out changes happening to hardware devices. Our testing is done through testing against files from community members (see [python-plugwise tests](https://github.com/plugwise/python-plugwise/tree/main/tests)) and if you have a setup you are willing to share we highly welcome that. Just send us the files or submit a PR. Including your test code into the `tests/test_Smile.py` code is highly recommended.
Disclaimer: Not yet (fully)

While we try to make sure that everything works as intended, we can't really test out changes happening to hardware devices. Our testing is done through testing against files from community members (see [python-plugwise-usb tests](https://github.com/plugwise/python-plugwise-usb/tree/main/tests)) and if you have a setup you are willing to share we highly welcome that. Just send us the files or submit a PR. Including your test code into the `tests/test_Smile.py` code is highly recommended.

Ensuring our commits work `scripts/core-testing.sh` will create a local clone of the Home Assistant Core dev-branch to test against. For full visibility of tests run this as `DEBUG=1 scripts/core-testing.sh` (or export DEBUG to something other than none). `pytest` will show full log by default when tests are failing.

Results of our tests are checked by GitHub Actions against Home Assistant (dev-branch), click the button 'Test with HA-core' in this repository or the 'Latest release'/'Latest commit' buttons on our [python-plugwise repository](https://github.com/plugwise/python-plugwise/).
Results of our tests are checked by GitHub Actions against Home Assistant (dev-branch), click the button 'Test with HA-core' in this repository or the 'Latest release'/'Latest commit' buttons on our [python-plugwise-usb repository](https://github.com/plugwise/python-plugwise-usb/).

### There is Plugwise / used to be Anna support in HA Core already?

Expand All @@ -139,8 +113,10 @@ As things like async were in high demand from HA Core, desired by the original a

With the three combined forces we now support, maintain and improve on:

- `plugwise-beta` (this repository) for beta-testing new features to go into the `plugwise`-integration for HA
- [`python-plugwise`](https://github.com/plugwise/python-plugwise) for connecting to Plugwise products
- [`progress`](https://github.com/plugwise/progress) showing what are the differences between HA-core and this `custom_component` on [our progress page](https://plugwise.github.io/progress/)
- `plugwise-beta` (the network devices repository) for beta-testing new features to go into the Core `plugwise`-integration for HA
- [`python-plugwise`](https://github.com/plugwise/python-plugwise-usb) for connecting to Networked Plugwise products
- `plugwise_usb-beta` (this repository) for beta-testing new features to eventually go upstream to Core into the `plugwise_usb`-integration for HA
- [`python-plugwise-usb`](https://github.com/plugwise/python-plugwise-usb) for connecting to Plugwise products via USB
- [`progress`](https://github.com/plugwise/progress) showing what are the differences between HA-core and the network `custom_component` on [our progress page](https://plugwise.github.io/progress/) (marked as todo for this repo as well)

And yes anna-ha with haanna (to some degree) support Anna v1.8 - but they don't support Adam nor the Smile P1.
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ As spare-time/free-time developers we support this custom_component as best
as we can. We will support released versions as old as the module version
included in the `manifest.json` of the current and previous releases of
[Home Assistant Core](https://github.com/home-assistant/core) and/or
[`plugwise-beta`](https://github.com/plugwise/plugwise-beta)
[`plugwise_usb-beta`](https://github.com/plugwise/plugwise_usb-beta)
(whichever used release is the oldest).

## Reporting a Vulnerability
Expand All @@ -18,7 +18,7 @@ github aliases for quicker response, but always file an issue so other
users are also informed.

(Security) fixes will always be pre-released and released through
[`plugwise-beta`](https://github.com/plugwise/plugwise-beta) for
[`plugwise_usb-beta`](https://github.com/plugwise/plugwis_usbe-beta) for
testing. A PR to HA Core will follow either in parallel or as soon as
possible.

Expand Down
73 changes: 0 additions & 73 deletions archive/TESTS.md

This file was deleted.

27 changes: 0 additions & 27 deletions custom_components/plugwise/__init__.py

This file was deleted.

Loading

0 comments on commit 55424cf

Please sign in to comment.