{% extends "base.html" %} {% block title %}{{ device.config.name }} — Demeter IoT{% endblock %} {% block content %}

{{ device.config.name }}

{% if device.online %}
Online
{% else %}
Offline
{% endif %}

Device Information

Device ID {{ device.config.id }}
IP Address {{ device.config.ip }}:{{ device.config.port }}
Status {% if device.online %} Connected {% else %} Disconnected {% endif %}
Resources {{ device.config.resources|length }} configured

CoAP Bridge

Query the device directly via the HTTP-to-CoAP proxy.

{% for resource in device.config.resources %}
{{ resource.uri }}
{% endfor %}
device/info
Click GET to query a resource...

Sensor Readings

{% if device.readings %}
{% for uri, reading in device.readings.items() %} {% endfor %}
Resource Value Unit Age Status
{{ uri }} {% if reading.value is not none %} {{ reading.value }} {% else %} {% endif %} {{ reading.unit }} {{ reading.age_seconds()|round(0)|int }}s ago {% if reading.stale %}
Stale
{% else %}
Fresh
{% endif %}
{% else %}

No readings received yet. The device may be offline or not yet subscribed.

{% endif %}
{% endblock %} {% block scripts %} {% endblock %}