What is TinyAutomator?

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

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.

TinyAutomator is Waylay's edge solution, primarily focusing on edge automation. Like most edge solutions, it starts with protocol and payload normalization. It also stores and visualizes data locally and can run machine learning models locally (which can be called from the Waylay sandbox).

The primary role of Waylay edge solution is to provide local, non-cloud automation, hence the name TinyAutomator.

With TinyAutomator in your hands you can get familiar with our superior automation experience and create your own automation scenarios on your Raspberry Pi or edge device, or run everything locally on your laptop. 

Waylay TinyAutomator is composed of a few docker images that include the Waylay Console, Waylay Rules Engine, resource service (Digital Twin), times series database and embedded sandbox VM based on Nodejs. Compared to the enterprise cloud solutions, some of the functionalities are either missing or are slimmed down versions of our cloud offering, most notably, with less performant databases relying on third-party (small footprint) ML models. Finally, the capacity of the rules engine and the number of function executions solely depends on the hardware setup on which you install the TinyAutomator.

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

Edge community edition

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

Edge enterprise edition

  • Extra security
  • Additional encryption services
  • Additional services e.g. broker pub/sub channels and payload converter
  • Licensed version
  • Waylay standard SLA support
Contact Us

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 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 and 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 the docker compose file for the 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: It can take some time to download the docker images:
docker-compose -f tinyautomator-raspberrypi.yml  up -d
  • The standalone Waylay engine uses a fake DNS name, 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:

  • Install docker and docker-compose on your local PC using following instructions:

For docker engine: https://docs.docker.com/engine/install/

For docker compose: https://docs.docker.com/compose/install/

  • In order to be able to execute the docker command, add the user, which you are using on the UNIX shell to the docker group:
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 the 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's AWS EC2 instance. It is possible to do some installation and startup during the VM initialization and startup using cloud-init scripting. Amazon's 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), and 1883 (MQTT port), and generate a key-pair for SSH communication with your EC2 instance. Here are 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 the "/" character then escape it with the "\" character and surround complete key value with the " character. See details about AWS lambda usage in the 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 the SSH login:
aws ec2 create-key-pair --key-name tinyautomator-key --output text > tinyautomatorkey.pem
chmod 600 tinyautomatorkey.pem
  • Create a security group:
aws ec2 create-security-group --group-name tinyautomator-sg --description "TinyAutomator security group" --output text > securitygroup.id.txt
  • Add inbound rules to the security group. It is using a group-id parameter with a value which is written to file securitygroup.id.txt by the following 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 the AWS console. The URL for ec2 running instances overview is https://eu-west-2.console.aws.amazon.com/ec2/v2/home?#Instances:instanceState=running. Check the progress of the installation process in file /var/log/cloud-init-output.log. Here is an example of that. Replace public-dns-name with your instance real public DNS name.

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

Once you see that the last line is similar to the following line, it means that installation is finished and you can access TinyAutomator using your public DNS name in your browser at 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 a Google Cloud Platform VM instance. You can run shell script during VM instance creation which will install the required components, docker, download TinyAutomator docker compose file, adjust configurations, and start TinyAutomator. Google's Cloud Platform does not auto-create a DNS name. You can use the free dynamic DNS service providers that can do an automatic check and assignment of a DNS name to an external IP address that will be added by the Google Cloud Platform. In an example startup script, the dynu.com DNS service provider is used. The ddclient will be used to update the dynamic DNS in the initial script. 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 the dynu.com DNS service provider, DDNS_USERNAME - your dynu.com username, and DDNS_PASSWORD - your dynu.com password.
  • If you want to use Google Cloud Functions as Waylay plugins, then search for the GOOGLE_PROJECT_ID, GOOGLE_REGION, GOOGLE_PRIVATE_KEY_ID, GOOGLE_PRIVATE_KEY, GOOGLE_CLIENT_ID, and GOOGLE_CLIENT_EMAIL environment variables inside the downloaded /tmp/google-init.sh file and set values for those variables appropriately. Note: The private key contains \n characters. They should be escaped with the "\" character. It should look like \\\\n inside /tmp/cloud-init.sh file and surround the complete key value with the " character. See details about Google Cloud Functions usage in the Using Google Cloud Functions as Waylay Plugins section.
  • Instantiate the Google VM:
  • Using Google Cloud Console at https://console.cloud.google.com/. Go to the Compute Engine section on Google Cloud Web Console. Click on Create Instance link. Choose at least 4 GB RAM. You can use, for example, an e2-medium instance. Assign at least 20GB of disk space and use the Ubuntu 20.04 minimal image. Allow HTTP, HTTPS traffic for that instance. Copy/paste the 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 a VM instance using the gcloud CLI tool. Here is an example of a gcloud command line for VM creation. It makes use of a 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 and choose the 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 for the initialization to finish. Then, you will be able to access it via the https://your-ddns-name URL.

You can run TinyAutomator inside Microsoft's 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 the Ubuntu Server 22.04 LTS image.
  • Use, at least, an instance with 2 vCPu and 8 GB RAM size (a generic purpose D-Series instance, for example Standard_D2s_v3).
  • Define a Unix user (e.g. clouduser) and generate an SSH key to login.
  • Choose a public IP assignment.
  • Allow SSH and HTTPS port for inbound traffic rules.

Once a VM is created and started you can assign a 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, set the 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 and 8883. You can do it via the networking settings of started VM instance on the 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 a 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 the 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 the tinyautomator-x86.yml file with the public DNS name of your VM instance. E.g. using sed utility. Replace tinydemo.westeurope.cloudapp.azure.com with the 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
  • Wait some time in order for the initialization to finish. Then, you will be able to access it via https://public-DNS-name-of-your-VM URL, E.g. https://tinydemo.westeurope.cloudapp.azure.com .

Related Content