Code Monkey home page Code Monkey logo

owserver's Introduction

this repo is now read-only and archived

One-Wire Docker-Container

Variables declared inside docker-file for setting defaults:

VAR VALUE hint
WEB_PORT 2121 sets value inside /etc/owfs.conf for http port
OWFS_PORT 4304 sets value inside /etc/owfs.conf for owserver's port
FTP_PORT 2120 sets value inside /etc/owfs.conf for ftp port
OW_DEVICE onewire sets value inside /etc/owfs.conf for mapped device
OW_SERVER 127.0.0.1 sets value inside /etc/owfs.conf for owserver's adress
use 127.0.0.1 when a locally installed service should have access
set a name or alias when another container should get access see examples for more details

Those variables can be overwritten when starting the container. The new value from cli will be put inside the containers /etc/owfs.conf again and substitute the defaults.

Variables evaluated by main script (start.sh) when starting the container

VAR VALUE hint
CUSTOM_CONFIG_ENABLED 1 starts with full custom config file, other than 1 means disabled
CUSTOM_CONFIG_FILE /path/filename set the full path and filename of the custom config
make sure you mapped it in there (e.g. -v /mypath/to_my_config:/root/.local/share)
SERVICES_LVL 1, 2 or 3 1 starts owserver only, no owhttpd or owftpd
2 starts owserver and owhttpd, no owftpd
3 start all 3 services
leaving this away or giving any other value than 1-3 means use the default: 3

run example: start with standard config (a udev rule sets a denkovi-usb-device to /dev/onewire):

let's assume you have set a symlink for your device via udev-rule like found here https://wiki.fhem.de/wiki/OWServer_%26_OWDevice#Konfiguration_von_owserver

set udev-rule for a Denkovi-Device on host
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="DAE001xy", SUBSYSTEMS=="usb", ACTION=="add", MODE="0660", GROUP="plugdev", SYMLINK+="onewire"

docker run -d \
   --name=owserver \
   --net=host \
   --restart=always \
   -v /etc/localtime:/etc/localtime:ro \
   --device=/dev/onewire \
roobbb/owserver
  • standard config binds owserver on localhost:4304 and owhttpd on port 2121
  • if another process on your host should connect to owserver, the unix socket localhost:4304 doesn't work with docker - therefore owserver is set on 127.0.0.1:4304 by default

run example: start owserver only with default values

docker run -d \
   --name=owserver \
   --net=host \
   --restart=always \
   -v /etc/localtime:/etc/localtime:ro \
   --device=/dev/onewire \
   -e SERVICES_LVL=1 \
roobbb/owserver

owserver's People

Contributors

roobbb avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.