Plugwise binding

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

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.

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:

  • 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.

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.

Do you mean with updating openHAB editing/saving .thing files?

Yes that is a known issue. Eclipse SmartHome does not provide an interface to easily find custom named devices. You can use one of the following workarounds for this:

  • In the “Inbox” click the ignore button on the discovered items. The ignore button is the eye with a backslash.
  • Use as thing ID the full uppercase MAC. This way the discovery service has a way to find the items you defined in .thing files.

Another way to resolve this could be by enabling/disabling background discovery for the Plugwise binding with the smarthome:discovery command. But some binding code changes need to be made for this to work.

A new version of the binding is now available with the following additional functionality/bugfixes:

  • New configuration parameters for all devices, for a complete list see the Thing Configuration section in the documentation.
  • Because the energy measurment interval is now configurable via a parameter, the lasthour and lasthourstamp channels have been renamed to energy and energystamp.
  • The offline/online behavior of the Stick has been improved, exceptions are no longer thrown and it will retry to communicate with the Stick instead of being offline forever. I’ve also seen it recover from unplugging the Stick and reinserting it.
  • The binding automatically detects Sticks once every 3 minutes.

The opening post contains the updated URLs to the most recent binding JAR and documentation.


People using the previous test JAR (downloaded before March 8th, 2017) should do the following to upgrade:

  1. Remove/deinstall the old binding and JAR
  2. Download/install the new binding JAR
  3. When the new device configuration parameters are missing from your existing Plugwise Things, remove these Plugwise Things and readd them.
  4. Update your .items files so the lasthour and lasthourstamp channels are replaced with energy and energystamp.

On recent builds of openHAB 2.1.0-SNAPSHOT (#828 or higher) you can also install the updated binding via the new IoT Marketplace.

https://marketplace.eclipse.org/content/plugwise-binding

I’ve made a new JAR (2.1.0.201703290000) that fixes some minor issues like exceptions and the serial port not properly being set during Stick discovery. It should also optimize the number of messages being sent when the binding is started. It can again be downloaded from the opening post or using the IoT marketplace.

I ran into this myself now when using a .things file with openHAB 2.0.0. It looks like this issue is fixed in recent 2.1.0-SNAPSHOT builds of openHAB. It was fixed by ESH PR #3088.

Running openhab2 on a raspberry pi (2) with an official plugwise stick. I am trying to have it connect to my plugwise stealth which used to be connected to the plugwise stretch which has died on me a while ago.

I like to do things by hand so i copied over most of the example configuration (taking “Fridge” and replacing it with “Solar”. However my stick seems to have trouble getting initialized. I get no errors in my log file but if i load up paper UI and go to config --> things i see that my stick is stuck on “initializing”. I have verified with dmesg that it is bound to /dev/ttyUSB0 so i’m at a loss at what it could be. I have the serial binding also installed.

I am at a loss as to why it will not initialize. :frowning:

Did you also add the user running openHAB to the dialout group so it has permission to access the serial port? When you use openHABian than the permission should already be done. On Raspbian you’ll need to do this manually, e.g. with: sudo adduser pi dialout

Was the Stick also used with that Stealth? If not you will need to factory reset the devices and setup a network with Source (which requires a valid license). Migrating back from the Stretch to the Stick is a scenario that I have not tested. Other people might also be interested in knowing if it works and how to get it working. :slight_smile:

Increasing the Plugwise Binding log level may also give some clues about what is going on:
log:set trace org.openhab.binding.plugwise

Then check the logging with: log:tail
And exit the logging with CTRL+C

Afterwards you can reduce the log level again with:
log:set info org.openhab.binding.plugwise

I’ve tried plugwise-2py and it also seems to get a timeout while trying to connect to /dev/ttyUSB0. It’s very weird. I checked groups for the users that i tried to connect from and they’re all in the dialout group.

my stealth used to be in the network with my stretch, but the problem right now seems to be getting commands going at all over the plugwise stick. I bought it brand new so i’m not sure if it should be configured somehow or if i have to use source then. I can’t seem to find people with similar problems. I’ll specifically try to search for that myself and see what i can do about it.

Any problem doesn’t seem to be related to your binding is as much as it has something to do with the communication. I will try to use the specific trace level on the binding itself see if it gives me anything useful.

The group permissions are only applied when the user logs out/in again. So if you haven’t done that it is also worth a try.

When it was part of a Home Start pack I would also check if it works with Source on Windows. There should also be a license for Source in that pack.

Plugwise Source also works when you run Windows in a Virtual Machine. But it may be a bit tricky to route your Stick to the VM if you haven’t done this before. I usually run Source on Ubuntu in a Windows 10 VM using KVM. :slight_smile:

Thanks for your help. I seem to be at a bit of a fork in the road. I got the plugwise stretch + stealth when my solar panels were installed. I never bought home start or any additional plugwise component. My stretch is broken and outside of warranty and i don’t really want a replacement Stretch. All i want to do is read my solar panels so i thought simply buying a stick would be enough.

I have tried connecting the plugwise to my pc (ubuntu) and run plugwise2py. It seems to at least not crash but gets stuck on an arbitrary error that i am unsure is a problem with the communication of my pc to the stick or maybe the stick is just out of range of the stealth, or something else is amiss.

So unfortunately I don’t have a Plugwise Source license. I could send back the plugwise stick i bought and buy the home start set that includes a stick as well but it’s a bit of a steep price. Alternatively i can have a bluetooth dongle built into my inverter for that exact same price and be done with plugwise stuff.

Thanks for your help so far, i don’t want to derail this topic into something it’s not.

I think sending it back would be the better option especially since you don’t use any other Plugwise modules. The Stealth is probably a Stealth+ (grey back) which may give issues because it is not standard to use with a Stick. Usually a Circle+ is used and I don’t think using a Circle+ and Stealth+ in the same network is possible.

Today the new openHAB 2 Plugwise Binding got merged into the openHAB source tree. :slight_smile: :tada:

This means it will soon be part of the openHAB 2.2.0-SNAPSHOT nightly builds. The old openHAB 1 binding will still be available as a legacy binding.

Wouter, I installed the 2.3.0 SNAPSHOT from december 26. I did not use Openhab2 since more than a year. The Plugwise binding is much improved since than. Thank you very much for that. Autodiscovery prevents trivial errors, but I still need some help. I have 19 circles, which are functioning well with the latest binding, but I get the following message about every 3 minutes:
2017-12-27 18:46:42.556 [WARN ] [gwise.internal.PlugwiseMessageSender] - Error sending: No ACK received after 1 second: 000AB43C

2017-12-27 18:49:48.001 [WARN ] [gwise.internal.PlugwiseMessageSender] - Error sending: No ACK received after 1 second: 000AB43C

2017-12-27 18:52:53.431 [WARN ] [gwise.internal.PlugwiseMessageSender] - Error sending: No ACK received after 1 second: 000AB43C
The characters before 000AB43C are ENQ,ENQ,ETX,ETX.
Do you have a suggestion how to go a bit more in depth to find out the cause of these warnings ?

Gert

@Gert it uses that message to discover the Stick. Does it work well besides those warnings? The binding may just need some tweaking to suppress such warnings during discovery.

@wborn OK. Thank you for the quick response. I will ignore these warnings for the moment. I have more serious problems with other bindings and the Plugwise circles do what they should do.

Gert

@gert_konemann the warnings should be fixed with PR #3098 that got merged today. It will probably be part of the next OH 2.3.0-SNAPSHOT build (#1178 or newer).

Thanks, Wouter. I will try. Probably next week.

Gert

Just to let you know (maybe normal, i don’t know), i’ve just tryed 2.3.0-SNAPSHOT #1178 today and nearly nothing related to plugwise was working, despite no particular error logs (no power sent for example, i was just able to find some “last change” timestamp on start in logs, then nothing more). Moreover some of my devices weren’t detected anymore. Back to 2.2.0 now where things are better (Power found again, all devices found again).