Install & maintain openHAB on Raspi in Docker together with Mosquitto, Duplicati, influxDB, Samba etc - Step by step instruction

The issue got fixed and deployed. So will remove the addition platform: linux/armv7 again.

1 Like

The more you write the more I believe I have a bug in my wmbusmeters volume definition and the correspoding samba share.

Regarding your question of “missing nano” to do the configuration after going the docker exec -it wmbusmeters /bin/sh-route: There’s also the alternative of accessing the volumes directly. Use sudo su and then cd /var/lib/docker/volumes/. You should then see your wmbusmeters-directory, and do the config-setting via nano directly there.

Btw: I’m running a system not straightly set up via my instruction above (so I also played around a bit), but I do find three wmbusmeters-folders (and only one linked via Samba)…
…so I believe your problem is just the result of a bug in my volume definitions, leading to multiple wmbusmeters volumes, but just one being the correct one. I’ll fix this as well, but might take some time until I find the time.

1 Like

Samba is still somehow a mystery to me. Sometimes it works, sometimes it doesn’t. Maybe you find out what needs to be changed in the docker-compose.yml, so that I can update the guideline above.


I think we are really close :slight_smile:
''wmbusmeters_data" volume is missing within my configuration :slight_smile:
at the same time “openhab_data_wmbusmeters_data” volume looks to be empty while treated with “ls” command…

Try to find out which is the “real” volume that’s currently being used by wmbusmeters (and ignore the others which are caused by my bug :wink: ), do your configuration there, and then it should work. The fact that the stick is already working is majority of the work.

I know only basic linux :frowning:
I found this command and it works:

sudo chmod -R 777 /var/lib/docker/volumes/

Hope you sleep well - there is no bug in your configuration!
Followed advice and found my configuration folder (same as visible by samba share) and created meter files with sudo nano and IT WORKS :slight_smile:
Looks like the problem were files created within windows notepad :frowning: same data saved with sudo nano stated for victory :smiley:


Hehe is working config for TheengsGateway - it is BT gateway working on Rpi 4 (maybe other) without additional HW.

    image: theengs/gateway:latest
    container_name: theengsgateway
    network_mode: host
      MQTT_USERNAME: mosquitto
      MQTT_PASSWORD: k0mar23
      MQTT_PUB_TOPIC: home/TheengsGateway/BTtoMQTT
      MQTT_SUB_TOPIC: home/TheengsGateway/commands
      PUBLISH_ALL: true
      TIME_BETWEEN: 60
      SCAN_TIME: 60
      HASS_DISCOVERY: false
      DISCOVERY: true
      DISCOVERY_TOPIC: homeassistant/sensor
      DISCOVERY_DEVICE_NAME: TheengsGateway
      SCANNING_MODE: active
      ADAPTER: hci0
      - /var/run/dbus:/var/run/dbus


Thanks, glad to hear. Finally. Will still have to investigate the wmbusmeters-volumes-topic. Am not sure whether I currently have everything backed up correctly. Having three volumes on my end for the same thing makes me kind of nervous. :wink:

Well done, thank you for great tutorial!

My few questions and comments:

  • As I was migrating from instance where I already got influx2 I got stuck as there is no influx2 for armv7. Hopefully I’m on RPi4b 8GB so I just went for 64bit lite version and everything seems to be working
  • Any reason why you are using full paths when mounting to certain services (chronograf, duplicati) instead of volume?
  • BTW it creates potential issue if someone lables the master project differenty (as I did) as the full path has …/openhab_data… hardcoded in
  • also sometimes the timezone is parameter (eg. openhab), sometimes its hardcoded (eg. duplicati, samba)

You’re right, I noticed this as well. The influxDB-part is one of the things that needs some thought going forward, as 1.8 will come to an end sooner or later.

With precision you’re pointing to a part which I was always happy about that it’s working, but which I solved probably in a not-so-ideal way. :wink: So I’m happy to incorporate any changes or recommendations which you have. Feel free to post what you’re running, and I’m happy to replace it above.

Same here. As mentioned in my disclaimer, I’m not a pro. If you let me know how you would solve it, and if it works, I’m happy to edit the instruction above.

Same as above. Happy to incorporate whatever suggestion you have.

Thanks, I’m currently working on the setup, I’ll post the outcome when I’m more happy with the results… I’m still getting some issues (dangling volumes from samba, wrong userids, unaccessible folders), but moving slowly forward as a night-time hobby ;-). I’m not as good as local gurus (hats off, Rich), but also thought of learning (reusing/tailoring) ansible to automate some of the steps to make it easier. If someone needs help sooner, I can try (most things currently work).

1 Like

Couldn’t sum it up any better. Started here around two years ago, and still feel somewhat stupid, even though the tutorials that I wrote are probably not that bad. :wink:

Anyway, as soon as you have something, let me know. We could also go ahead and move the entire docker-compose.yml to Github.

I just got a Zigbee device and considered to go the zigbee2mqtt-route. Instead I just installed the Zigbee-Binding, which works like a charm as well.

This is a great setup! Thank you very much!

I have to change it a bit to work for my needs. I like the setup where the persistent data from the dockers is saved in the host file system, like it is done in the openhab/docker-documentation.
I don’t need duplicati this way, and also I don’t need
But I am struggling to get it right for frontail:

can't open '/var/log/openhab/events.log': No such file or directory
can't open '/var/log/openhab/openhab.log': No such file or directory

I think I should change the location of the logfile to where it is on my host, but how? I changed it like this, but it’s not working.

      #- /var/lib/docker/volumes/openhab_data_openhab_userdata/_data:/openhab/userdata:ro
      - /var/lib/docker/volumes/openhab_data_openhab_userdata/_data:/opt/openhab/userdata/logs:ro

And also I wonder how to set this correctly for influxdb and grafana too. Do I have to make users ‘influxdb’ and ‘Graphana’ and set the user-id’s just the way it is handled for openhab?

Unfortunately not able to answer your question. Tbh, I was pretty happy to get everything working the way I wanted and put it into this step-by-step (especially on the volumes I have to admit that I have not fully understood this topic), so I hope there’s someone else out there with more basic understanding.