{% extends "layout.html" %}
{% set active_page = "live" %}
{% set help_page = ["live-measurements", _('Live Measurements')] %}
{% block title %} - {{_('Live')}}{% endblock %}
{% block head %}
{% endblock %}
{%- block body %}
{% include 'flash_messages.html' %}
{%- if inputs_sorted|length == 0 -%}
{{_('No Inputs Activated')}}. Click here to go to the Input page. Read the Manual to become more familiar with the system and configuration options.
{%- endif -%}
{%- for each_input_sorted in inputs_sorted -%}
{%- set collapse_container_number = loop.index -%}
{%- for each_input in input if each_input.id == each_input_sorted -%}
{%- set input_has_pid = [] -%}
{%- if pid_display_order -%}
{%- for pid_order in pid_display_order -%}
{%- for each_pid in pid if each_pid.id == pid_order and each_pid.is_activated and each_pid.measurement.split(',')[0] == each_input.unique_id -%}
{%- do input_has_pid.append(1) -%}
{%- endfor -%}
{%- endfor -%}
{%- endif -%}
{%- if input_has_pid -%}
{%- endif -%}
{{each_input.name}} ({{each_input.id}})
{%- if each_input.device != 'EDGE' -%}
{{_('Input (%(type)s), %(sec)s second interval', type=each_input.device, sec=each_input.period)}}
{%- endif -%}
{{_('Measurement')}} | {{_('Timestamp')}}
{% for each_measure in each_input.measurements.split(',') if each_input.device != 'LinuxCommand' %}
{% if each_measure and each_measure in measurement_units and measurement_units[each_measure]['meas'] == 'temperature' %}
0.0 {{measurement_units[each_measure]['unit']}} (0.0 °F)
{%- if each_measure == 'dewpoint' %} DP
{% elif each_measure == 'temperature_object' %} Obj
{% elif each_measure == 'temperature_die' %} Die
{%- endif -%} | <{{_('Please wait')}}>
{% else %}
0.0 {% if each_measure != '' %}{{measurement_units[each_measure]['unit']}}{% endif %} | <{{_('Please wait')}}>
{% endif %}
{% endfor %}
{%- if each_input.device in ['ADS1x15', 'MCP342x'] %}
0.0 {{each_input.adc_measure_units}} {{each_input.adc_measure}} | <{{_('Please wait')}}>
{% endif %}
{%- if each_input.device == 'LinuxCommand' %}
0.0 {{each_input.cmd_measurement_units}} {{each_input.cmd_measurement}} | <{{_('Please wait')}}>
{% endif %}
{%- if pid_display_order -%}
{%- for pid_order in pid_display_order -%}
{%- for each_pid in pid if each_pid.id == pid_order and each_pid.is_activated and each_pid.measurement.split(',')[0] == each_input.unique_id -%}
{{each_pid.name}} ({{each_pid.id}})
Every {{each_pid.period}} seconds, apply PID to {% if each_pid.direction == 'both' -%}raise or lower{%- else -%}{{each_pid.direction}}{%- endif %} {{each_pid.measurement.split(',')[1]}} to {{each_pid.setpoint}}
{%- endfor -%}
{%- endfor -%}
{%- for each_math_sorted in maths_sorted -%}
{%- set collapse_container_number = loop.index -%}
{%- for each_math in math if each_math.id == each_math_sorted -%}
{%- set math_has_pid = [] -%}
{%- if pid_display_order -%}
{%- for pid_order in pid_display_order -%}
{%- for each_pid in pid if each_pid.id == pid_order and each_pid.is_activated and each_pid.measurement.split(',')[0] == each_math.unique_id -%}
{%- do math_has_pid.append(1) -%}
{%- endfor -%}
{%- endfor -%}
{%- endif -%}
{%- if math_has_pid -%}
{%- endif -%}
{{each_math.name}} ({{each_math.id}})
{{_('Math (%(type)s), %(sec)s second interval', type=each_math.math_type, sec=each_math.period)}}
{{_('Measurement')}} | {{_('Timestamp')}}
{% for each_measure in each_math.measure.split(',') %}
{% if each_measure and each_measure in measurement_units and measurement_units[each_measure]['meas'] == 'temperature' %}
0.0 {{measurement_units[each_measure]['unit']}} (0.0 °F)
{%- if each_measure == 'dewpoint' %} DP
{% elif each_measure == 'temperature_object' %} Obj
{% elif each_measure == 'temperature_die' %} Die
{%- endif -%} | <{{_('Please wait')}}>
{% elif each_measure and each_measure in measurement_units %}
0.0 {{measurement_units[each_measure]['unit']}} | <{{_('Please wait')}}>
{% else %}
0.0 {{each_math.measure_units}} | <{{_('Please wait')}}>
{% endif %}
{% endfor %}
{%- if pid_display_order -%}
{%- for pid_order in pid_display_order -%}
{%- for each_pid in pid if each_pid.id == pid_order and each_pid.is_activated and each_pid.measurement.split(',')[0] == each_math.unique_id -%}
{{each_pid.name}} ({{each_pid.id}})
Every {{each_pid.period}} seconds, apply PID to {% if each_pid.direction == 'both' -%}raise or lower{%- else -%}{{each_pid.direction}}{%- endif %} {{each_pid.measurement.split(',')[1]}} to {{each_pid.setpoint}}