USB access for RockOn

Hi. I am running the HomeAssistant rockon and need to give it access to my USB Z wave stick. Can anyone point me in the right direction please? Found plenty of examples for other systems but I can’t seem to find the relevant files to alter. Thanks!

Did you ever receive an answer on this? I am looking for the same info?

Chas

Hi,

I’m not familiar with this particular rock-on, but trying to mount Z-wave stick device at docker run time should be a good start (at the very least), and it apparently seems to have been the way to go for some users, although with some variation:

As to how to apply this to the Home Assistant rock-on, we unfortunately do not support adding a device to an already installed rock-on (although this is on my to-do list). We do have the option to add a device at the install step, however, if the JSON definition file is altered to support it. As the latter is optional, this could be a valuable addition to this rock-on.
If you want to try this option, you’ll find some documentation on the rock-on devices object in the README:

An example of a rock-on using this feature is Emby, with the following:

I could be completely out of the park here, but this could be the answer to this issue. As I mentioned earlier, I do plan on making it possible to mount a device to a rock-on post-install, but I do have other aspects on my list first, however.

Hope this helps,

1 Like

Flox, I apologize for my lack of understanding. As I read the information that you sent, I think that I am following the gist but kinda lost on the specifics.
Please feel free to speak to me like a 5 year old.
What I believe you are telling me is this:
In order to have HA use the Zwave usbstick, I will need to edit the Json for HA before installation. Yes?
What info do I enter ?
I pulled [root@rockstor ~]# crw-rw---- 1 root dialout 166, 0 Apr 18 08:32 /dev/ttyACM0
With this command; [root@rockstor ~]# [root@rockstor ~]# ls -ltr /dev/tty*|tail -n 1
and this: [root@rockstor ~]# [36905.828554] cdc_acm 8-1:1.0: ttyACM0: USB ACM device
With ; [root@rockstor ~]# dmesg | grep USB

My guess is that I need to do something like this;
“devices”: {
“ZwaveUSBStick”: {
“description”: “Optional: /dev/ttyACM0. Leave blank if not needed.”,
“label”: “ZwaveUSBStick”
}
},
But I’m also pretty sure that if I try this I will find myself FUBAR

Am I even in the right Zip Code?

Chas

Hi @kysdaddy,

First, let me apologize for such a delay in getting back with you with regards to this… I should have been a lot quicker than that. I am sincerely sorry.

The good news, is that you were absolutely correct and that your edits are following the proper syntax. I tried an edited version of the json file including your changes, and it works as intended.
Now, to actually use them, I see two points for now:

  1. If these changes actually do allow you to use the Zwave stick, it would be really helpful if you could submit an issue and corresponding PR on the rockon-registry repository on Github (linking to this forum thread for context) so that this change can be integrated with the default Home assistant rock-on.
  2. If you want to start testing whether mounting the ZWave usb stick works when mounted this way–as the link from the Home assistant community I shared above seems to indicate–you will need to create a separate rock-on in the rockons-metastore folder (as explained in our readme here). In order to prevent conflicts, however, you will need to change the rock-on name and container name, such as I did below for instance:
{
  "Home Assistant with Device": {
    "description": "Home Assistant is an open-source home automation platform running on Python 3. Track and control all devices at home and automate control.",
    "ui": {
      "slug": ""
    },
    "website": "https://home-assistant.io/",
    "version": "1.0",
    "containers": {
      "home-assistant-device": {
        "image": "homeassistant/home-assistant",
        "launch_order": 1,
        "opts": [
          [
            "--net",
            "host"
          ]
        ],
        "devices": {
          "ZwaveUSBStick": {
            "description": "Optional: /dev/ttyACM0. Leave blank if not needed.",
            "label": "ZwabeUSBStick"
          }
        },
        "uid": -1,
        "ports": {
          "8123": {
            "description": "Home Assistant UI port. You may need to open it(protocol: tcp) on your firewall.",
            "host_default": 8123,
            "label": "Server port",
            "protocol": "tcp",
            "ui": true
          }
        },
        "volumes": {
          "/config": {
            "description": "Choose a Share for Home Assintant configuration.",
            "label": "Home Assistant Config"
          }
        }
      }
    }
  }
}

It will create a duplicate Home Assistant entry in your list of available rock-ons, however. It is also important to note that this rock-on uses the --net=host option, which means that the port mapping is pretty much ignored and has the following consequences:

  1. Port 8123 needs to be the value entered for the port number during the rock-on install. You will see that Rockstor will use by default 8124 for this duplicate json as 8123 is already supposed to be in use by the original Home Assistant rock-on. Make sure to input 8123 during the rock-on install.
  2. If port 8123 is already in use by something else on your machine, you will likely get conflicts.
  3. You can input a different port than 8123 during the install, but then the UI button will direct you to a non-functional address, as the home-assistant server will only be accessible at port 8123. That’s actually something we can try to better account for and deal with in the future.

Thanks for keeping us updated, that seems like a very nice addition if that can make Home assistant to work with the Zwave stick.

1 Like