K8055 and openhab2 - stuck

  • Platform information:

    • Hardware: Pi3 model b
    • OS: Rasbian PI image (OH2 latest)
    • Java Runtime Environment: (default included in OH2 image)
    • openHAB version: 2.0.0
  • Issue of the topic: I am a new user, familiar with WinSCP / Putty, although limited linux knowledge. there was no K8055 binding in the list of bindings, so i tried to manually add it. I updated the kernel to include the k8055 references and can successfully poll the device from the linux command line. (directly connected to the PI via USB). i then uploaded the .jar to the addons folder, udpated the .cfg and rebooted, but still nothing appears in the OH2 binding. \I followed the wiki and a few other tutorials to get this far, but there seems to be missing steps or something related to OH2 didn’t work. Could you please point me towards specific help on manually adding an addon and getting it to appear if you don’t have further info on the k8055 specifically? thanks

  • Please post configurations (if applicable): as per wiki and forum pages here :-1:
    [SOLVED] Velleman k8055 USB IO Board Binding Openhab 2.3
    https://www.openhab.org/v2.3/addons/bindings/k80551/#prerequisites

Welcome to the Community!

Try using sudo openhbian-config command to access the config tool and select option 10 then 11, 13, 14. This will make sure openhab has the correct permissions and access.

will give it a try and update the thread, thanks

I didn’t read the tutorial you used but have you set the EXTRA JAVA OPTS located in /etc/defaults/openhab2/

The line added should look something like this:

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

Hiya. thanks for this,

so first i tried going through the menu options and then rebooted, but no difference.
just tried adding it to java options, it wasn’t there (thanks) and wasn’t documented in the tutorials i found, but even after a reboot, it still isn’t available as a binding in OH2

any other ideas? appreciate the help - ta

If you installed the binding via jar file then you should have it. Use the console and see if it’s listed.

Using bundle:list should show everything installed.

hiya. it’s not listed in the bundles. i’ll re-trace my steps and see if i’ve missed anything… some of the links in those tutorials no longer work (at least for me) so can’t access some of the material they refer to…

bit of a longer post, but still struggling with getting the binding to appear in OH2…

I’m trying to get the velleman k8055 IO board working with OH2. The original documentation and links to the .jar file no longer work, so what i’ve done has been cobbled together from a number of different searches / sources of info…

So, after the advice above (thanks), I still couldn’t get the velleman k8055 board working in OH2, however the linux command k8055 to test connectivity to the board worked fine… So i decided to start fresh to retrace and document my steps…

New sdcard in the PI 3 model b. new OH2 pre-built image installed and configured as below

download openHabian2 ready made image
rufus disk image to card
power on & let self install
wait <>20 mins for it to complete, monitor progress via http://openhab
check website available via http://openhab:8080
ssh
run openhabian-config tool
update tool
update system
apply improvements
- sub menu items 11,12,13,14,15
system options
- change display locale to en_GB.UTF-8
- confirm timezone
exit menu
passwd change default password via openhabian-config tool
sudo reboot

paper ui
add bindings
GPIO
philips hue
MQTT
openweather
network
ntp
unifi
seneye
wifi led
inbox
add automatically found things
- hue bridge
- ntp
hue
- generate user using developer url
paper ui

  • add user name to hue config
  • add newly found items from hue bridge
  • add text to speech
  • emphemeris, configure location
  • item linking, simple mode
  • eclipse network address
    things
    • network - add router
    • ntp - add ntp server
      openweathermap - create account for api key
      things - configure item - openweathermap

Velleman K8055 board
copy jna-309.jar binding to addons samba share
update extra java options in /etc/default/openHAB2
add example .cfg files to items and bindings folders in samba shares

make group for access to k8055 usb device and add openhabian user
sudo groupadd k8055
sudo usermod -a -G k8055 whoami # granting access to the usb board for the local user
sudo reboot

install k8055 linux driver from https://github.com/rm-hull/k8055
ssh

  • install swig
  • install libusb-dev
  • install wget
  • create new folder
  • download k8055 driver
    make all
    make install
    make pylib k8055gui
    lsusb command to check usb port of interface
    test k8055 command on interface above

reboot

check bindings for k8055 using paper gui - missing…
check binding for k8055 using console as mentioned in advice above - missing

k8055 .cfg files

item
Switch Output1 “Digital Output 1” { k8055=“DIGITAL_OUT:1”}
Switch Output2 “Digital Output 2” { k8055=“DIGITAL_OUT:2”}

Dimmer K8055_ANOUT_1 “K8055 Analog Output 1” { k8055=“ANALOG_OUT:1”}
Dimmer K8055_ANOUT_2 “K8055 Analog Output 2” { k8055=“ANALOG_OUT:2”}

Number K8055_ANIN_1 “K8055 Analog Input 1” { k8055=“ANALOG_IN:1” }
Number K8055_ANIN_2 “K8055 Analog Input 2” { k8055=“ANALOG_IN:2” }

services
################################# Velleman K8055 Binding ######################################

refresh interval in milliseconds (optional, defaults to 1000ms)

k8055:refresh=1000

Board Number.

k8055:boardno=0

not sure if it’s related, but the samba config and OH wiki shows the install location as /opt/openhab2/ but there isn’t anything installed here. not sure if this needs re-pointing or doesn’t matter?

links used but may need updating?


https://www.openhab.org/docs/installation/linux.html#file-locations - /opt/openhab2/ wrong location?
[SOLVED] Velleman k8055 USB IO Board Binding Openhab 2.3 - cloudbees site inaccessible for me… had documentation and .jar binding
https://openhab.ci.cloudbees.com/job/openHAB1-Addons/1636/org.openhab.binding%24org.openhab.binding.k8055/ - inaccessible link

Here is a working link to the jar file. Last updated 2/26/20

https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.k8055/1.15.0-SNAPSHOT/

1 Like

Hiya. thanks for this. Really appreciate the help.

Could you please confirm the correct file path in OH2 that the addon needs to be placed?

after checking several articles / forum posts, i’ve tried (rebooting after each)

  1. adding via samba shares to \openhab\openHAB-share\openhab2-addons - didn’t work.
  2. adding it via winSCP to /etc/openhab2/addons & setting permissions to 0755) - didn’t work
  3. adding it via winscp to /usr/share/openhab2/addons & set permissions to 0755 - didn’t work

The correct location is /usr/share/openhab2/addons

What is the output of: ls -al /usr/share/openhab2/addons

For permissions just use the openhabian-config tool, select option 10 then whatever number fix permissions is.

1 Like

Thanks H102…

I used the openhabian-config tool to apply permissions then rebooted and K8055 still didn’t appear in addons

output

total 796
drwxrwxr-x+ 2 openhab openhab 4096 Apr 9 13:44 .
drwxrwxr-x+ 4 openhab openhab 4096 Apr 8 17:27 …
-rw-rw-r-- 1 openhab openhab 227 Apr 8 18:42 k8055.cfg
-rw-rw-r-- 1 openhab openhab 798649 Apr 9 13:40 k8055.jar
-rw-rw-r-- 1 openhab openhab 70 Mar 19 16:42 README

You shouldn’t have a .cfg file in that location, please remove it.

A cfg file goes in /etc/openhab2/services/ but this should have been automatically created when you installed the jar file and that is where you configure the settings.

What is the output of: ls -al /etc/openhab2/services`

Do you mean addons in PaperUI?

Installing the jar file is the addon, do you see it under Configuration > Bindings in PaperUI?

Yes, paperui,

output of services

total 72
drwxrwxr-x+ 2 openhab openhab 4096 Apr 9 16:06 .
drwxrwxr-x+ 14 openhab openhab 4096 Apr 9 14:41 …
-rw-rw-r-- 1 openhab openhab 2269 Mar 19 16:42 addons.cfg
-rw-rw-r-- 1 openhab openhab 47382 Apr 8 17:30 dashboard.cfg
-rw-rw-r-- 1 openhab openhab 227 Apr 8 18:42 k8055.cfg
-rw-rw-r-- 1 openhab openhab 333 Mar 19 16:42 readme.txt
-rw-rw-r-- 1 openhab openhab 3682 Mar 19 16:42 runtime.cfg

Ok, that looks good as you have the k8055.cfg file. Now place your setting inside the file and you should be good.

Don’t forget to remove the cfg from addons file.

It will not be in addons via PaperUI but you should see it listed under Configuration > Bindings…I think. :thinking: Currently not using any v1 bindings so can not confirm but its listed in etc/openhab2/services so it should be installed.

You can use the console to verify it’s installed but you should have seen it in the logs as well.

cfg removed from addons,
not listed in paperui - configuration - bindings
not found in ssh - console - bundles:list (see screenshot)
contents of K8055.cfg in /etc/openhab2/services (see screenshot)


In PaperUI System Config do you have legacy bindings enabled? If not please enable this.

I didn’t see the screen shot but if it’s not listed via console then it’s not installed. Have you restarted OH since adding the jar file?

Do this:

Enable legacy bindings
Remove the jar file
Stop OH, and clean cache
Once OH is fully restarted (will take a few minutes) add the jar file
Restart OH
Check the console and see if it’s listed.

To clean cache:

sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2

To restart OH:

sudo systemctl restart openhab2

One more thing, please have a second browser open with frontail log running and watch the logs as your doing the above. If you do not have frontail log it can be install via openhabian-config tool…not sure about exact location just dig around and you will find it.

thanks for this. since clearing cache and restarting, i can’t get to the website openhab:8080 or openhab:8443. (connection refused)

just trying to figure out why… couldn’t see anything obvious in logs…

It will take several minutes before OH is fully restarted after cleaning the cache. Have you tried again since? If still an issue then do 2 restarts, allowing OH to fully start in between. Having to restart a few times is a known issue, sorry for not mentioning it before.

Morning mate.

half a dozen restarts / shutdowns and still “connection refused”… also looked for / removed any k8055.cfg files / k8055.jar files from the various folders where i’d been testing in-case they prevented OH2 loading properly - no difference… unplugged all USB accessories in-case they were causing any issues, rebooted twice again with <>10 mins between them, but still same error…

Don’t worry too much about this mate, luckily it isn’t a live system (yet), so i’m happy to wipe and rebuild, then continue trying to get k8055 working…

appreciate the time you’ve put into helping - thanks.