Skip to main content

Onboarding / Installing a Device

Deploying an OTee vPLC to your setup requires a hardware device on your network from which it can be run. This could be an existing, physical and open PLC, or any off-the-shelf hardware that fulfils the system requirements (see below).
System requirements for devices hosting OTee vPLCs:
  • Linux kernel
  • Internet connection and open 7422 port (outbound)
  • Sufficient CPU and memory to support the intended control logic and cycle times (for small projects, pretty much any machine will do! - Note that if you’re using the Free Tier, your device needs to have at least 2GB of disk space and 1GB of RAM available)
  • CURL and tar installed on the OS
  • Docker and ‘docker compose’ (v2 or higher - not ‘docker-compose’) installed on the OS (see next info box below)
  • Current user needs to be part of the Docker user group (or use sudo)
To add your own user to the Docker user group, run this command:
sudo groupadd docker
sudo usermod -aG docker $USER
// now logout and login.
Optional:
  • Ethernet port (for connecting to remote I/O)
  • The following chip architectures of target devices are currently supported:
  • ARM32, ARM64, x86_64
Read how to install docker and other required components for various Linux distributions here:
  • Follow any of the above links and find more Linux distributions in the side navigation panel
Switch to the device tab on the main navigation in the app’s header. Hit the plus sign to start the onboarding of a new device. In the “Onboard device” modal, name your device and add a description (optional). It is important that you select the correct chip architecture for your device form the drop-down. Onboard 1 Light Proceeding will then create a CURL command for you to copy and run from your host device’s terminal. This will install an OTee device agent and the latest available OTee runtime version on your machine - your first virtual PLC is born! Onboard 2 Light

Troubleshooting

Once the installation on your host device is complete, verify that the agent is running by executing the following command (replace <your-device-name> with the name you have chosen during the onboarding process): docker logs -f agent-agent_<your-device-name> This command will display the logs of the running agent, informing whether it has been successfully installed. Next, you may produce the logs for the publish-subscribe component on your device, by running the following command (replace <your-device-name> with the name you have chosen during the onboarding process): docker logs -f nats-nats_<your-device-name> If you’re detecting any errors in these logs, send them over to your friends at OTee or reach out to the community via OTee’s Discord server.

Offboarding / Uninstalling a Device

To remove all OTee components from your device, the following command can be executed in the terminal (bash). Paste and run the following script:
# Delete containers based on image name
docker ps -a --format '{{.ID}} {{.Image}}' | awk '$2 ~ /nats:|otee/ {print $1}' | xargs -r docker rm -f && \
# Delete images based on repository:tag
docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}' | awk '$1 ~ /nats:|otee/ {print $2}' | xargs -r docker rmi -f && \
# Clean up unused networks (including non OTee networks)
docker network prune -f
In the OTee user interface, navigate to the Devices page and select the device you want to remove. he device by hitting the “Delete device” button on your device’s page.