TinyAutomator Edge Automation

TinyAutomator brings the power of Waylay automation technology to the edge, in response to the increasing global demand for edge automation solutions.

Download TinyAutomator

Waylay TinyAutomator

Run locally on any low-footprint Docker-enabled devices such as a Raspberry Pi or test your solution on the laptop.

Installation guide

Here you can find step-by-step instructions on how to install and run TinyAutomator. Once you have done it, please share your experience with us! Create your own automation rules, push data and enjoy the simplicity and easiness of the Waylay platform.


Hardware requirements: Raspberry PI 3 or 4 with 1 Gb RAM (2 Gb recommended), SD card for Raspberry Pi OS 16 Gb (32 Gb recommended)

Step-by-Step instructions

  • Follow the steps on https://www.raspberrypi.org/software/ to create an SD image with Raspberry Pi OS Lite and start the Raspberry Pi. Enable the SSH daemon.
  • Login to the Raspberry Pi: ssh pi@raspberrypi.local
    NOTE: Some ssh clients send locale settings that do not exist on Raspberry PI by default. Edit the /etc/ssh/ssh_config file on your PC and comment out the line containing SendEnv LC_*
  • Comment-out the line containing CONF_SWAPSIZE=100 in /etc/dphys-swapfile
  • Install the required packages: docker, docker-compose by following these steps in the UNIX shell:
sudo apt update
sudo apt upgrade

Reboot Raspberry Pi. Re-login after it has started back up and continue with:

curl -sSL https://get.docker.com | sh
sudo usermod $USER -aG docker
exit
<login again to raspberry pi console>
sudo apt-get install -y libffi-dev libssl-dev libnss3-tools
sudo apt install -y python3-dev python3 python3-pip
sudo pip3 install docker-compose
echo "deb http://ftp.de.debian.org/debian sid main" | sudo tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
sudo apt update
sudo apt install -y libseccomp2
sudo sed -i '$ d' /etc/apt/sources.list
sudo apt update
sudo dphys-swapfile setup
sudo dphys-swapfile swapon
  • Adjust the file named /etc/hosts on the Raspberry PI by adding standalone.waylay.io to the localhost line:
127.0.0.1 localhost standalone.waylay.io
  • Now your system is ready to run a Waylay standalone platform. Download docker compose file for ARM platform from the URL https://tinyurl.com/waylay-tinyautomator-alarmsarm :
wget -O tinyautomator-raspberrypi.yml  https://tinyurl.com/waylay-tinyautomator-alarmsarm
  • Start docker-compose with the downloaded file. This will start downloading and will eventually run the docker images with the Waylay platform services and open some ports to access those services. NOTE: Can take some time to download the docker images:
docker-compose -f tinyautomator-raspberrypi.yml  up -d
  • The standalone Waylay engine uses fake DNS names standalone.waylay.io. In order to access it, adjust the /etc/hosts file on your local PC where you will run a browser to access the Waylay Console with a standalone.waylay.io hostname that will be translated to the IP address of your Raspberry Pi. Eg.:
192.168.0.223    standalone.waylay.io

You can check the IP address of your Raspberry Pi by executing the “ip a” command on your Raspberry Pi and finding the IP address assigned to the network interface.

You can also watch the video here:

sudo usermod $USER -aG docker
  • Re-login to shell
  • Adjust the /etc/hosts file by adding standalone.waylay.io hostname to the localhost line:
127.0.0.1 localhost standalone.waylay.io
  • Now your system is ready to run a Waylay standalone platform. Download the docker compose file for X86 platform from the URL https://tinyurl.com/waylay-tinyautomator-alarms:
wget -O tinyautomator-x86.yml  https://tinyurl.com/waylay-tinyautomator-alarms
  • Start docker-compose with the downloaded file. This will start downloading and starts up the docker images with the Waylay platform services and open some ports to access those services. NOTE: It can take some time to download the docker images:
docker-compose -f tinyautomator-x86.yml  up -d

This Mac OS installation guide follows the same principles as the Linux one, with specific adaptations.

curl -L https://tinyurl.com/waylay-tinyautomator-alarms --output tinyautomator-x86.yml
  • Start docker-compose with the downloaded file. This will download and start the docker images with the Waylay platform services and open some ports to access those services. NOTE: it can take some time to download the docker images:
docker-compose -f tinyautomator-x86.yml  up -d
  • Adjust the /etc/hosts file by adding standalone.waylay.io hostname to the localhost line:
127.0.0.1 localhost standalone.waylay.io

You can run TinyAutomator inside Amazon AWS EC2 instance. It is possible to do some installation/startup during VM initialization/startup using cloud-init scripting. Amazon AWS EC2 provides auto-generated public DNS name, so you will be able to access your TinyAutomator instance without the need to adjust your /etc/hosts file. Prerequisites: you should install AWS CLI and configure it (you can follow https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html for installation steps and https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html for configuration), create a security group that will open ports 22(SSH),80(HTTP port),443 (HTTPS port), 1883 (MQTT port) and generate a key-pair for ssh communication with your EC2 instance. Here the steps:

wget -O /tmp/cloud-init.txt https://tinyurl.com/tinyautomator-cloud-init
  • If you want to use AWS lambda functions as waylay plugins then search for AWS_ACCESS_KEY, AWS_REGION, AWS_SECRET_KEY environment variables inside downloaded /tmp/cloud-init.txt file and set values for those variables appropriately. NOTE: if your access key or secret key contains / character then escape it with \ character and surround complete key value with " character. See details about AWS lambda usage in Using Amazon Lambda functions as Waylay plugins section.
  • Create storage.json file, eg /tmp/storage.json with following content:
[
 {
     "DeviceName": "/dev/sda1",
     "Ebs": {
         "VolumeSize": 16
     }
 }
]
  • create a keypair which will be used for the ssh communication. Save tinyautomatorkey.pem file, you will use it for ssh login:
aws ec2 create-key-pair --key-name tinyautomator-key --output text > tinyautomatorkey.pem
chmod 600 tinyautomatorkey.pem
  • create security group:
aws ec2 create-security-group --group-name tinyautomator-sg --description "TinyAutomator security group" --output text > securitygroup.id.txt
  • add inbound rules to security group.It is using group-id parameter with value which is written to file securitygroup.id.txt by previous command execution:
aws ec2 authorize-security-group-ingress --group-id $(cat securitygroup.id.txt) --protocol tcp --port 22 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-id $(cat securitygroup.id.txt) --protocol tcp --port 80 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-id $(cat securitygroup.id.txt) --protocol tcp --port 443 --cidr 0.0.0.0/0
aws ec2 authorize-security-group-ingress --group-id $(cat securitygroup.id.txt) --protocol tcp --port 1883 --cidr 0.0.0.0/0
  • now you can create an EC2 instance:
aws ec2  run-instances --image-id  $(aws ec2 describe-images --filters  'Name=description,Values="Canonical, Ubuntu, 20.04 LTS, arm64 focal image build on 2021-04-29"' | jq -r '.Images[0].ImageId') --count 1 --instance-type t4g.small --key-name tinyautomator-key --security-group-ids $(cat securitygroup.id.txt) --user-data file:///tmp/cloud-init.txt --block-device-mappings file:///tmp/storage.json

Give it some time to start and deploy all required packages and docker containers. You can log in to your instance by checking the public DNS name of your instance in aws console (URL for ec2 runnning instances overview https://eu-west-2.console.aws.amazon.com/ec2/v2/home?#Instances:instanceState=running ) and check the progress of installation process in file /var/log/cloud-init-output.log. Here is example of that (replace public-dns-name by your instance real public DNS name)

ssh -i tinyautomatorkey.pem ubuntu@public-dns-name
sudo cat /var/log/cloud-init-output.log

Normally once you see last line similar to following line, it means that installation is finished and you can access TinyAutomator using your public DNS name in browser https://public-dns-name-of-your-ec2-instance/:

Cloud-init v. 21.1-19-gbad84ad4-0ubuntu1~20.04.2 running 'modules:final' at Wed, 29 Sep 2021 13:29:14 +0000. Up 16.34 seconds.

You can run TinyAutomator inside Google Cloud Platform VM instance. You can run shell script during VM instance creation which will install required components, docker, download tinyautomator docker compose file, adjust configurations and start tinyautomator. Google Cloud Platform does not auto-create DNS name. You can use free dynamic DNS service providers that can do automatic check and assignment of DNS name to external IP address that will be added by Google Cloud Platform. In example startup script the dynu.com DNS service provider is used. The ddclient will be used to update dynamic DNS in the initial script. So from your side you just need to create an account on dynu.com and create one dynamic DNS name which will be used for your TinyAutomator using their web management console.

Here the steps:

wget -O /tmp/google-init.sh https://tinyurl.com/tinyautomator-google-init
  • Provide values for parameters PUBLIC_DNS - the DNS name which you created on dynu.com DNS service provider, DDNS_USERNAME - your dynu.com username, DDNS_PASSWORD - your dynu.com password.
  • If you want to use Google Cloud Functions as waylay plugins then search for GOOGLE_PROJECT_ID, GOOGLE_REGION, GOOGLE_PRIVATE_KEY_ID, GOOGLE_PRIVATE_KEY, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_EMAIL environment variables inside downloaded /tmp/google-init.sh file and set values for those variables appropriately. NOTE: private key contains \n characters. They should be escaped with \ character (it should look like \\\\n inside /tmp/cloud-init.sh file) and surround complete key value with " character. See details about Google Cloud Functions usage in Using Google Cloud Functions as Waylay plugins section.
  • Instantiate the Google VM:
  • Using google cloud console at https://console.cloud.google.com/. Go to Compute Engine section on google cloud web console.Click on Create Instance link. Choose at least 4 Gb RAM (you can use for example e2-medium instance), assign at least 20Gb of disk space,use the Ubuntu 20.04 minimal image. Allow HTTP,HTTPS traffic for that instance. Copy/paste content of the /tmp/google-init.sh file to the ‘Automation/Startup script’ section if you use the google cloud console for VM creation.
  • You can also create VM instance using gcloud cli tool. Here is an example of gcloud command line for VM creation. It makes use of special parameter to provide the init script via --metadata-from-file=startup-script parameter. Replace mytiny with your VM instance name, replace my-google-project-id with your real google project id, choose appropriate value for --zone parameter:
gcloud compute instances create mytiny --project=my-google-project-id --zone=europe-west1-d --machine-type=e2-medium --network-interface=network-tier=PREMIUM,subnet=default --maintenance-policy=MIGRATE --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/trace.append --tags=http-server,https-server --create-disk=auto-delete=yes,boot=yes,device-name=mytiny,image=projects/ubuntu-os-cloud/global/images/ubuntu-minimal-2004-focal-v20220203,mode=rw,size=20 --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --reservation-affinity=any --metadata-from-file=startup-script=/tmp/google-init.sh

Wait some time in order to initialization to finish. Then you will be able to access it via https://your-ddns-name URL.

You can run TinyAutomator inside Microsoft Azure virtual machine instance. Here the steps:

Start a Virtual machine using the Azure portal (or azure CLI).See details about VM creation at https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu . During creation use following parameters:

  • Choose Ubuntu Server 22.04 LTS image.
  • Use at least instance with 2 vCPu and 8 Gb RAM size (Generic purpose D-Series instance, for example Standard_D2s_v3)
  • Define unix user (e.g. clouduser) and generate ssh key to login.
  • Choose public IP assignment.
  • Allow SSH and HTTPS port for inbound traffic rules.

Once VM is created and started you can assign DNS name for it. It will be used to configure TinyAutomator services later.

  • Go to the Overview page of the created instance and find the ‘DNS name’ section. It is by default not configured.
  • Click on the “Not Configured” link there and set DNS name label (eg. tinydemo) and save.
  • The full DNS name will be something like tinydemo.westeurope.cloudapp.azure.com . You can see it back in the Overview page of the VM instance.

Adjust the inbound port rules to allow incoming traffic for following ports: 22, 80, 443, 1883, 8883. You can do it via Networking settings of started VM instance on Azure portal site.

Login to the started instance using ssh:

ssh -i /path/to/the/ssh.pem clouduser@instance_public_ip

You should install docker and docker-compose. For docker installation follow steps described in https://docs.docker.com/engine/install/ubuntu/ Here the example steps:

sudo apt update
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
  • Add your user to the docker group:
sudo usermod -aG docker $USER
newgrp docker
curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
  • Create docker daemon.json file on the following path /etc/docker/daemon.json with logging configuration for limiting log size of container images (by default they grow indefinitely) :
{
"log-driver": "json-file",
"log-opts": {
 "max-size": "50m",
 "max-file": "10"
}
}
  • restart docker service:
sudo systemctl restart docker
  • Now your system is ready to run a Waylay TinyAutomator. Download the docker compose file for X86 platform from the URL https://tinyurl.com/waylay-tinyautomator-alarms:
wget -O tinyautomator-x86.yml  https://tinyurl.com/waylay-tinyautomator-alarms
  • Replace all occurrences of standalone.waylay.io in tinyautomator-x86.yml file by public DNS name of your VM instance. E.g. using sed utility (replace tinydemo.westeurope.cloudapp.azure.com by public DNS name of your VM instance):
sed -i 's/standalone.waylay.io/tinydemo.westeurope.cloudapp.azure.com/g' tinyautomator-x86.yml
  • Start docker-compose with the downloaded file. This will start downloading and starts up the docker images with the Waylay platform services and open some ports to access those services. NOTE: It can take some time to download the docker images:
docker-compose -f tinyautomator-x86.yml  up -d

Why TinyAutomator?

What can it do?

Low-code automation at the edge.

Retrofitting legacy assets for automation enablement.

Runs locally on any Docker-enabled devices, like a Raspberry Pi or laptop.

How to get it?

Install Docker on your device.


Follow the installation instructions on our website.


Implement your automation strategy or experiment freely!

How to extend it?

TinyAutomator can be extended with external databases and dashboards such as InfluxDB or Grafana.


Couple it to a Waylay cloud offering to run ML models, manage alarms or offline analytics.

Community vs. Enterprise edition

Community edition

  • Console, inference engine, resource service  
  • Serverless sandbox
  • Free version
Free Download

Enterprise edition

  • Extra Security
  • Additional Encryption services
  • Additional Services e.g. broker pub/sub channels and payload converter
  • License version
Contact Us

Related Content