From leader21

Here’s a device that tells you the actual system uptime.

create a script in your homedirectory called :

# get uptime from /proc/uptime


seconds=$(( uptime%60 ))
minutes=$(( uptime/60%60 ))
hours=$(( uptime/60/60%24 ))
days=$(( uptime/60/60/24 ))

echo "$days days $hours hours $minutes minutes $seconds seconds"

then you can use your device like this :

      "id": "system-uptime",
      "name": "System uptime",
      "class": "ShellSensor",
      "attributeName": "Uptime",
      "attributeType": "string",
      "attributeUnit": "",
      "command": "sudo bash /home/pi/",
      "interval": 60000

you can leave the seconds away at the echo in the script.
the gui will show up more cheerful on mobile devices.