Code Monkey home page Code Monkey logo

openhab-syno-spk's Introduction

openHAB Synology DiskStation Install Package

This project build a Synology DiskStation SPK install package for openHAB (Home Automation Server).

Comments, suggestions and contributions are welcome!

Download

Download SPK package from Github Releases Github All Releases

Logging

The openHAB log files can be found here: /volume1/@appstore/openHAB/userdata/logs/.

From Version openHAB-2.2.0.006 the SPK generates two log files located at /var/log/.

The first log file openHAB-install.log will be generated during the installation. If you can't install the openHAB SPK, please have a look inside the file.

The second log openHAB-start-stop.log will be generated by starting and stopping openHAB inside the Package Manager.

Documentation

Installation und Prerequisite Install Java Documentation: Official openHAB Usage Manual

For usage of serial devices you need to check if openhab user has the appropriate rights to access the device in /dev and to create lock files in /run/lock

To do so the installer tries to add the openhab user to the groups dialout and uucp. But these groups are not present on all synology diskstations.

/run/lock for instance is created as this on a ds214play:

drwxr-xr-x 5 root root 160 Dec 9 20:11 lock

and /dev/ttyUSB0 is per default also created for root only:

crw------- 1 root root 188, 0 Dec 4 12:55 /dev/ttyUSB0

The result in nrjavaserial / RXTX to access this port would be a no port found exception.

To correct this you need three steps (login as admin on diskstations ssh login):

a) create a group and assign openhab user to it

sudo synogroup --add uucp openhab

b) setup udev rule so that access rights in /dev/ are permanent and reload udev rules

example for pl2303 usb to serial converter:

sudo echo 'SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", GROUP="uucp", MODE="0660"' >>/usr/lib/udev/rules.d/50-yourrules

example for general ttyUSB rule:

sudo echo 'KERNEL=="ttyUSB*", ACTION=="add", MODE="0660", GROUP="uucp"' >>/usr/lib/udev/rules.d/50-yourrules

reload rules now:

sudo udevadm control --reload

c) enable access for openhab user for lock file creation

chmod 0775 /run/lock

chown root.uucp /run/lock

edit /etc/init/root-file-system.conf to persist this change.

sudo vi /etc/init/root-file-system.conf

change line

/bin/mkdir -p /run/lock || true

to

/bin/mkdir -m 0775 -p /run/lock || true

chown root.uucp /run/lock || true

Forum

Official community: Github Releases

Chat

Discussion chat: Join the chat at https://gitter.im/openhab/openhab-syno-spk

Build

Travis build state: Build state

Contributing

GitHub issues Issue Stats GitHub forks Issue Stats GitHub stars

Contribution guidelines

License

When not explicitly set, files are placed under GitHub license.

openhab-syno-spk's People

Contributors

cniweb avatar schoppax avatar gitter-badger avatar tosa27 avatar jaghatei avatar rkrausen avatar

Watchers

James Cloos avatar Ferreira avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.