• 1 Post
  • 92 Comments
Joined 2 years ago
cake
Cake day: June 1st, 2023

help-circle
  • I’d like to track these things:

    • movies/shows I’d like to see at some point
    • movies/shows I have in my collection
    • movies/shows I have watched (and when/how often)
      • and they should automatically get removed from the watchlist once watched

    I believe TMDB only does the first. And self-hosting makes sure the data stays under my control and the service doesn’t vanish or gets paywalled anytime soon.




  • mbirth@lemmy.mltoSelfhosted@lemmy.worldVine thermostat?
    link
    fedilink
    English
    arrow-up
    1
    ·
    14 days ago

    Isn’t a thermostat essentially an on-off switch connected to a sensor?

    Depends on your boiler. Some get a value from the thermostat depending on the difference to target temperature - which then makes the boiler control the heating intensity. And others just use an on/off kind of control.

    In this place I’m renting here, there’s a Honeywell CM927 on the wall and a BDR91 which, indeed, seems to be just a simple on/off switch.

    So, depending on your boiler, you could get away with a cheap Zigbee/Wifi switch module (mostly sold for lights - just make sure it has a separate switch circuit and is not sending live mains power to the boiler!) and feed room temperatures into Home Assistant via cheap temperature sensors. Then implement the whole heating logic in HA.

    (nb. Most newer thermostats “learn” how long it takes to heat up the room to the target temperature and will adjust the starting time of the heating process accordingly. This way, you never have to change your schedules between winter and summer. This is also something you’d have to implement yourself, if you want HA to do all the heating.)


  • Or just something as simple as using a SMB/CIFS share for your data. Instead of mounting the share before running your container, you can make Docker do it by specifying it like this:

    services:
      my-service:
        ...
        volumes:
          - my-smb-share:/data:rw
    
    volumes:
      my-smb-share:
        driver_opts:
          type: "smb3"
          device: "//mynas/share"
          o: "rw,vers=3.1.1,addr=192.168.1.20,username=mbirth,password=supersecret,cache=loose,iocharset=utf8,noperm,hard"
    

    For type you can use anything you have a mount.<type> tool available, e.g. on my Raspberry this would be:

    $ ls /usr/sbin/mount.*
    /usr/sbin/mount.cifs*  /usr/sbin/mount.fuse3*       /usr/sbin/mount.nilfs2*  /usr/sbin/mount.ntfs-3g@  /usr/sbin/mount.ubifs*
    /usr/sbin/mount.fuse@  /usr/sbin/mount.lowntfs-3g@  /usr/sbin/mount.ntfs@    /usr/sbin/mount.smb3@
    

    And the o parameter is everything you would put as options to the mount command (e.g. in the 4th column in /etc/fstab). In the case of smb3, you can run mount.smb3 --help to see a list of available options.

    Doing it this way, Docker will make sure the share is mounted before running the container. Also, if you move the compose file to a different host, it’ll just work if the share is reachable from that new location.









  • mbirth@lemmy.mltoSelfhosted@lemmy.worldSMB + Docker
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 month ago

    These variable names are dynamically parsed and used for generating the smb.conf.

    And if you need a way to support underscores AND spaces (which are not allowed in a variable name), you have to get creative.

    I like the solution as it allows me to encode any possible configuration value (even the most obscure one) in the compose file.




  • mbirth@lemmy.mltoSelfhosted@lemmy.worldSMB + Docker
    link
    fedilink
    English
    arrow-up
    17
    ·
    1 month ago
    # https://github.com/ServerContainers/samba
    
    services:
      server:
        image: ghcr.io/servercontainers/samba:latest
        restart: unless-stopped
        network_mode: host
        environment:
          TZ: Europe/London
          MODEL: MacSamba
          SAMBA_GLOBAL_STANZA: "vfs objects = acl_xattr catia fruit streams_xattr; fruit:nfs_aces = no; inherit permissions = yes; fruit:model = MacSamba; fruit:posix_rename = yes; fruit:veto_appledouble = no; fruit:wipe_intentionally_left_blank_rfork = yes; fruit:delete_empty_adfiles = yes; fruit:metadata = stream"
          SAMBA_GLOBAL_CONFIG_load_SPACE_printers: no
          SAMBA_GLOBAL_CONFIG_printing: bsd
          SAMBA_GLOBAL_CONFIG_printcap_SPACE_name: /dev/null
          SAMBA_GLOBAL_CONFIG_disable_SPACE_spoolss: yes
          SAMBA_GLOBAL_CONFIG_min_SPACE_protocol: SMB2
          SAMBA_GLOBAL_CONFIG_bind_SPACE_interfaces_SPACE_only: yes
          SAMBA_GLOBAL_CONFIG_interfaces: lo eth0
          SAMBA_CONF_SERVER_STRING: Docker Host Samba
          #SAMBA_CONF_LOG_LEVEL: 3
          ACCOUNT_shareuser: mypassword
          UID_shareuser: 1000
          # avahi seems to introduce issues with the share
          # "The operation can't be completed because the original item for "xxx" can't be found."
          AVAHI_DISABLE: true
          WSDD2_DISABLE: true
          #NETBIOS_DISABLE: true
          SAMBA_VOLUME_CONFIG_myshare: "[myshare]; path=/shares/myshare; valid users = shareuser; guest ok = no; read only = no; browseable = yes"
        volumes:
          - /path/to/myshare:/shares/myshare
    

    Just make sure you don’t have any local SMB server running on the host. And if you need multiple different shares, these all need to go into the same container or you need to define different ports if you use multiple containers.