runs 1-wire server based on debian:stable-slim and installed via apt-get and flexible configuration
10K+
| 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 or when start container with --net=host option 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.
| 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 |
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
* please check with "ls -l /dev/onew*" if the udev-rule creates a symlink which links the correct device e.g. ttyUSB1; if not, try to take SUBSYSTEM=="tty" instead of SUBSYSTEMS=="usb"
pls. find some more details under Troubleshooting page on Github https://github.com/roobbb/owserver/wiki/6.-Troubleshooting#2022-06-22
docker run -d \
--name=owserver \
--net=host \
--restart=always \
-v /etc/localtime:/etc/localtime:ro \
--device=/dev/onewire \
-e SERVICES_LVL=1 \
roobbb/owserver
If your host's device is other than "onewire", then you always have to set "OW_DEVICE=" to that device name. Otherwise you can leave it away (because the default comes in affect).
docker run -d \
--name=owserver \
--net=host \
--restart=always \
-v /etc/localtime:/etc/localtime:ro \
--device=/dev/ttyUSB0 \
-e WEB_PORT=1234 \
-e OW_DEVICE=ttyUSB0 \
-e FTP_PORT=21 \
roobbb/owserver
If you like to set your own owfs.conf, then pass the variable CUSTOM_CONFIG_ENABLED=1 and map your config-path into the container's file system und finally tell the main script where you put your own config file.
docker run -d \
--name=owserver \
--net=host \
--restart=always \
-v /etc/localtime:/etc/localtime:ro \
-v /mypath/to_my_config:/root/.local/share \
--device=/dev/ttyS0 \
-e CUSTOM_CONFIG_ENABLED=1 \
-e CUSTOM_CONFIG_FILE=/root/.local/share/owfs.example \
roobbb/owserver:dev
docker exec -it owserver /bin/bash
docker stop owserver
define myOWServer OWServer 127.0.0.1:4304
attr myOWServer room OneWire
add a new user-defined-network
docker network create mynet
edit owfs.example and change server ip-address from 127.0.0.1 to the name of the docker container which we want to start (owserver) or its network-alias (myserver), even the server's port should be the same as what we want to map
start owserver-container with new network and alias and map ports as required
docker run -d \
--rm \
--name=owserver \
--net=mynet \
--network-alias myserver \
-p 2121:2121 \
-v /etc/localtime:/etc/localtime:ro \
-v /mypath/to_my_config:/root/.local/share \
--device=/dev/ttyUSB0 \
-e CUSTOM_CONFIG_ENABLED=1 \
-e CUSTOM_CONFIG_FILE=/root/.local/share/owfs.example \
roobbb/owserver:dev
check if the web-interface is reachable via http://yourHost:2121/ or via http://localhost:2121/
start the official FHEM container as it matches your requirements (for more details please check Readme on Github https://github.com/fhem/fhem-docker or FHEM board https://forum.fhem.de/index.php?topic=89745.0)
please make sure FHEM is member of at least one network where owserver is connected to (mynet in this example)
example for this testing here:
docker run -d --rm --net=mynet -p 8083:8083 --name fhem fhem/fhem
define myLocalOWServer OWServer myserver:4304
attr myLocalOWServer room OWDevice
attr myLocalOWServer nonblocking 1
you should see lots of readings right after entering the define-command - if not, please check server adress+port as defined in owfs.example and start-command of owserver-container
of course you can start owserver and FHEM with the option "--net=host" and both of them can be member of further networks as long as both share at least one network
if you use "--net=host" you have to set owserver to 127.0.0.1:4304 again - just like you should, when FHEM would run as a local service
docker run -d --rm \
--name=owserver \
--net=testnet \
--network-alias tryme \
-p 1234:1234 \
-v /etc/localtime:/etc/localtime:ro \
-v ~/dockertests/owserver:/root/.local/share
--device=/dev/ttyS0 \
-e OW_SERVER=tryme \
-e WEB_PORT=1234 \
roobbb/owserver:dev
2021-09-05:
I had some trouble getting the newly updated container to run. There were log messages likes these:
cannot read realtime clock: Operation not permitted
Even when I set --privileged it did not start - owserver just failed.
This issue only occurred on my raspberry which runs dietpi-os. No issues while testing on my amd64-machine. It turns out the libseccomp2 is outdated and should be updated manually as described here: https://github.com/itzg/docker-minecraft-server/issues/755#issuecomment-781615497
After that the latest push runs fine. But side-effects may appear ... lets give it a try
What I did:
checked installed version
myDietpi@myServer:~ $ dpkg -l | grep libsecc
ii libseccomp2:armhf 2.3.1-2.1+deb9u1 armhf high level interface to Linux seccomp filter
checked for latest armhf version under suggested link: http://ftp.debian.org/debian/pool/main/libs/libseccomp/
downloaded the matching version (which was still the same as Powerbolt1989 wrote in his post)
wget http://ftp.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb
and finally installed it
sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb
Content type
Image
Digest
sha256:ea77c516e…
Size
29 MB
Last updated
about 3 years ago
docker pull roobbb/owserver