Will collect files from remote pi-networked-counters and upload them to a sharepoint site.
- create a key on the server running the sharepoint uploader using ssh-keygen
- add the generated public key to each counter pi in the ~/.ssh/authorized_keys file
- Install packages:
sudo apt install < .packages
- Clone repo:
git clone https://github.com/rassweiler/python-sharepoint-uploader.git
- Create the .setup.toml file (Rerplace IDs with proper values):
[local]
save_folder = './RemoteFiles/'
[remote]
targets = [{ip = 'IP_ADDRESS', username = 'NAME', location = '/home/NAME/pi-networked-counter/exports/'}]
[sharepoint]
authority = "https://login.microsoftonline.com/AID"
client = "CID"
scopes = 'User.ReadBasic.All Files.ReadWrite Sites.ReadWrite.All'
endpoint = "https://graph.microsoft.com/v1.0/me"
folders = [
{sub_folder="5m", site_id = "SITE_ID", list_id = "LIST_ID", remote_path = "DataCollection/5m/"},
{sub_folder="24hr", site_id = "SITE_ID", list_id = "LIST_ID", remote_path = "DataCollection/24h/"},
]