[APP][Pro] FTP Client - Control FTP Servers through a directory-based UI in the Homey App or Web App

@Arie_J_Godschalk
a directory normally does not need an extention, or do i miss something here??
I think the snapshot tag itself is already the name of the file…

But i tested it and it does not work.
When i use an FTP program to same location and login with same user i can upload without any error, so on serverside everything works…

i created 2 diagnostics:

  1. with extention: c07094df-5b9b-4fba-9e38-777a87e02d0e
  2. without extention: e860a840-5f7d-439b-93ae-00986f274d6a

(please read also changes to my last post regarding path and filename)

You are saving it as /home/screenshot

i didn’t know about the x.jpg name, and i don’t use it. You pick a name to save it to right here.

Ill take a look, one moment.

Maybe you should change the name of the field into filename instead of directory…

But when i use an extention i also get the same error.

I hope you can find the error in the diagnostic files

Do you use Micro Web Server sa ftp server?

There are 2 fields, directory (preselect) or raw path.
But i’ll look into a good description :slight_smile:

Well, i just got this throw a token, so no:
image

i upload to a synology nas, so the ftp server is a NAS.

On homey i installed the ftp client and entered the NAS ftp logins and that is it.
I use the upload card in a flow and try to upload a snapshot from my doorbell camera to the FTP server.

About the file naming, when i send the snapshot using email then the images are always named x.jpg, that is why i mentioned the file name…

But i do not understand now what i am doing wrong here and why it is not working.

Its a bug. Update coming.

Okay, i have just uploaded the latest version to live.
Try it?

Each FTP server handles stuff differently, but this one works on a couple of ways.

Okay, i am off.

If it doesn’t work, ill take a look later. But im hoping it does actually.

And the name, ill think about it, now that i know there is an filename in the image tag (didn’t know that, so thanks!)

After the update my screenshot was succesfully uploaded and also with the name i specified
2022-11-03_012353

1 Like

@Peter_Kawa would you test yours again also? It should work.

@Arie_J_Godschalk
The upload of snapshot work to synology FTP but i discovered something else…

The last field is obligated and it seems that this is the filename which is used for saving.
This is good, but sadly this is not dynamic, this means that the saved file is overwritten each time your run the flow.

I wanted to use the time card to make the file name dynamic but that had a very strange effect on the filename on the server itself. For example:
2022-11-03_ 122844
2022-11-03_ 122850

So what i want to request is (if possible):

  • if field ‘path’ (last field in card) is left blank (at the moment you must fill this in) use then the filename which is used by the snapshot card itself, i noticed in your former replies that this name was an (unique) id, so this is dynamic!
    or/and
  • add flow tag to choose unixtimestamp (or seconds) which you can use as name: <tag_unixtime>_xxxxx.ext this would result in saving in my example something like: 123457_deurbel.jpg or seconds <tag_seconds>xxxxx.ext would result in filename: 56deurbel.jpg etc

[offtopic]I requested in the past in other topic the usage of a seconds tag card (beside time card) and this is one of the example where such second (or unix) card could/would become very handy…[/offtopic]

Maybe you or someone else has even a better idea to save the snapshot with a dynamic name to prevent overwriting?

No, that unique number that you saw is from the app itself: i passed that image to an AVD from DC.

And recieved a token for the device-image-token.
So, that unique number is something i generated :wink:

But yeah, i am looking into how i can manager the file names.
But i first need to think of the correct solution.

But your TEMP solution, at least how i see it currently beeing used, generated a unique token through a card, like: HomeyScript or Device Capabilities–> expression:

image

new Date().getTime()

This will get you a unique number.
If you want a unix timestamp: Math.floor(new Date().getTime() / 1000)

1 Like

Yeah, if you use the Device Capabilities app, you can pre-define javascript functions in the App Settings.
Or use HomeyScript ofc, it can do the same (but not set variables with it or AVD fields).

And the most unique timestap i use is just the newDate.getTime() it gives the unix timestamp but with miliseconds.

thx, currently found this temp solution:
2022-11-03_ 131504

I was playing with this card and it worked perfectly and then i was thinking if it was possible to receive and url back after uploading to open and use the just uploaded snapshots?

Why?

In my example i upload a snapshot when someone presses the doorbell, in the rest of the flow i use this shapshot many times (for viewing on TV, wall tablet, send push message etc).
But eachtime i use an other snapshot tag i receive a new image from the camera’s, they are different from ones i uploaded.
So i was thinking, is it possible after uploading to get an url back which i then can use to retrieve the uploaded image and use that specific image in my flow, that way in may flow i have always the same image!

If that would be possible (in the future) that would be great.

thx!

Yeah, i have read your timestap-tag question.
And, not sure if i replyed this then, i don’t think a tag is the best way.
For instance, having a millisecond timestamp, like i would want myself, would require a constant update of the tag. Overloading your Homey.

But, i’ll create a actioncard with a list of timestamp-sort to pick from (or create your own), so you just need a flowcard with dropdownlist and use that tag.
And this will only be executed when needed, so it’s not memory heavy for Homey.

Good idea!

Do you mind creating a ticket at QlusterIT / nl.qluster-it.FtpClient / issues — Bitbucket?
Then you can track it.

I have the night/diner off at least, so i’ll pick it up later.

i created a ticket

1 Like