Home Assistant Community Add-on: FTP

Chriszzzz,

I struggled with this, I was not able to locate the files on the disk. I am sure if my docker skills were better I could have sorted it out.

My solution (only found this week) was to add /share to the white listed folders in the addon config and configure my camera to use /share. This solved my problem, as /share is accessible from node-red ) as I am using node-red for some reasonably complex automations (pool solar heating optimisation using tensor flow) so it was a no brainer to do it there.

This should solve the problem of files being deleted on restart

Chris

{
      "username": "camera",
      "password": "redacted",
      "allow_chmod": true,
      "allow_download": true,
      "allow_upload": true,
      "allow_dirlist": true,
      "addons": false,
      "backup": false,
      "config": false,
      "share": true,
      "ssl": false
    }

I will create a pull request to update the documentation

Looks like a very nice addon! Would it be possible to upload video files from security cameras and then access the files from the Lovelace interface? Thinking that this could be a nice way to handle security camera recordings.

Yes, if you save the files to a subdirectory of /share/ or /config/www then they should be easily accessible in love lace. You enable access to /share /config in the configuration

1 Like

Awesome, thank you! And then I should be able to create a card that lists the files for easy playback?

I have an usb hard drive that I want to mount to my rpi 4 running hassio so my IP cameras can store the recorded videos on that disk using FTP. Could that be done somehow?

Seems like the biggest problem is mounting the usb drive to /share or similar?

Hi,

I have not tried this but have you looked at

External USB drive for Hass.io snapshots ?

It might help

:tada: Release v3.1.0

Full Changelog

This is a general maintanance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v5.0.1
  • :arrow_up: Upgrades openssl to 1.1.1d-r0
  • :fire: Removes secrets support, now natively supported by Hassio

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v3.1.1

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades add-on base image to v5.0.2

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

I would like to use the FTP add on and did the setup.
I configured my foscam camera for FTP, but when i hit test on the camera i get “FTP server login failed”

The log from the add on is as follows;

Thu Dec 19 20:58:59 2019 [pid 2] CONNECT: Client "192.168.1.124"
Thu Dec 19 20:58:59 2019 [pid 2] FTP response: Client "192.168.1.124", "220 Welcome to the Hass.io FTP service."
Thu Dec 19 20:58:59 2019 [pid 2] FTP command: Client "192.168.1.124", "USER"
Thu Dec 19 20:58:59 2019 [pid 2] FTP response: Client "192.168.1.124", "331 Please specify the password."
Thu Dec 19 20:58:59 2019 [pid 2] FTP command: Client "192.168.1.124", "PASS <password>"
Thu Dec 19 20:58:59 2019 [pid 2] FTP response: Client "192.168.1.124", "503 Login with USER first."
Thu Dec 19 20:58:59 2019 [pid 2] FTP command: Client "192.168.1.124", "QUIT"
Thu Dec 19 20:58:59 2019 [pid 2] FTP response: Client "192.168.1.124", "221 Goodbye."

I don’t really understand what is the problem, it seems authentication related.
Hope someone sees the problem.

:tada: Release v3.2.0

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :fireworks: Updates maintenance/license year to 2020
  • :pencil2: Funding adjustments
  • :pencil2: Fixes some spelling and grammar
  • :books: Adjust add-on installation instructions
  • :arrow_up: Upgrades add-on base image to v6.0.1
  • :arrow_up: Upgrades gcc to 9.2.0-r3
  • :arrow_up: Upgrades linux-pam-dev to 1.3.1-r1
  • :arrow_up: Upgrades musl-dev to 1.1.24-r0
  • :arrow_up: Upgrades openssl to 1.1.1d-r3
  • :pencil2: Fixes some spelling and grammar

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work:
https://github.com/sponsors/frenck or https://patreon.com/frenck

Hi Franck,
I just installed Home Assistant Add-on FTP and everything went well. No errors in log. But how do I start vsFTPD? I can’t find any documentation.

If you start the add-on, it will start the server as well.

Right, but how do I see the FTP UI? What do I have to do further to use it? How can I copy files? How to delete them?

It is a server, not a client.

Anyone having trouble with Hik cameras uploading? I get the thing to connect and create the test file but no image. Running DS-2CD2385FWD-I/G without SD card, passive FTP forced.

Thanks!

I’m using this addon to backup my Hassio setup and I get the following error:

CONNECT: Client "192.168.2.40", "Connection refused: too many sessions."

It’s like a new connection is open for each file request. How to keep the connection open until I get all files ?
here is my config:

{
  "port": 21,
  "data_port": 20,
  "banner": "Welcome to the Hassio FTP service.",
  "pasv": true,
  "pasv_min_port": 30000,
  "pasv_max_port": 30010,
  "pasv_address": "",
  "ssl": false,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "implicit_ssl": false,
  "max_clients": 5,
  "users": [
    {
      "username": "hassio",
      "password": "**********",
      "allow_chmod": false,
      "allow_download": true,
      "allow_upload": false,
      "allow_dirlist": true,
      "addons": false,
      "backup": true,
      "config": true,
      "share": true,
      "ssl": false
    }
  ]
}

:tada: Release v3.3.0

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :books: Update add-on documentation to use new YAML configuration format
  • :hammer: Update add-on config with new password & list features
  • :hammer: Re-branding
  • :arrow_up: Upgrades add-on base image to v7.0.2
  • :hammer: Update community forum links
  • :hammer: Don’t use apk cache on cleanup

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work:
https://github.com/sponsors/frenck or https://patreon.com/frenck

Thank you for this great add-on. I have a question:
I was using Hassbian, and in the ftp server I was using “upload scripts”, this is a script that is executed each time a file is uploaded, receiving file path as parameter https://linux.die.net/man/8/pure-uploadscript. I was using it, so each time a camera with motion detection uploaded an image, I send it to my mobile device using Telegram.

But now that I’m using Hass.io I fear I can’t do it. Is this possible with your add-on?

my camera (with latest software) use FTP to upload pictures by event and it possible to put only at / directory by FTP. It’s not possible to set directory name, only /
But Home Assistant doesn’t see this FTP… ((
How to use this FTP service with my camera and Home Assistance (hass.io with docker)?
Is it possible to add option to use FTP chroot as /share of docker?

I was hoping to use this in conjuction with https://github.com/samccauley/addon-hassiogooglebackup to sync my Cameras to Google Drive.

Step 1: Installed this and set-up a profile
Step 2: Set google backup to upload all //.mp4 files

This works perfectly, however the Google Backup created supports purging old files (perfect, saves my local hard drive space).

I get an read-only message from the system due to user permissions. Anyone know how I can ensure vsFTP sets permissions so that any one can access the files? (i can’t see how to set the UMASK).

Also open to better ways to do this!