How do I view the USB devices with HASS.io?

I haven’t used docker before, but when I used Hassbian, I had my Z-Wave/Zigbee combo stick showing up as /dev/ttyUSB0. Now when I SSH in to Hass.io, I don’t see it, but it still appears to work.

What do I need to do to view this again, and do I need to modify something so it appears everytime HASS.io starts?

1 Like

I have the same question. Bump.

3rd, wondering… :slight_smile: Also how to restart hass.io / check status / start it from ssh + enter open z-wave configurator?

Found how to find the USB serial ports.

It’s part of the Hass.io CLI.

  1. SSH to [email protected]

  2. You’ll have this prompt: addon_core_ssh:/config#

  3. type: hassio help

  4. you’ll see:

    ---- Hass.IO Cli ----

    HomeAssistant:
    $ hassio homeassistant logs
    $ hassio homeassistant restart
    $ hassio homeassistant update

    Host:
    $ hassio host hardware
    $ hassio host reboot
    $ hassio host shutdown
    $ hassio host update

  5. Type: hassio host hardware

  6. It will spit out a report that includes your USB serial paths. See the example output below.

    {
    “result”: “ok”,
    “data”: {
    “serial”: [
    “/dev/ttyACM0”,
    “/dev/ttyACM1”
    ],
    “input”: [],
    “disk”: [],
    “audio”: {
    “0”: {
    “name”: “bcm2835 - bcm2835 ALSA”,
    “type”: “ALSA”,
    “devices”: {
    “0”: “digital audio playback”,
    “1”: “digital audio playback”
    }
    }
    }
    }
    }

Hope that helps.

4 Likes

I have the same problem - my Hassio home page says

The following components and platforms could not be set up:
zwave
Please check your config

If I type hassio help I don’t have a “hardware” command

---- Hass.IO Cli ----
HomeAssistant:
$ hassio homeassistant logs
$ hassio homeassistant restart
$ hassio homeassistant update

Host:
$ hassio host restart
$ hassio host shutdown
$ hassio host update

I am SSHing to [email protected] but I don’t get the addon_core_ssh: prompt - I’m just in the container that HAss in running in.

Is there something else you did to get that point?

Incidentally - hassio homeassistant logs makes no mention of a ZWave error.

You can also try with the below command to find the USB device

dmesg | grep tty

Example output:
410a59064fdb:~# dmesg | grep tty
[ 5.003385] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0

1 Like

I’m in the same boat. I don’t have the ‘hassio host’ commands.

I get all the options apart from hassio host hardware. I wonder why that is?

I only get addon_core_ssh:~# and not the config part.

I don’t even get addon_core_ssh:~#.
I get f53c6c2b****:~#, where the asterisks are four different characters, but hidden incase it reveals anything. It appears to be a MAC Address.

You should update the ssh add-on, it is a recent addition.

1 Like

Oh, that fixes everything. Thanks

Hi,
Everything works fine for me with the below command. However I have a Z-wave and a RFXtrx controller and after a restart they could change “ttyUSB0” <-> “ttyUSB”" with each other.

Is there someway to create a persistent link on hassio for the USB?

core-ssh:~# hassio host hardware
{
  "serial": [
    "/dev/ttyUSB0",
    "/dev/ttyUSB1"
  ],
1 Like

HI ,

strangest thing, I can see the usb drive in the dmesg command, but when i hassio host hardware, no Usb is displayed?
do i need to activate it first somehow? id like the logs and db to be written to the usb, or decide to write them to my NAs. Since that is shutdown in the night, i thought an attached usb would be a good starter. Now how to find it and command Hassio to use it. the Recorder page won’t give much info on that.

please have a look:

core-ssh:~# dmesg | grep usb
[    0.150537] usbcore: registered new interface driver usbfs
[    0.150625] usbcore: registered new interface driver hub
[    0.150724] usbcore: registered new device driver usb
[    0.638273] usbcore: registered new interface driver smsc95xx
[    1.039446] dwc_otg 3f980000.usb: DWC OTG Controller
[    1.039480] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[    1.039514] dwc_otg 3f980000.usb: irq 62, io mem 0x00000000
[    1.039784] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.039798] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.039810] usb usb1: Product: DWC OTG Controller
[    1.039822] usb usb1: Manufacturer: Linux 4.4.50 dwc_otg_hcd
[    1.039834] usb usb1: SerialNumber: 3f980000.usb
[    1.041415] usbcore: registered new interface driver usb-storage
[    1.164675] usbcore: registered new interface driver usbhid
[    1.164679] usbhid: USB HID core driver
[    1.414342] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    1.614682] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    1.614703] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.894382] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    1.994579] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    1.994593] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.056896] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:19:41:e3
[    3.074337] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[    3.175090] usb 1-1.4: New USB device found, idVendor=0781, idProduct=5581
[    3.175104] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.175110] usb 1-1.4: Product: Ultra
[    3.175116] usb 1-1.4: Manufacturer: SanDisk
[    3.175122] usb 1-1.4: SerialNumber: 4C530001221006122243
[    3.175752] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[    3.176414] scsi host0: usb-storage 1-1.4:1.0
[    3.735774] usbcore: registered new interface driver brcmfmac
core-ssh:~# hassio host hardware
{
  "serial": [],
  "input": [],
  "disk": [
    "/dev/sda",
    "/dev/sda1"
  ],
  "gpio": [
    "gpiochip100",
    "gpiochip0"
  ],
  "audio": {
    "0": {
      "name": "bcm2835 - bcm2835 ALSA",
      "type": "ALSA",
      "devices": {
        "0": "digital audio playback",
        "1": "digital audio playback"
      }
    }
  }
}

Did you ever figure this out

no not yet,
havent found any info on this, and no reaction whatsoever in the forum… :wink:
i did read about several adventures but they weren’t on Hassio, so id rather wait for dedicated hassio setup instructions from the dev’s.

cheers,
Marius

Hi,
I have a similar problem, I attached a harddrive:

core-ssh:/share/pidrive# hassio host hardware
{
  "serial": [
    "/dev/ttyAMA0"
  ],
  "input": [],
  "disk": [
    "/dev/sda1",
    "/dev/sda"
  ],
  "gpio": [
    "gpiochip0",
    "gpiochip100"
  ],
  "audio": {
    "0": {
      "name": "bcm2835 - bcm2835 ALSA",
      "type": "ALSA",
      "devices": {
        "0": "digital audio playback",
        "1": "digital audio playback"
      }
    }
  }
}

But then I can’t mount it:

# mount /dev/sda1 /share/pidrive/
mount: permission denied (are you root?)

Hi!
This thread actually has two problems.
First is not finding your USB Z-Wave controller, but that I believe is fixed with the new version of the SSH add-on.

The second one is not being able to mount your USB disk devices. I’ve been trying to work around this one for a while with a lot of help from @frenck. (thanks again!)
Apparently no add-on is allowed to mount your disk devices unless explicitly stating that in the config.json file of the add-on. What I am working on now is to nail together an add-on that serves my needs (DLNA and torrent client using a USB HDD) but in the meantime I realized that if you want to mount your disks for something there is a way. I have to admit it is not easy and also not user friendly:

  1. download Frenck’s terminal add-on’s code from github to your computer: https://github.com/hassio-addons/addon-terminal
  2. modify the config.json file of the add-on and add access to your /dev/sda1 device
    you need to add these lines:
    “devices”: ["/dev/sda1:/dev/sda1:rwm"],
    “privileged”:[“SYS_ADMIN”]
    make sure that the JSON file is still valid, don’t just add this to the end of the file
  3. upload your hacked terminal into the Raspberry PI’s /root/addons folder
  4. in Home Assistant go to hass.io’s add-on market and refresh
  5. install your new terminal as a local add-on (try to make sure that you’ve stopped the original one prior to starting your version)
  6. log into your terminal and mount your drive as you wish to do that

If the local add-on is not showing up you can go into hass.io’s supervisor logs in the advanced settings and see what’s wrong there.

The reason why this works is somewhat explained between the lines of this page: https://home-assistant.io/developers/hassio/addon_config/

Once again this is a hack, I would not recommend it to anyone unless you know what you are doing, also most cases you don’t need to access a USB drive in hass.io at all, you should be able to access your backups for example through SSH and Samba.

Let me know if you have questions!
Regards!
B

2 Likes

HI, cool you’re doing this. I think it would be of utmost value if we could easily use the usb drives in the Pi3 Hassio install. As a matter of fact, ive asked @frenck over twitter if his latest Backup add-on will support this.

Ive changed from a simple hassio setup to one using the maria Db because i feared the Db getting out of hand, and hoping i could write that to a usb drive, as not to risk corrupting my main setup in the root. Creating backups on usb would be a big second reason for USB support.
I hope this will be realized sooner than later, because even as I write this, i can see the disk usage of my 32 gb card reach over 50%… And i’ve only been using HAssio for 2 months now :-((

So, no hack, but built-in functionality is needed !
Cheers and hope you can forge this with Frenck, he’s been known to write wonders :+1:

Initially, probably: no.

I’ve talked with @bboti86 on Discord quite a lot about this problem. The method described by @bboti86 works but is not a sustainable solution. For example, everybody would run all kind of forks add-on to mount their specific drives in specific places.

I’m currently looking into several “possible” solutions.

please do, would be a number 1 add-on!