Screenly Forum

Upload Assets via ssh?

Can I use ssh (scp or rsync) to copy assets over into a new Screenly installation?

What location would I drop the assets into?
And then, how can I tell screenly: you have them in /home/pi/media123, lets setup each schedule.

Would this be possible?

Thank you!

I don’t have the complete answer for you, but this answers some of your question.
/home/pi/screenly_assets #dir where assets stored,
The above dir is does not have your native filename, it has the asset ID as the filename, once you upload via the web interface an asset, it gets logged into the DB and a hex filename is your asset, eg. e779b0b8d4064d40b6df83cdfdf4
How you would automate this part I don’t know.

I have an asset that I want to kick in at a specific time, then in the morning , revert to the regular day time assets, to do this I have to know which ID to activate via cron job, so I store the after hours assetID in a file, and throughout the regular hours, get the current active assets, something like this is the basics.
Write a bash script to automate it all… BTW, I have this in pi’s crontab.

#this disables $assetid
curl -u admin:mypass -H “Content-Type: application/json” --data ‘{“is_enabled”: “0”}’ -X PATCH http://localhost/api/v1.2/assets/$assetid

#this enables $assetid
curl -u admin:mypass -H “Content-Type: application/json” --data ‘{“is_enabled”: “1”}’ -X PATCH http://localhost/api/v1.2/assets/$assetid

hope it helps.

1 Like

@luisscreenly that actually helps.
It gives me a more complete understanding of how screenly works in the backend.

I think what I’m going to do it is first download all assets off the screenly-rpi-#1.
Then later copy them over via the web interface to the screenly-rpi-#2.

It’s a little bit running around, yet it’ll work for now.

Thank you!