# \[APP\]\[PRO\] Plugwise2Py - Monitor and Control Plugwise Circles without Stretch

**URL:** <https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635>\
**Category:** Apps\
**Tags:** app, zigbee\
**Created:** [March 15, 2019, 10:32pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635 "2019-03-15T22:32:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 15, 2019, 10:32pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/1 "2019-03-15T22:32:05Z")

</div>

> **[Plugwise2py | Homey](https://homey.app/en-us/app/com.gruijter.plugwise2py/Plugwise2py/)**
>
> monitor and control plugwise circles via Plugwise2py

 ![2019-03-15](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/b/b23f3d1b8a385095b72f691501b21f8fdd8f74e6.jpeg)

# Plugwise-2-py

Homey app to connect plugwise circles via [Plugwise-2-py](https://github.com/SevenW/Plugwise-2-py). This tool, developed by [Seven Watt](https://github.com/SevenW), can be used as an alternative for Plugwise Source. It runs on all devices that support python, such as your NAS or a raspberry pi.

### Homey functionality

Device Card in browser and on mobile app:

- Switch on or off
- See real-time power usage (Watts, 8 seconds average)
- See total power meter of circle (kWh)

Insights:

- Switched on or off
- Power usage (W, production is negative Watts)
- Power meter (kWh)

Trigger Flow Cards:

- Switched on or off
- Power usage change
- Power meter change

Condition Flow Cards:

- Switched on or off

Action Flow Cards:

- Switch on or off
- Toggle on or off

### Setting up the PW2PY server

A manual for setting it up on a rpi is provided on [Plugwise-2-py](https://github.com/SevenW/Plugwise-2-py).

NEW: A much easier way of installing it on a rpi is by using Docker. See instructions here: [gruijter/plugwise-2-py - Docker Image](https://hub.docker.com/r/gruijter/plugwise-2-py)

To make it work properly with Homey you must do some base settings within PW2PY:

- Enable 10-seconds monitoring: this should be enabled
- Enable logging form Circle internal metering buffers: this should be enabled
- Log interval: I advise to set this to 60 minutes
- Schedules: can be used to switch a circle to powersaving mode automatically
- Always on: enable this for circles that must not be switchable from Homey
- Production: enable this for circles that measure production (e.g. solar panel)

### Setting up Homey

After setting up PW2PY you can configure Homey to connect to it. Go to the app settings screen and enter the IP address of the PW2PY-MQTT server that you are using. Circles can then be added through the Devices tab of Homey. After pairing a circle you can set the polling interval per circle in the device settings (minimum 10 seconds).

##### Donate:

If you like the app you can show your appreciation by posting it in the [forum](https://forum.athom.com/discussion/1998). If you really like it you can buy me a beer, or coffee, or whatever you like 🙂

[![Paypal donate](https://us1.discourse-cdn.com/flex025/uploads/athom/original/1X/59f7c705afb5f5f8fe3a9fb29a4a3f85b51c2cc1.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VLB7J3MQLVT2G)

===============================================================================

Version changelog: [changelog.txt](https://github.com/gruijter/com.gruijter.plugwise2py/blob/master/changelog.txt)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 15, 2019, 10:32pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/2 "2019-03-15T22:32:22Z")

</div>

reserved for future use

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 15, 2019, 10:33pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/3 "2019-03-15T22:33:24Z")

</div>

App version 2.0.6 was just uploaded to the appstore and is pending approval. It adds optimized settings page for Homey V2 on a mobile device.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [April 30, 2019, 12:25pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/4 "2019-04-30T12:25:24Z")

</div>

App version 2.0.7 was just released in the appstore. It fixes a problem with saving the mqtt settings.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [April 3, 2020, 6:12pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/5 "2020-04-03T18:12:09Z")

</div>

Dear Plugwise2Py community.

I have updated the app to version 3.0.0

- MQTT client upgrade to v3.0.0. (faster, better, more secure)
- Added secure MQTT TLS support.
- Added Plugwise2Py server issue detection

Available now already as test version: [Plugwise2py App for Homey | Homey](https://homey.app/a/com.gruijter.plugwise2py/test)

---

<div class="post-metadata">

**Author:** ![Dirk\_Buekenhoudt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirk_buekenhoudt/32/4116_2.png) [@Dirk\_Buekenhoudt](https://community.homey.app/u/Dirk_Buekenhoudt)\
**Post date:** [May 3, 2020, 1:54pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/6 "2020-05-03T13:54:09Z")

</div>

Does the server work on a synology 210j?

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [May 3, 2020, 2:00pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/7 "2020-05-03T14:00:03Z")

</div>

> [@Dirk\_Buekenhoudt](#):
>
> synology 210j

Possibly. It does support Python and has a USB port according to google. So it should be possible. I can not give you any support on how to install or configure it though. If you are up for a challenge, try it and let us know 🙂

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [January 12, 2021, 5:41pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/8 "2021-01-12T17:41:18Z")

</div>

Great news for all people that have found that installing Plugwise-2-py is too difficult. I have created a docker image that significantly reduces the time and complexity.

If you know how to start-up a raspberry pi and know how to copy-paste some commands you can probably make it work within 15-30 minutes. If you already know docker, you can make it work in a few minutes.

See instructions here: [Docker Hub](https://hub.docker.com/r/gruijter/plugwise-2-py)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [February 14, 2021, 11:55am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/9 "2021-02-14T11:55:32Z")

</div>

Based on feedback from one of the users I have updated the readme of the docker installation:

[https://hub.docker.com/r/gruijter/plugwise-2-py](https://hub.docker.com/r/gruijter/plugwise-2-py)

It should now be more clear on how to make this work.

Let me know if it works for you or not!

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [February 23, 2021, 11:26am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/10 "2021-02-23T11:26:49Z")

</div>

Additionally to the docker image, I have now also created a full image that can be used to create a SD card for a raspberry pi.

Plugwise has stopped supporting the old circles and the stretch hub. Throwing everything away is not needed. You can give your circles a second life and keep using them with Homey.

If you own (lots of) circles with a Plugwise USB stick, or a stretch (which has the USB stick inside), just follow the instructions of option A or B:

A) Docker image (32bit ARMV7): [Docker Hub](https://hub.docker.com/r/gruijter/plugwise-2-py)  
B) Raspberry Pi 4 SD card image: [rpi4img](https://github.com/gruijter/PW2PY_DOCKER/tree/main/rpi4img)

---

<div class="post-metadata">

**Author:** ![dcj](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dcj/32/35530_2.png) [@dcj](https://community.homey.app/u/dcj)\
**Post date:** [February 23, 2021, 12:35pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/11 "2021-02-23T12:35:03Z")

</div>

Great job done by @Gruijter

My 30 old Plugwise circles are now connected with Homey through his Plugwise2Py App.  
System is stable and works very well.!

[Plugwise2Py|230x500](https://community.homey.app/uploads/short-url/xuP1nXRZ26H50iXRMJhTnhC3Qwp.jpeg)

Thanks a lot Robin

---

<div class="post-metadata">

**Author:** ![bvdbos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bvdbos/32/2352_2.png) [@bvdbos](https://community.homey.app/u/bvdbos)\
**Post date:** [March 14, 2021, 9:36am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/12 "2021-03-14T09:36:57Z")

</div>

For the SD card image, does one need a RPi 4 or a RPi 4B ?

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 14, 2021, 10:08am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/13 "2021-03-14T10:08:20Z")

</div>

> [@bvdbos](#):
>
> RPi 4 or a RPi 4B

They are the same thing

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [August 28, 2021, 2:13pm UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/14 "2021-08-28T14:13:01Z")

</div>

version 3.1.0 is pending approval Athom

- MQTT upgrade v4.2.8.
- Improved logs.
- Added brand color.

---

<div class="post-metadata">

**Author:** ![Michel\_Vorenhout](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michel_vorenhout/32/48286_2.png) [@Michel\_Vorenhout](https://community.homey.app/u/Michel_Vorenhout)\
**Post date:** [May 9, 2022, 3:52am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/15 "2022-05-09T03:52:34Z")

</div>

Using the PI4 image. I have the circles working and can connect to Homey. Old data was downloaded from the Circles, as shown from the tail/log option. But I don’t seem to find the logs for the data.  
Any clue as to look where?

---

<div class="post-metadata">

**Author:** ![Andyh747](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andyh747/32/56728_2.png) [@Andyh747](https://community.homey.app/u/Andyh747)\
**Post date:** [August 28, 2022, 9:23am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/16 "2022-08-28T09:23:20Z")

</div>

I have a number of the old Circles and a Stretch 2. I’m looking to extract the data stored since Plugwise stopped supporting the Stretch and took its server offline.  
This looks like the perfect option for this and I have a RPi so can use the SD Card image to install.

My first concern is making sure I do this correctly. I understand the USB stick is inside the Stretch. Do I simply remove this and insert into the RPi?  
My second concern is what the poster above mentions regarding seeing the old data. How do people view this data and see the usage over time like you could in the original Plugwise app? Is there an easy way to have this data shown?

Thanks for any pointers.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [August 28, 2022, 9:31am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/17 "2022-08-28T09:31:59Z")

</div>

> [@Andyh747](#):
>
> understand the USB stick is inside the Stretch. Do I simply remove this and insert into the RPi?

Yes, as far as I know. I didnt have the stretch myself, but an external usb stick. But I do believe that the stretch has the usb plug internally (without the usb case)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [August 28, 2022, 9:33am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/18 "2022-08-28T09:33:46Z")

</div>

> [@Andyh747](#):
>
> How do people view this data and see the usage over time like you could in the original Plugwise app? Is there an easy way to have this data shown?

Yes. I created a second app for that called Power By the Hour. It collects the historic data of each device that you add to it, and also shows you how much money is involved.

Edit: but historic data before adding the circles to Homey are lost. So you need to backup that somehow before migration to Homey.

---

<div class="post-metadata">

**Author:** ![Andyh747](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andyh747/32/56728_2.png) [@Andyh747](https://community.homey.app/u/Andyh747)\
**Post date:** [August 28, 2022, 9:40am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/19 "2022-08-28T09:40:47Z")

</div>

@Gruijter many thanks for the quick reply. I’ll open the Stretch up and have a look.

When you mention backing up the data before migration to Homey, is that easily achieved through the RPi interface once setup? Looking at the information there is a web interface for control of the Circles etc but is there a way from there to backup the historic data once P2PY has downloaded it from each Circle?

Also I’ve just checked the version of RPi I have and it’s a 3B not 4. Any ideas if it will run on a RPi 3?

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [August 28, 2022, 9:47am UTC](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635/20 "2022-08-28T09:47:11Z")

</div>

> [@Andyh747](#):
>
> is there a way from there to backup the historic data once P2PY has downloaded it from each Circle?

Pw2py keeps logs on the rpi. But im not sure if you can use that. If you cannot backup the data while connected to the stretch consider the data to be lost.

> [@Andyh747](#):
>
> will run on a RPi 3?

Not with the SD image I created. It does run on an rpi3 using the docker container, or by doing a manual install as instructed on the github site from SevenW.

[Next page](https://community.homey.app/t/app-pro-plugwise2py-monitor-and-control-plugwise-circles-without-stretch/10635.md?page=2)
