[Answered] Any recommended load-and-go VM or Docker images for mysensors?


  • Hero Member

    I've read in the past how some people here have fairly sophisticated setups, involving, say, a combination of a mysensors gateway, node-red, mosquito, a database like influxdb or mysql, and graphina or chronograf or similar for charting, and maybe some kind of dashboard and/or some other home automation software. The database collects and stores all the data at even fine granularity, and the graphina allows for nice visualization of the data.

    I've read that there can be a single docker containing everything, and so that would mimic how you might do it on a bare metal install. I've also read that an alternative is to have each major component (mqtt, database, etc.) in its own docker container and communication piped between them. That sounds interesting. Not sure as to what the tradeoffs are between those different approaches.

    Andreas Spiess has done a few videos related to this topic, such as, for instance:
    #295 Raspberry Pi Server based on Docker, with VPN, Dropbox backup, Influx, Grafana, etc: IOTstack – 18:18
    — Andreas Spiess

    Rather than re-invent the wheel, are there any docker images available of similar setups already adapted for mysensors?

    This seems like it's the future for software distros, and it's already well established today. Even if you ultimately decide to run bare metal, it undeniably makes it easier/faster to try out different software and configurations, because they're already pre-installed for you.

    Unless I'm mistaken, such docker images should run on pretty much any hardware that's running docker. With help from @monte, I got proxmox setup on a small, low power Intel NUC here: https://forum.mysensors.org/topic/11607/best-pc-platform-for-running-esxi-docker-at-home/43?_=1615503273422. Anyone who wants to do the same can follow along there.

    I'm just getting started at this, so if there are alternatives--perhaps running inside a Linux container?--I'd be open to that as well. I suppose importing a fully configured virtual machine would be turn-key and perhaps the easiest thing to spin up. That's easy to do for free with proxmox, whereas, if I'm not mistaken, with ESXI importing or migrating VM's required a software license.

    Any recommendations?


  • Hero Member

    Well, I did find 14 mysensors images posted to docker hub community, including one with 50K downloads for uploading firmware to a mysensors node using MQTT:
    https://hub.docker.com/search?q=mysensors&type=image
    made by various individuals. Watsonbox is a docker for the mysensors raspberry pi mqqt gateway:
    https://github.com/watsonbox/rpi-mysensors-gateway-mqtt

    Separate from that I see that egeoffrey has a docker container:
    https://www.mysensors.org/controller/egeoffrey



  • Home assistant has a docker container which talks nicely with a mysensors serial gateway connected via USB on a Dell machine.

     homeassistant:
        container_name: hass
        image: homeassistant/home-assistant:stable
        volumes:
          - /home/server/homeassistant/:/config
          - /etc/localtime:/etc/localtime:ro
          - /var/run/docker.sock:/var/run/docker.sock
        restart: unless-stopped
        devices:
          - /dev/ttyUSB0:/dev/ttyUSB0:rwm
        healthcheck:
          test: ["CMD", "curl", "-f", "http://127.0.0.1:8123"]
          interval: 30s
          timeout: 10s
          retries: 6
        network_mode: host
        depends_on: 
          - mosquitto
    

    the following line enables serial gateway into HA and then in the latest release 2021.3 one can add Mysensors from UI

    devices:
          - /dev/ttyUSB0:/dev/ttyUSB0:rwm
    


  • No docker expert here, but I think docker-compose is intended to provide the functionality of logically grouping containers/dependencies, as apposed to combining products in a single container.

    It could definitely be helpful to maintain a few home automation compose "templates." For example, my template would be: OpenHAB, InfluxDB, Grafana, mosquitto.



  • @ncollins Yes, it is very easy to (re)deploy a whole system using the docker compose files.
    I have 4 splits --- one being my core containers , Homeassistant, Nodered, Mosquitto, etc and then one of them being "applications that I don't need but have".. I recently had to redeploy and my core stack was running in under 10 minutes..

    It is a very powerful tool.


  • Hero Member

    So far, the easiest way I've found to install Home Assistant is by creating a proxmox VM, which can be accomplished with a single-line cli command:

    bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassos_install/raw/master/install.sh)"
    

    as documented here: https://github.com/whiskerz007/proxmox_hassos_install

    When the bash is done you can spin-up the Home Assistant VM right away. 😃

    For installing Home Assistant on Linux, the easiest method is importing a Home Assistant VM, the second easiest method is loading a Home Assistant Docker container, and the least easy method is a manual install.



  • @NeverDie While I never used proxmox or VM, I did use the supervised install on Linux and then moved away from it. The advantage of supervised install is that you get the addon store but the disadvantage is that Supervisors starts to complain and moan as you install more containers on the host system.
    It then stops you from upgrading to latest versions and prevents addons to be updated. At that stage I decided to move away from a supervised install.


  • Hero Member

    @Puneit-Thukral I seem to have an addon store even though I simply loaded the VM and didn't do a supervised install:
    hastore.png
    Is what's pictured here the same as what you're referring to?



  • @NeverDie said in Any recommended load-and-go VM or Docker images for mysensors?:

    @Puneit-Thukral I seem to have an addon store even though I simply loaded the VM and didn't do a supervised install:
    hastore.png
    Is what's pictured here the same as what you're referring to?

    Yes this is the addon store of HA.


  • Plugin Developer

    The container image will be super easy to distribute.
    It contains all its dependencies in it. "no more not working in my environment philosophy".
    it is super lightweight compared to VM.

    I would like to point that MyController.org has a docker image.
    Version 1.x is managed by a community member: (available for x86_64 Linux arch): https://hub.docker.com/r/cdrocker/mycontroller

    Version 2.0 is in the development phase and natively supports the container.
    Supports for Linux x86_64, arm6, arm7, and arm64

    # version 2.0
    # run with default configuration
    docker run  -d --name mycontroller \
        -p 8080:8080 \
        quay.io/mycontroller-org/all-in-one:master
    

    Note: V2.0 is in the development stage, which means not ready for production. If you need metrics support install external influxdb(2.x).


  • Hero Member

    There is a mySensors "integration" that's easy to find in Home Assistant:
    mySenInteg.png
    It's easy to find in the section just beneath the "add-ons" section.

    Much less easy to find and install and get working was HACS (Home Assistant Community Store), which as you can see here provides access to over 800 additional other integration possibilities.
    HACS.png

    I'm very much impressed by all the integration options. Home Assistant even automatically found my ancient laser printer on the network and offered to integrate that as well, so now I can actually see in my dashboard what percentage of toner is left and how much life the drum has left on it. I don't believe that information was available even through the UI on the machine itself!
    HALaserPrinter.png
    😎



  • @NeverDie VM install is one with the supervisor.. yes this is what I was referring to. VM is one of the supported methods, I guess



  • @NeverDie MySensors via UI came in this release 2021.3. Prior to that it was through an entry (very simple one) in configuration.yaml.

    If you have cameras, 3D printer (running Klipper) - all that can come into HA. And Homekit via HA works great as well.



  • @jkandasa I am yet to use to Serial2Mqtt in order to test this out without breaking my current setup.. I will do it and share my feedback. I would definitely want to run Mycontroller in parallel to HA.


  • Hero Member

    Since I use multiple ESP8266's as gateways for interacting with my mySensors devices, I think I might simply use ESPHome together with influxDb and grafana for logging sensor data. For that purpose I'm guessing I could skip MQTT and Node Red as non-essential. Fewer moving parts, so less to go wrong and less to maintain. Also, VM's handle IP traffic with ease, so it's a natural fit.


  • Hero Member

    i.e. Something like this might be all I need for awesome sensor logging:
    Home Assistant Sensor Data Logging With InfluxDB & Grafana | Home Automation Tutorial – 09:16
    — bitsNblobs Electronics

    Since it's a logger, I could deploy it in addition to (rather than a replacement for) a regular mysensors installation. That way the stability of the regular mysensors system is maintained, but sensor data storage and visualization is greatly improved. 🙂


  • Hero Member

    Naturally, using Tasmota instead of ESPHome should work equally well.


Log in to reply
 

Suggested Topics

  • 18
  • 48
  • 5
  • 4
  • 27
  • 1
  • 6
  • 479

142
Online

10.2k
Users

10.7k
Topics

109.5k
Posts