Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.
/ owserver Public archive

1-wire server docker container based on debian:stable-slim

License

Notifications You must be signed in to change notification settings

roobbb/owserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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