This image of FHEM is based on Debian and runs on every possible docker host. The master branch (latest) is based on Debian Stretch. It has several Perl Modules installed, however if you are missing any modules, packages or features, don't hesitate to ask for it by opening an issue on GitHub, I'd love to improve this container in the future. https://github.com/JoschaMiddendorf/fhem-docker/issues/new
You can make your entire configuration persitent across updates and restarts by mapping the volume /opt/fhem to a directory of your choise. If the maped directory is empty prior to the first atempt to run the container, initial data will be extracted from the fresh install. Furthermore there are some goodies, predefinitions and helpers in the initial fhem.cfg whitch will make it easy for you to start over.
- Video Tutorials: https://www.youtube.com/channel/UCRDCsZvUg75Bibp9qYbHivw
- Manuals: https://haus-automatisierung.com/
- FHEM Website: http://www.fhem.de
- FHEM Forum: https://forum.fhem.de
- mapable and self initialising volume /opt/fhem
- Exposed ports: 7072 for FHEM-Tellnet and 8083-8089 for FHEM Web instances, Tablet UI and Webhooks. (you dont't have to expose them all)
- Preinstalled haus-automatisierung.com theme
- Preconfigured nice looking FHEM Web
- Live FHEM log output via docker
- Reliable start script for gracefull restart and shutdown handling without sending kill signals to FHEM
- Docker Healthcheck to check FHEMs first defined FHEMWEB frontend for actual reachability
- Configurable start method fhem.cfg or configDB
- Constantly improved and maintained
- Feature requests and feedback is highly appreciated
If you appreciate my work and if you use and like these container, consider to make a little donation.
docker run -d --name fhem-docker -p 7072:7072 -p 8083:8083 -p 8084:8084 -p 8085:8085 -p 8086:8086 -p 8087:8087 -p 8088:8088 -p 8089:8089 diggewuff/fhem-docker
docker run -d --name fhem-docker -v /my/host/directory:/opt/fhem -p 7072:7072 -p 8083:8083 -p 8084:8084 -p 8085:8085 -p 8086:8086 -p 8087:8087 -p 8088:8088 -p 8089:8089 diggewuff/fhem-docker
Check for usb devices on the host with lsusb
:
lsusb -v | grep -E '\<(Bus|iProduct|bDeviceClass|bDeviceProtocol)' 2>/dev/null
and mapp them to the container by adding argument like this to the run command:
--device=/dev/bus/usb/001/002
Furtermore you can define the following environmental variables to customize the behavior of the container:
Timeout interval, in seconds, before container stopps when FHEM process terminates unexpectedly.
-e TIMEOUT=10
Your timezone according to POSIX (http://lmgtfy.com/?q=POSIX+timezones), to configute the container to have your local time.
-e TZ=Europe/Berlin
The user credentials for the first WEB Device in your FHEM config. Without that the Healthcheck will show Unhealthy if you use basic auth in FHEM!
-e HEALTHCHECKCREDENTIALS=user:password
The ConfigType you want to use, default is "fhem.cfg", use "configDB" if you want to start FHEM with ConfigDB instead of fhem.cfg file! CAUTION: An initial start of these container with configDB isn't intended in my routines. Terefore if you want to use it, migrate from fhem.cfg or take care to follow the ADVICES below. Furthermore, if you are using configDB, Healthcheck can't determine your FHEM Web port and if you are using https from your fhem.cfg file, therefore also specify them by the following variables.
-e CONFIGTYPE=configDB
-e HEALTHCHECK_PORT=8083
-e HEALTHCHECK_HTTPS=true
Keep the folowing lines in your configuration or add them if you are migrating from an existing config.
attr global logfile /opt/fhem/log/fhem-%Y-%m.log
attr global modpath /opt/fhem
attr global nofork 0
attr global pidfilename /opt/fhem/log/fhem.pid
attr global updateInBackground 1
define telnetPort telnet 7072 global
Make sure to always use absolout paths in your configuration beginning with /opt/fhem/ not with ./ !
docker ps
docker exec -it fhem-docker /bin/bash
docker logs -f fhem-docker
http://ipaddress:8083