openHAB2 piface setup

Hello together,

I have now tried to get openHAB2 running on my raspberry pi
Unfortunately I cannot get the piface binding showing up in the binding list.

What I tried so far:

  • Copied the org.openhab.binding.piface-1.8.1.jar file from my 1.X to the addons folder and changed the addons.cfg:
    package=standard
    remote=true
    legacy=true
    binding=piface
    The piface.cfg file was not created automatically (I created it manually)
    I copied the settings from the old openhab.cfg file (and removed the piface: in front of each setting).
    started openHAB (using start.sh)
    Error messages I got so far:
    ā€œNo Piface node for id PIā€
    (PI is the id I gave in the settings: PI.host=10.2.0.18 ā€¦)
    (Item is also defined acordingly: Switch Garage_MoveDoor ā€œGaragentor Start/Stopā€ (piface) { piface=ā€œPI:OUT:0ā€ } )

Then I tried to be more intelligent than usual and searched for SATEL binding as example - this is also an old binding)
Found it in the Y:\runtime\karaf\system\org\openhab\binding folder (I mapped it to my PC)
I tried to create a similar folder structure for the piface addon
Y:\runtime\karaf\system\org\openhab\binding\org.openhab.binding.piface\1.8.1\org.openhab.binding.piface-1.8.1.jar
and added the maven-metadata-local.xml
But Iā€™m sure that this is not sufficient.

Then I found something about piface 1.9.0 binding, but cannot find a jar file and as a .NET developer Iā€™m completely lost on what to do and how to compile the sources found.

So any input would be great.

Just a bit more background.
Iā€™m currently running OH1.X and Iā€™m happy with it (Except there is no KEBA binding I could get hold off and I do not get UDP working), so I wanted to switch over to OH2 where I have a KEBA binding, but now I do not get the PIFACE working.

Thanks

Thomas

2 Likes

The nightly 1.9 addons builds are on cloudbees:

https://openhab.ci.cloudbees.com/job/openHAB1-Addons/

You can download them all by clicking on the Last Successful Artifacts link, and extract the bindingā€™s jar file from the zip file.

Thank you, meanwhile found it (by accident).
Seems to be hidden very carefully.
Anyway, I still didnā€™t get it to run unless I removed the complete installation (except for conf and addons folder) and replaced runtime and so on with a fresh copy.
Had to install all bindings and so again (unfortunately).
But after that, it started working.

Iā€™m not quite sure if there shouldnā€™t be a kind of ā€œrebuildā€ function included which recreates all the current settings again to get rid of any old ā€œleft oversā€ from other bindings which have been there but are not anymore.

So, this thread is the top result on Google for ā€œopenhab2 pifaceā€ - if youā€™re like me and have been using openhab1.6 forever and finally upgraded and wondered whatā€™s going on, this is what I had to do to get piface up and running again (and also for me, when I forget and need to do it againā€¦)

Assuming youā€™ve already got a working OpenHab2 install. Unsure if there are file location differences, but I installed via an apt repo and installed the ā€œExpertā€ packages as per documentation: http://docs.openhab.org/installation/linux.html#package-repository-installation

  1. Get your RPI setup the same way as per https://github.com/openhab/openhab/tree/master/bundles/binding/org.openhab.binding.piface/scripts
  2. Go here: https://openhab.ci.cloudbees.com/job/openHAB1-Addons/ click on Last Successful Artifacts link, download the zip file and then browse here: archive\bundles\binding\org.openhab.binding.piface\target
  3. Copy org.openhab.binding.piface-1.9.0-SNAPSHOT.jar to /usr/share/openhab2/addons - OpenHab2 will automatically load the file into runtime
  4. Create /etc/openhab2/services/piface.cfg with required piface configuration. Base copy listed under ā€œBinding Configurationā€ here: https://github.com/openhab/openhab1-addons/wiki/Piface-Binding
  5. Create your items as required in /etc/openhab2/items

Done.

1 Like

I can confirm that this addon works without any issues in openhab2.
So maybe someone can add it to the distribution? I mean the list of bindings in the paper UI.

Iā€™m not sure who the right person to tag is so I recommend starting a new thread with a link to this one entitled: ā€œpiface binding works on OH 2.0ā€. The right person or people should see it and it will get added to the distro.

Please someone open an issue here to request that this binding is made installable on OH2. That way this good news and request wonā€™t get lost. Thank you!

1 Like

Annndddd done: https://github.com/openhab/openhab1-addons/issues/5032

@rlkoshak you could probably delete that other post since itā€™s now redundant (doesnā€™t look like I can do it myself)?

I donā€™t have that power. You can edit it and just say ā€œnever mindā€.

1 Like

Hi,
I have a question regarding the PIFace configutation. What IP address is required here?

piface:pifaceid1.host=

IP address of my network?

Thatā€™s the IP Address of the RPI running the PiFace board.

Ok. I just spent all night on this. I followed all the steps in this thread AFTER I made sure my RPI3 and the piface were talking. That part works.

I copied the org.openhab.binding.piface-1.10.0-SNAPSHOT file to the /usr/share/openhab2/addons folder and updated the owner, I added the piface binding section to a piface.cfg file in the /etc/openhab2/services folder and updated the ownership. Updated Java to the 1.8.0_131 and rebooted. did several update && upgrades in there too.

Openhab looks just like it did before I did any of that. What did I miss?

By now, I hope Iā€™m close. Thank you for all of this and for any help.

Digging around I found this:

!ENTRY org.openhab.binding.piface 4 0 2017-05-06 07:20:35.532
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.piface [193]
Unresolved requirement: Import-Package: org.openhab.core.binding

at org.eclipse.osgi.container.Module.start(Module.java:434)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Is this a java error or did I miss a piece?

@rxmas Iā€™m not 100% sure, but when I wrote the instructions 1.9.0 was the version to use. 1.10.0 might be the version that automatically integrates with OpenHab2, so these instructions might have changed.

Would suggest trying the 1.9.0 snapshot version of the PiFace binding, or upgrading your whole OpenHab install nightly/beta?

Thank you for the quick reply. I went back and looked for the 1.9.0 version but didnā€™t find it and Iā€™m not sure how to upgrade to the nightly but would be willing to try either / both. Iā€™ll keep looking and will let you know if I do anything else.

@rxmas thereā€™s potentially a mirror here? https://bintray.com/openhab/mvn/openhab1-addons/1.9.0

Iā€™ve also put the version Iā€™m using here if you canā€™t get that one to work.

Thank you! Iā€™ll give it a try

Update.

Iā€™m starting over. I have a fresh install of Raspian and the piface is working as stand alone devices. I installed Openhab2 and in the PaperUI added the bindings for Piface. Nothing. I added the bindings for ā€˜networkā€™ and instantly got a list of everything in my network.
If the GPIO biundings work, Iā€™m thinking I should dump the Piface and just control an external board of relays, AKA admit defeatā€¦

I Have one question to the PiFace config, too:
I want to use my RPI (Openhab2.4+PiFace digital2) without a network after installation,
what IP adress do I use for the piface.config?
I tried 127.0.0.1, localhost, ā€œhostnameā€ and even setup a static IP in the ā€œdhcpcd.confā€ file and used that one. Doesnā€™t work. Only works with the Real network adress.

Thanks.