Plugwise Binding: Looking for testers of Scan, Sense, Stealth, Switch support

Hi @Awacs2000 . I’ve highlighted the issues with this configuration in bold:

  • poineer should be replaced with pioneer
  • blueray should be replaced with fritzbox

Also you can drop the plugwise: prefix when you use openHAB 2.0.

So I think the following should work:

Do you also see the Stick when you issue lsusb and does the openhab user belong to the dialout user group?

Before you can see and switch the Circles you need to add them to a .items file and .sitemap (like in the Plugwise Binding Wiki).

@Awacs2000 I made some examples for you (haven’t tested them):

plugwise.items

Switch Pioneer_Switch "Switch" <switch> { plugwise="[ON:pioneer:state:15], [OFF:pioneer:state:15]" }
Number Pioneer_Power "Power [%.1f W]" <energy> { plugwise="[pioneer:power:10]"}

Switch Blueray_Switch "Switch" <switch> { plugwise="[ON:blueray:state:15], [OFF:blueray:state:15]" }
Number Blueray_Power "Power [%.1f W]" <energy> { plugwise="[blueray:power:10]"}

Switch Fritzbox_Switch "Switch" <switch> { plugwise="[ON:fritzbox:state:15], [OFF:fritzbox:state:15]" }
Number Fritzbox_Power "Power [%.1f W]" <energy> { plugwise="[fritzbox:power:10]"}


default.sitemap

sitemap default label="Main Menu"
{
    Frame label="Pioneer" {
        Switch item=Pioneer_Switch
        Text item=Pioneer_Power
    }

    Frame label="Blueray" {
        Switch item=Blueray_Switch
        Text item=Blueray_Power
    }

    Frame label="Fritzbox" {
        Switch item=Fritzbox_Switch
        Text item=Fritzbox_Power
    }
}

Hi!

Thanks a lot for your help!

First of all, I see the stick:
pi@openhab-pi:~ $ lsusb
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

I now copied your example into the “plugwise.cfg” in /etc/openhab2/services/
Then I copied your example into the “plugwise.items” in /etc/openhab2/items
And finallly I made a file called “default.sitemap” and put your example in under /etc/openhab2/sitemaps

But I see nothing. I restarted the raspberry, opened the URL http://myIP:8080 an looked in “BasicUI”. In BasicUI I only see “Home” and my “Things”, but no Plugwise.
In PaperUI I see no Plugwise items at all.

What do I do wrong???

The Plugwise Binding is a openHAB 1.x binding. When you use it with openHAB 2.x, it will not show any devices in Paper UI. Besides that, there should be no issues when using it with openHAB 2.0. I presume you did install the binding via Paper UI > Extensions > Bindings ?

You will only see in Basic UI the items that have been added to the sitemap. Before you can add items to a .sitemap they have to be defined in a .items file. So thats what the 2 files are doing.

The openHAB logfiles are located in /var/log/openhab2 . Can you see if there are any Plugwise related errors logged?

Perhaps your installation does not use default.sitemap as default. If so, you can open default.sitemap by browsing to: http://yourIP:8080/basicui/app?sitemap=default

The default Basic UI sitemap can be changed in Paper UI > Configuration > Services > UI > Basic UI > Configure > sitemap

Also, whenever you disconnect the Stick and reinsert it, the port on which it is connected might change. You can check what port it is using by typing dmesg. After a reboot it usually is connected to /dev/ttyUSB0 … unless you have other USB devices connected.

When I execute dmesg on my RPi3, I see:

[3697769.364670] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected
[3697769.364858] usb 1-1.4: Detected FT232RL
[3697769.365836] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0

Hi!

I can see the Item now via http://myIP8080/basicui/app

The stick still has the same Port:

[ 8.140592] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 8.143720] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[ 8.144358] usb 1-1.2: Detected FT232RL
[ 8.150443] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 8.790900] smsc95xx 1-1.1:1.0 eth0: hardware isn’t capable of remote wakeup

But even I can see the Plugwise items I cannot switch them to ON or OFF. I see the switch, but noting happens.
On the right side i can see a “-W”, in the middle I see “Power” with a yellow sign and beside that the small switch and the label, loke “Pioneer” and so on.

I also found this:

2016-12-11 17:55:34.013 [WARN ] [ng.plugwise.internal.PlugwiseBinding] - Plugwise can not add a valid device without a proper MAC address. fritzbox can not be used
2016-12-11 17:55:34.014 [ERROR] [ng.plugwise.internal.PlugwiseBinding] - Error scheduling a Quartz Job for a non-defined Plugwise device (fritzbox)

I double-checked the MACs in Domotiga (I use this currently to switch the plugwise modules):

ID 68
Name AV-Pioneer
Address 000D6F0000D34542
Name Plugwise Circle

ID 61
Name BluRay-Player
Address 000D6F0000D34283
Name Plugwise Circle

ID 52
Name Fritz7390-CirclePlus
Address 000D6F0000B1B65B
Name Plugwise Circle+

OK thats good news. At least some things already work now! :slight_smile: The issue now is that it can not communicate with the Circles via the Stick. Did you already restart openhab after you changed plugwise.cfg? That might help. E.g. using: sudo service openhab2 restart

Yes, I did a restart.
Justed checked again. Same error in the log.

Does the openhab user have the proper permissions for reading /etc/openhab2/services/plugwise.cfg ?

Perhaps you can also copy/paste the Plugwise Binding version. For instance using the command:
/usr/share/openhab2/runtime/bin/client bundle:list \| grep Plugwise

I´ not that Linux pro, but I think that ist ok:

-rw-r–r-- 1 openhab openhab 292 Dez 11 17:41 plugwise.cfg

When execute the other command this happens:

pi@openhab-pi:/etc/openhab2/services $ /usr/share/openhab2/runtime/bin/client bundle:list | grep Plugwise
client: Ignoring predefined value for KARAF_HOME
Logging in as openhab
6280 [sshd-SshClient[1b9a632]-nio2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at [/127.0.0.1:8101, RSA, db:bc:c3:e1:8f:fa:12:65:96:d5:55:9d:d5:18:24:bf] presented unverified {} key: {}
191 | Active | 80 | 1.9.0.201612110211 | Plugwise

LOG:

2016-12-11 20:01:28.130 [ERROR] [ng.plugwise.internal.PlugwiseBinding] - Plugwise device is not defined for device with ID blueray
2016-12-11 20:01:29.247 [ERROR] [ng.plugwise.internal.PlugwiseBinding] - Plugwise device is not defined for device with ID fritzbox
2016-12-11 20:01:29.852 [ERROR] [ng.plugwise.internal.PlugwiseBinding] - Plugwise device is not defined for device with ID 52
2016-12-11 20:01:30.564 [ERROR] [ng.plugwise.internal.PlugwiseBinding] - Plugwise device is not defined for device with ID 61
2016-12-11 20:01:31.512 [ERROR] [ng.plugwise.internal.PlugwiseBinding] - Plugwise device is not defined for device with ID 68

Yes that seems all OK.

You could also try to remove the binding configuration using:
/usr/share/openhab2/runtime/bin/client config:delete org.openhab.plugwise

Then restart openHAB again using:
sudo service openhab2 restart

If it still not works you might want to issue the following command and paste the output here:
/usr/share/openhab2/runtime/bin/client config:list \"\(service.pid=org.openhab.plugwise\)\"

It should list the openHAB Plugwise Binding configuration which should match the contents of plugwise.cfg.

/usr/share/openhab2/runtime/bin/client config:delete org.openhab.plugwise
helped. Now I can see values in Watt.
But when switching it´ s reacting very slow. Also I switched the “blueray” on, but cannot turn it OFF anymore.

Do you mean that the watts update slow or that switching is slow?

You can make the watts update faster by editing the items file, e.g. use:

Number Blueray_Power "Power [%.1f W]" <energy> { plugwise="[blueray:power:3]"}

That will update the power every 3 secs instead of 10 secs. No restart required for such changes. :wink:

No, the switching was slow.
Also I switched the “blueray” on, but cannot turn it OFF anymore.

Forget it!

It´s working fine now! I had a wrong value after [OFF: from testing before.
I changed ist back to e.g. pioneer and now it´ working fine.
I can turn the plugs On and OFF an cann see the value in WATT.

One mor question:

What do I have to do if I would like to see e.g. Temperature

1 Like

Do you mean that you also have a Plugwise Sense and use it with openHAB?

Do you mean that it is not possible to measure temperture with the normal plugwise modules.

My idea was to insert a second line blow the “WATT” line.

Circles can only do power measurements and ON/OFF switching. But you could add a line that shows the total consumed power for the last hour per device, e.g. for blueray:

add to plugwise.items

Number Blueray_Last_Hour "Last hour [%.3f kWh]" <chart> { plugwise="[blueray:lasthour:60]" }

change in default.sitemap

    Frame label="Blueray" {
        Switch item=Blueray_Switch
        Text item=Blueray_Power
        Text item=Blueray_Last_Hour
    }

There are some other items as well which are detailed in the Plugwise Binding Wiki. All Circle/Circle+ item values are shown in this image. The binding supports temperature and motion detection using the Plugwise Scan and Sense, but those are different devices.

If you want some temperature (or other weather) related items you can use for instance the Weather Binding.

Looks perfect!

Thanks a lot for your patience and time!:slight_smile:

Now I only have to get to work with Amazon Echo! :slight_smile:

But I don´t know if it is possible. It works fine with hue and Homematic devices.

1 Like

Great that it all works now! :tada: :slight_smile:

Hi!

It´ me again!
I´ve got another question. I configured all of my 17 plugwise modules in the default.sitemap, plugwise.items and plugwise.cfg and everthing looks good in BasicUI.Graphically.
But a few of the modules do not show their status. The Switch stays off and no power status is shown.
I checked a dozend times the config and even changed the namens of the modules, but still no luck.
I restarted th Pi a lot, but is does not help.
I reseted the modules, but also no luck.

I my old software Domotiga I can switch the modules on and off with no problem.

What else can I check?