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

Not yet, but there will be :wink:

Okay, next up:

  • Flowcard: You can retrieve all files from a folder as JSON Array/Collection.
  • Flowcard: Get a Image Token from path.
    This one is actually the same flowcard as Get Image Token from dropdown, i added a optional sub-path to it).

What can you do with it (not write yet, that’s next @B3rt :wink: ) :

You can Loop through all files in a folder and do something with the images, like send them to your phone, or (maybe later) save them on an external FTP somewhere.
You can also loop through them and set them as images for the AVD camera.

Use the JSON Handler to loop through a collection within flows:

In this flow from left-to-right, top-to-bottom:

  • Retrieve all files from the Images directory.
  • Start Set Camera Image for each Item in the Files Collection and wait to finish.
    • Set Camera Image is started with item for each item in the collection.
    • Retrieve Image Token for item.
    • Set the image of Test image (AVD Camera) to Image-Token.

JSON Handler, Device Capabilities and the FTP Client app al in in test/review.

1 Like

Okay @B3rt , @HuisCHovens and @Peter_Kawa : Save an Image Token to FTP is now in test:

I did make a few important changes in the sourceode, so please test it well :wink:
image

Directories are created if needed.

It’s in test now!

I’m still testing JSON flow, I can’t get a pic out of it yet :upside_down_face:

Tried the anonymous MWS and my NAS, send pics to messenger next to the AVD cam.
I can’t run the flow in Test mode, while the JSON triggercard doesn’t get triggered :wink:
At least the ‘Get files’ card and ‘Start Nas-cam-pics’ card don’t error in flow testmode.

But you can execute the Get Files and get the resulting token.
Now take out one filename out of the array, without quote’s, just the path-and-filename, and manually execute the trigger with that filename.

And, share the resulting token with me please?

You mean this triggercard? Because it doesn’t work with the "Get files from …(JSON) triggercard.
Screenshot from 2022-10-29 14-50-32

Findings:
FTP GET

  • with 1 file in a folder:
    (Files (JSON)) result =
    [“peterdeedash/assets/devices/AndroidPhonePortraitChrome.jpg”]

  • with multiple files in a folder:
    (Files (JSON)) result =
    [“foto/2019/Navarone_Paradiso/20191022_212302.jpg”,“foto/2019/Navarone_Paradiso/20191130_210708.jpg”]

Timeline notifications with the tags from the JSON Handler trigger card:
index: 0 — itemNo: -1 — Item text: foto/2019/Navarone_Paradiso/20191022_212302.jpg — Key: 0 — Text1:

index: 1 — itemNo: -1 — Item text: foto/2019/Navarone_Paradiso/20191130_210708.jpg — Key: 1 — Text1:

The cards which “send [image]” don’t seem to respond. I used these 3 cards:
Screenshot 2022-10-29 at 15-01-21 1.HomeyPro Peter

I tried this with the path-and-filename with the GET image token card, it does not trigger any cards

Hey Peter, would you try this one with “foto” as Select An Image Or Directory, and the rest (2019/Nava…) in the path field? And check if that works?

Hi Arie, I thought you were off for the weekend :wink:

It does not matter if i use a / in front of 2019/Nava… or not
Screenshot from 2022-10-29 15-48-21

Same error for when I pick the path, and only enter the filename with or without /
Screenshot from 2022-10-29 16-17-13

1 Like

Im just on my phone :wink:

1 Like

I’m off, and you’re off too :wave::stuck_out_tongue_winking_eye:

1 Like

In the last image, you have a slash to much at the start of the path, there already is a slash there.
(Ill also fix it in the source to filter out two slashes.

I tried with and without the slash, it made no difference. But now I know the slash in the card is included in the path :upside_down_face:

1 Like

Try it with the newest Test version?

I found a possible bug (let’s eat themz bugz).

If it still doesn’t work, try it, and send me a diagnostic after.

1 Like

New Flowcard in FTP Client:

Get an Image Token from URL
image

This replaced the Image Grabber App.

Hey Arie, thanks for the efforts.
I can’t see a difference, I’ve sent you the diags for both apps.
The JSON Handler trigger works, both images are being passed on:

But the FTP card Get an Image Token for [tag] does not yet fire the cards on it’s right hand side.

First of: What happends if you double-click/download the file in the Repairscreen?
Does the link open? Do you see the image in a opening browser?

Yes, it shows the pics in my browser. I’ll pm you the link

I noticed that the option is added to upload an image using snapshot tag cards.

I am not sure how this works, it seemed very simple but i get an error when i try it.
Has someone this working and can explain to me what i am doing wrong?

The snapshot tag has an image, if i mail it i receive and can view it.
The directory is chosen from the list, the path is an existing folder name of the chosen directory.
So it should work, but it isn’t and i get an error:

2022-11-02_ 224648

If i understand it correctly it will upload the snapshot:
/home/screenshots/x.jpg
x.jpg are all snapshots named by Homey (dunno why).

Maybe add an option to save the file with an own chosen filename…

I think you need to give it an extention also, try screenshots.jpg?

If it doesn’t work, send me a diagnostic?