Plugwise2Py - Monitor and Control Plugwise Circles without Stretch

Plugwise-2-py

Homey app to connect plugwise circles via Plugwise-2-py. This tool, developed by Seven Watt, 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.

NEW: A much easier way of installing it on a rpi is by using Docker. See instructions here: Docker Hub

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. If you really like it you can buy me a beer, or coffee, or whatever you like :slight_smile:

Paypal donate

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

Version changelog: changelog.txt

1 Like

reserved for future use

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.

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

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: https://homey.app/a/com.gruijter.plugwise2py/test

Does the server work on a 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 :slight_smile:

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

1 Like

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

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

Let me know if it works for you or not!

1 Like

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
B) Raspberry Pi 4 SD card image: rpi4img

2 Likes

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

Thanks a lot Robin

1 Like

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

They are the same thing

1 Like

version 3.1.0 is pending approval Athom

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

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?

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.

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)

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.

@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?

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.

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.