First Steps

If you haven't installed ondevice on your systems yet, have a look at the install page. This document assumes you've already set up at least one device (running ondevice daemon) and a client PC.

a quick status check

Let’s run ondevice status on the device to make sure it’s actually online:

$ ondevice status
  devID:  demo.aed5vu
  state:  online
  version:  0.5.1

  version:  0.5.1

Our device is online as demo.aed5vu.
Note: The demo. prefix can be omitted when connecting to your own devices)

Now let’s see if ondevice list on the client agrees:

$ ondevice list
ID             State   IP              Version         Name
demo.aed5vu    online   ondevice v0.5.1

ondevice list can be used to get a quick overview of the states of your devices.

connect to your device

Ok, our device is online. Let’s ssh into it:

$ ondevice ssh pi@aed5vu
pi@demo.aed5vu's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Dec 10 23:23:40 2017 from localhost
pi@raspberrypi:~ $ uptime
 20:33:04 up 9 days,  4:05,  4 users,  load average: 0.05, 0.03, 0.00

We can also use any of ssh’s commandline flags (or use it non-interactively), e.g.:

$ ondevice ssh root@aed5vu apt-get update '&&' apt-get upgrade
# or:
$ ondevice ssh -f -N -L 6379:localhost:6379 pi@aed5vu

rename the device

Initially, each device running ondevice daemon gets a random devId.
But you can rename them later, either in your control panel or setting the on:id special property of the device:

$ ondevice device aed5vu set on:id=rpi

set properties

You can also set custom properties for each device. This can be used to store certain characteristics or to keep track on the state of your maintenance scripts:

$ ondevice device rpi set arch=armhf distro=raspbian
$ ondevice device rpi set lastUpgrade=2017-12-13
$ ondevice device rpi list
on:name=RaspberryPi3 im Office