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.
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?
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
[ 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! 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
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
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
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.
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
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.
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.