PLCBus setup

I’m trying to work out how to use the PLCBus binding from OH1 in OH2. I can find the source files in GitHub for the binding but no .jar file. Do I have to compile it into a .jar file myself ? I’m using a RasberryPi2 at the moment.

Try enabling/turning on legacy bindings via PaperUI > Configuration > System > Addon Management and add the latest PLCBus snapshot jar file found here.

Thank you very much. Just got to work out how to use it now !


I still need help I’m afraid. I find the binding description assumes more knowledge than I have at present. I know that the PLCBus adapter is here /dev/ttyUSB1 - Prolific_Technology_Inc._USB-Serial_Controller on the Raspberry pi but what text I put in what file in what folder has left me confused !
I created a file called openhab.cfg in the sevices folder and put this line in it “plcbus:port=/dev/ttyUSB1” . But where do I put the info about the usercode ?Also how do I create a thing ? Any further guidance greatly appreciated.

After adding the jar file and restarting OH you should have a file in etc/openhab2/services that was created called plcbus.cfg. This is where the plcbus configs go.

This is a 1.x binding and no Thing file is needed, only an items file that contains your plcbus items.

See the doc’s for an example.

Thanks. Back home from a work trip so I’ll try it out

For a little more clarity, in OH 1.x the bindings all shared openhab.cfg. So in much contemporary documentation and user postings etc. that will be the filename referred to.
Within that shared file, individual settings would be prefixed with binding name e.g.
plcbus:blah = bleh

When running a 1.x binding under OH2, the binding config is taken from individual files, plcbus.cfg in this case.
Within that file, the prefix is not needed.

Tip - the system will actually create a working copy of plcbus.cfg in a new file plcbus.config.
When editing, which you will be to get it going, these files can get out of step. If you end up with mysterious things that won’t alter or go away when you make changes, stop openHAB, delete the plcbus.config version (only!) to force recreation at reboot.

Thanks. I’m going to spend an evening trying to get it going tonight.