Skip to content

Instantly share code, notes, and snippets.

@johnDorian
Created October 20, 2020 13:51
Show Gist options
  • Save johnDorian/4c530adfd08d70108c08e8bbc6368091 to your computer and use it in GitHub Desktop.
Save johnDorian/4c530adfd08d70108c08e8bbc6368091 to your computer and use it in GitHub Desktop.
Tailscale for Valetudo

Tailscle on a roborock for Valetudo

Tailscale provides a simple to setup and use private network. I've just starting using this on my home network for home assistant and valetudo. Here are the instructions for setting up Tailsclae on the roborock vacuum.

For official tailscale installation see here: https://tailscale.com/download/linux/static

Download

To install tailscale on the vacuum, download the latest release for arm 32. Untar the release

wget https://pkgs.tailscale.com/stable/tailscale_1.0.5_arm.tgz
tar xvf tailscale_1.0.5_arm.tgz

Install

Copy the two binary files to the vacuum.

scp tailscale_1.0.5_arm/tailscaled [email protected]:/usr/local/bin/tailscaled
scp tailscale_1.0.5_arm/tailscale [email protected]:/usr/local/bin/tailscale

Copy the upstart script (see below) to the vacuum and reboot to start the service

scp tailscaled.conf [email protected]:/etc/init/tailscaled.conf
sudo reboot now

Get a token:

sudo tailscale up
description "tailscale vpn"
start on filesystem and net-device-up IFACE=wlan0
stop on runlevel [!2345]
console none
respawn
umask 022
setuid root
setgid root
console log
script
exec /usr/local/bin/tailscaled --port 41641
end script
@arunoruto
Copy link

arunoruto commented May 27, 2023

There has been a recent blog post on how to install tailscale on the Z10 Pro.
I wanted to make the updating procedure easier, so I made a small script, which will grab the current version, unpack, move the files, and reboot the robot. It can be set as a chronjob for every week.
IMPORTANT: tailscale will be down during running this, so execute this script only through normal ssh
If you want to do this using tailscale ssh, you can execute something like sh -c 'sleep 10 && sh /data/tailscale_download_script.sh' &. Then exit the ssh session and wait.

The script can look something like this:

#!/bin/sh
TAILVERSION=$(curl -k https://pkgs.tailscale.com/stable/ 2>&1 | grep -E 'tailscale_(.*)_arm64.tgz' | sed 's/^.*>tailscale_\(.*\)_arm64\.tgz.*$/\1/g')
echo $TAILVERSION
wget https://pkgs.tailscale.com/stable/tailscale_${TAILVERSION}_arm64.tgz -O /tmp/tailscale_arm64.tgz
tar xvf /tmp/tailscale_arm64.tgz -C /tmp

/data/tailscale --socket=/tmp/tailscale/tailscaled.sock down
cp /tmp/tailscale_${TAILVERSION}_arm64/tailscale* /data
/data/tailscale --socket=/tmp/tailscale/tailscaled.sock up
reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment