Skip to content
Software for easier syncronization between devices with these protocols: Bluetooth, ANT+, wifi, ethernet.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
database_settings.php
main.php

README.md

IoT_sync

Software for easier syncronization between devices with these protocols: Bluetooth, ANT+, wifi, ethernet.

REQUIREMENTS:
server: php, mysql-server, php-gd, php-mysql, nginx or apache, ssh, rsync.
client: php, mysql-server, php-mysql, ssh, rsync.

INSTALLATION:
FOR_BOTH_DEVICES
create a user called 'exclude'. then:
mkdir -p /home/exclude/files/outgoing
mkdir -p /home/exclude/files/incoming
mkdir -p /home/exclude/files/saved
then:
chown -R exclude:exclude /home/exclude/files

Place the files in a separate directory.
mkdir /home/exclude/exclude_program
chown -R exclude:exclude /home/exclude/exclude_program

Use sudo to login as exclude.
Start program with this command: cd /home/exclude/exclude_program && php main.php

Client
add a crontab job that sends the files between the hosts. [added soon]
crontab -l */1 * * * * /opt/exclude/scripts/backup.sh

cat /opt/exclude/scripts/backup.sh

rsync --delete -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /home/exclude/files/outgoing/ SERVERNAME:/home/exclude/files/incoming/

rsync --delete -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress SERVERNAME:/home/exclude/files/outgoing/ /home/exclude/files/incoming/

Example:
Create a file on one device in : /home/exclude/files/outgoing
Write: "SYSTEM:COMMAND:ifconfig -a" and save. After two sync periods you will have
a new file on the "saved" directory with the information you requested.

You can’t perform that action at this time.