# Plugwise binding

**URL:** <https://community.openhab.org/t/plugwise-binding/23226>\
**Category:** Bindings\
**Tags:** openhab2, binding, plugwise\
**Created:** [February 17, 2017, 10:33pm UTC](https://community.openhab.org/t/plugwise-binding/23226 "2017-02-17T22:33:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 17, 2017, 10:33pm UTC](https://community.openhab.org/t/plugwise-binding/23226/1 "2017-02-17T22:33:36Z")

</div>

Today I’ve submitted PR [#1907](https://github.com/openhab/openhab2-addons/pull/1907) which adds a native openHAB 2 Plugwise binding (see also issue [#1835](https://github.com/openhab/openhab2-addons/issues/1835)).

Almost all of the original OH1 behavior is still there, as well as the following new OH2 specific functionality:

- Device discovery
- Device configuration parameters
- Configurable channel update intervals using channel configurations
- Proper online, offline Thing status behavior
- The Stick is implemented as a Bridge, which allows for using multiple Sticks at the same time
- i18n support with English and Dutch translations
- Properties that include device hardware and firmware versions

If you want to help testing it, proceed as follows:

1. Stop any installed OH1 Plugwise binding (e.g. by uninstalling it, or stopping it at the openHAB console)
2. Install the “Serial Binding” when it is not installed (via Paper UI, Addons, Bindings)
3. Download the new OH2 Plugwise binding: [org.openhab.binding.plugwise-2.1.0-SNAPSHOT.jar](http://www.maindrain.net/iot-marketplace/org.openhab.binding.plugwise-2.1.0-SNAPSHOT.jar)
4. Add this binding JAR file to your openHAB `addons` directory
5. Open Paper UI and navigate to the “Inbox” page
6. Click on the “+” button to add a new Thing
7. Choose to add a “Plugwise Binding” Thing
8. Choose to add a “Plugwise Stick” Thing
9. Update the “Serial port” configuration parameter (if necessary)
10. Finally click the “Add” check mark to add the Stick

This should start the automatic Thing discovery and your Plugwise devices should now automatically appear in the “Inbox”.

For more information, see also the updated [binding documentation](https://github.com/wborn/openhab2-addons/blob/32bb01f95849655e5578e3573c31cac3d00ab965/addons/binding/org.openhab.binding.plugwise/README.md).

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 17, 2017, 10:38pm UTC](https://community.openhab.org/t/plugwise-binding/23226/2 "2017-02-17T22:38:42Z")

</div>

@gert_konemann, @j.hoekstra, @frederic, @Awacs2000  
Perhaps you may also be interested in testing the new native openHAB 2 Plugwise binding?

---

<div class="post-metadata">

**Author:** ![gert\_konemann](https://community.openhab.org/user_avatar/community.openhab.org/gert_konemann/32/43255_2.png) [@gert\_konemann](https://community.openhab.org/u/gert_konemann)\
**Post date:** [February 17, 2017, 11:21pm UTC](https://community.openhab.org/t/plugwise-binding/23226/3 "2017-02-17T23:21:27Z")

</div>

Yes, I am interested, but have not much time. So it can take some time  
before you gey my feedback.

Gert Könemann.

Op 17 feb. 2017 11:43 p.m. schreef “Wouter Born” \<[bot@community.openhab.org](mailto:bot@community.openhab.org)

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 17, 2017, 11:24pm UTC](https://community.openhab.org/t/plugwise-binding/23226/4 "2017-02-17T23:24:37Z")

</div>

Thanks Gert! Any feedback at any moment in time is welcome. 🙂

---

<div class="post-metadata">

**Author:** ![Max1968](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Max1968](https://community.openhab.org/u/Max1968)\
**Post date:** [February 18, 2017, 7:56am UTC](https://community.openhab.org/t/plugwise-binding/23226/5 "2017-02-18T07:56:39Z")

</div>

i’ll give it a try too… I have about 25 of those plugs, but were having issues in the past, so replaced them with Fibaro plugs… And just recently i was thinking to buy more Fibaros and finally sell those plugwise ones which I have lying here for abut a year now, but perhaps your binding works better for me than the OH1 one 🙂 I’m not sure yet i will stick with them even if it works, as meanwhile i have a huge zwave network and also plenty of hue stuff, and it might be more reasonable to extend these then add yet another network. Too sad plugwise cant be convinced to make their devices “real” zigbee with a firmware update…

In your original collection of ideas i read you also want to be able to retrieve historic data, is that working already ?

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 18, 2017, 9:42am UTC](https://community.openhab.org/t/plugwise-binding/23226/6 "2017-02-18T09:42:09Z")

</div>

> [@Max1968](#):
>
> I have about 25 of those plugs, but were having issues in the past, so replaced them with Fibaro plugs

I once also thought about replacing all the Plugwise hardware for an easy fix. The Fibaro plugs are a good alternative and they are a bit more compact too. However, I took up the software challenge and it now works pretty well for me.

> [@Max1968](#):
>
> And just recently i was thinking to buy more Fibaros and finally sell those plugwise ones which I have lying here for abut a year now, but perhaps your binding works better for me than the OH1 one 🙂

With a good stable OH2 binding they will be worth more. 😉

> [@Max1968](#):
>
> Too sad plugwise cant be convinced to make their devices “real” zigbee with a firmware update…

It seems they are busy with targeting regular consumers and not the Home Automation community. Product diversification with air conditioning and smart thermostats seems also on top of their list. Their older portfolio seems to suffer from this. IIRC the Circles were introduced in a time where Zigbee was all the hype and only a handful of ZWave products existed. I can imagine a lot of their code needs to be rewritten would they ever switch protocols.

> [@Max1968](#):
>
> In your original collection of ideas i read you also want to be able to retrieve historic data, is that working already ?

Only the last hour energy value is currently retrieved from the historic data entries (like in the OH1 binding). It’s an easy code change to retrieve all available log entries and dump them to something like a CSV file. I use it this way myself for validation and retrieving entries I’ve missed when my openHAB instance was down for some reason.

Using a CSV file or creating a mechanism to retrieve the data via channels is not the most elegant solution. So I’ll be looking into if it can be done by implementing a persistence service.

---

<div class="post-metadata">

**Author:** ![j.hoekstra](https://community.openhab.org/user_avatar/community.openhab.org/j.hoekstra/32/104094_2.png) [@j.hoekstra](https://community.openhab.org/u/j.hoekstra)\
**Post date:** [February 18, 2017, 9:46pm UTC](https://community.openhab.org/t/plugwise-binding/23226/7 "2017-02-18T21:46:15Z")

</div>

Surely interested!  
I was planning how to move to the OH2 style of defining things, this will certainly help.  
I really like to thank you for the plugin, it makes these plugs really worthwhile (they’ve been super reliable and been doing their job for years).

I’ll report back in the next week or so.

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 19, 2017, 8:56am UTC](https://community.openhab.org/t/plugwise-binding/23226/8 "2017-02-19T08:56:05Z")

</div>

> [@j.hoekstra](#):
>
> I’ll report back in the next week or so.

That would be great!

Perhaps @bryeng and @frederic also want to help testing the new openHAB 2 native Plugwise binding?

---

<div class="post-metadata">

**Author:** ![Max1968](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Max1968](https://community.openhab.org/u/Max1968)\
**Post date:** [February 25, 2017, 4:07pm UTC](https://community.openhab.org/t/plugwise-binding/23226/9 "2017-02-25T16:07:33Z")

</div>

I just tried to install the binding, but stuck it seems.

I downloaded the jar file, moved it to the addons folder, changed ownership to openhab:openhab and permissions to 644. After a restart of openhab (before I didnt see anything in the logs i think) I get the following:

```
2017-02-25 17:05:05.766 [ERROR] [org.openhab.binding.plugwise] - FrameworkEvent ERROR - org.openhab.binding.plugwise
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.plugwise [215]
  Unresolved requirement: Import-Package: gnu.io

        at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]

```

---

<div class="post-metadata">

**Author:** ![Max1968](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Max1968](https://community.openhab.org/u/Max1968)\
**Post date:** [February 25, 2017, 5:46pm UTC](https://community.openhab.org/t/plugwise-binding/23226/10 "2017-02-25T17:46:48Z")

</div>

added the zwave binding as well, this solved this dependency… so far the binding is working fine, but i’m not sure yet if and how i will continue to use my plugwise devices…

---

<div class="post-metadata">

**Author:** ![Max1968](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/e47774/32.png) [@Max1968](https://community.openhab.org/u/Max1968)\
**Post date:** [February 25, 2017, 5:54pm UTC](https://community.openhab.org/t/plugwise-binding/23226/11 "2017-02-25T17:54:40Z")

</div>

@wborn from the binding description, what exactly does this mean:

> Furthermore the following openHAB 2 functionality has been added:
> 
> - The Stick is implemented as a Bridge, which allows for using multiple Sticks at the same time

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 25, 2017, 6:12pm UTC](https://community.openhab.org/t/plugwise-binding/23226/12 "2017-02-25T18:12:13Z")

</div>

Thanks for helping out with testing @Max1968.

> [@Max1968](#):
>
> added the zwave binding as well, this solved this dependency

The Plugwise Binding also needs to have the Serial Binding installed which provides ‘[gnu.io](http://gnu.io)’. So that is what caused the exception. The Z-Wave Binding probably also depends on it, so that is why it got fixed. I’ll add it to the opening post.

> [@Max1968](#):
>
> @wborn from the binding description, what exactly does this mean:
> 
> Furthermore the following openHAB 2 functionality has been added:\* The Stick is implemented as a Bridge, which allows for using multiple Sticks at the same time

In the OH1 binding you could only use one Plugwise Stick (and Plugwise ZigBee network). You could also configure only one serial port. Because in the OH2 binding the Stick is implemented as a Bridge Thing, you can connect multiple Plugwise Sticks to your computer and use them all at the same time. I don’t think there will be many users of this functionality though. 😉

---

<div class="post-metadata">

**Author:** ![Nixo76](https://community.openhab.org/letter_avatar_proxy/v4/letter/n/b9bd4f/32.png) [@Nixo76](https://community.openhab.org/u/Nixo76)\
**Post date:** [February 26, 2017, 10:01am UTC](https://community.openhab.org/t/plugwise-binding/23226/13 "2017-02-26T10:01:04Z")

</div>

hey,

great work with the add-on. I’ve a still a problem to get it running.  
I use openhab on a raspberry pi 2 with the zwavemee adapter at the io pins. when i add the plugwise stick as a thing the system told me that /dev/ttyUSB0 is not available, but /dev/ttyAMA0 (which is the zwave adapter): Serial port ‘/dev/ttyUSB0’ could not be found. Available ports are: /dev/ttyAMA0

i’ve installed the serial binding but without success. Do you have any idea what i can test now?

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 26, 2017, 10:18am UTC](https://community.openhab.org/t/plugwise-binding/23226/14 "2017-02-26T10:18:53Z")

</div>

@Nixo76  
Did you also follow the Linux specific instructions in the [binding documentation](https://github.com/wborn/openhab2-addons/blob/d4b1c7596023ad644c0a1c79dadcf4f4efa97861/addons/binding/org.openhab.binding.plugwise/README.md#stick)?

Does `lsusb` show the Stick? The following device in the command output shows that the Stick is detected:

```auto
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

```

Does the standard (OH1) Plugwise Binding work for you? You might need to uninstall it when it is already activated. This is part of Step 1. of the [opening post](https://community.openhab.org/t/plugwise-binding/23226). 🙂

When I first started using a Raspberry Pi it only detected the Stick after a restart.

---

<div class="post-metadata">

**Author:** ![Nixo76](https://community.openhab.org/letter_avatar_proxy/v4/letter/n/b9bd4f/32.png) [@Nixo76](https://community.openhab.org/u/Nixo76)\
**Post date:** [February 26, 2017, 10:53am UTC](https://community.openhab.org/t/plugwise-binding/23226/15 "2017-02-26T10:53:02Z")

</div>

Thanks for the fast response!  
I’ve found a solution!

i had to extend the java\_opts. there was only the AMA0 so i have to add the USB0 as well:

edit nano /usr/share/openhab2/start.sh  
export EXTRA\_JAVA\_OPTS=-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0:/dev/ttyUSB0

edit:  
everything seems to work now! great work!

---

<div class="post-metadata">

**Author:** ![Ruben](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@Ruben](https://community.openhab.org/u/Ruben)\
**Post date:** [February 26, 2017, 6:26pm UTC](https://community.openhab.org/t/plugwise-binding/23226/16 "2017-02-26T18:26:43Z")

</div>

I am loving this, i had a few of these.  
Never used them until now, i installed like the description. working perfectly so far!

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 26, 2017, 7:39pm UTC](https://community.openhab.org/t/plugwise-binding/23226/17 "2017-02-26T19:39:50Z")

</div>

Thanks for the positive feedback @Nixo76, @Ruben! 🙂 It’s nice to know things also work well with others.

---

<div class="post-metadata">

**Author:** ![Ruben](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@Ruben](https://community.openhab.org/u/Ruben)\
**Post date:** [February 26, 2017, 9:01pm UTC](https://community.openhab.org/t/plugwise-binding/23226/18 "2017-02-26T21:01:34Z")

</div>

I have 2 starter kits, one seems to work fine, but when i take a circle from the second kit and add it to the network it does not seem to be detected. If i enter it manually it does not show online either, any ideas? i did notice when i added the MAC manually it shows only the last few digits in the overview, maybe its a bug or maybe it does not mean anything i dont know.

---

<div class="post-metadata">

**Author:** ![wborn](https://community.openhab.org/user_avatar/community.openhab.org/wborn/32/55946_2.png) [@wborn](https://community.openhab.org/u/wborn)\
**Post date:** [February 26, 2017, 11:05pm UTC](https://community.openhab.org/t/plugwise-binding/23226/19 "2017-02-26T23:05:38Z")

</div>

When Circles were already part of a network (the starterkit) you might need to be reset them before you can add them to another network (the other starterkit).

See also the [Plugwise FAQ](https://www.plugwise.com/faq):

- How can I reset my Circle+ or Circle? / Hoe reset ik mijn Circle+ of Circle?

For adding Circles to a network the Source should be used. I can also imagine it is not possible to have a network that has two Circle+ plugs.

---

<div class="post-metadata">

**Author:** ![j.hoekstra](https://community.openhab.org/user_avatar/community.openhab.org/j.hoekstra/32/104094_2.png) [@j.hoekstra](https://community.openhab.org/u/j.hoekstra)\
**Post date:** [March 5, 2017, 3:04pm UTC](https://community.openhab.org/t/plugwise-binding/23226/21 "2017-03-05T15:04:06Z")

</div>

I’ve been using the new binding a little more than a week now, and it works nicely.  
A couple of things I do notice:

- When updating openhab, I need to restart openhab to have it recognize the plugwise things again.
- I’ve defined things in a things file like in the manual (which is excellent btw) and still openhab puts the circles in the inbox as new items.

Other than that, it’s rockstable as it was with the old binding.

[Next page](https://community.openhab.org/t/plugwise-binding/23226.md?page=2)
