{% extends "layout.html" %} {% set active_page = "output" %} {% set help_page = ["output", _('Output')] %} {% block title %} - {{_('Output')}}{% endblock %} {% block head %} {% endblock %} {% block body %}
{% include 'flash_messages.html' %}

{{_('Output')}}

{{_('Output devices enable Mycodo to manipulate things through the use of relays (wired and wireless), PWM signals, and executing commands. When linked to a PID controller, with an input, output devices can be used for feedback regulation.')}}

{{form_add_relay.hidden_tag()}}
{{form_add_relay.relay_quantity(class_='form-control', type="number", value=1, **{'title':_('Quantity')})}}
{{form_add_relay.relay_add(class_='form-control btn btn-default')}}
{%- if displayOrder -%} {%- for order in displayOrder -%} {%- for each_relay in relay if each_relay.id == order -%}
{{form_mod_relay.csrf_token}} {{form_mod_relay.relay_id(class_='form-control', value=each_relay.id)}} {{form_mod_relay.relay_pin(class_='form-control', value=each_relay.pin)}}
{{form_mod_relay.name(class_='form-control', value=each_relay.name, **{'title':_('A name to distinguish this from others')})}}
{% if each_relay.relay_type != 'pwm' -%}
{%- endif %}
{{form_mod_relay.order_up(class_='form-control btn btn-default')}}
{{form_mod_relay.order_down(class_='form-control btn btn-default')}}
{{form_mod_relay.save(class_='form-control btn btn-default')}}
{{form_mod_relay.delete(class_='form-control btn btn-default', **{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
{% for each_relay_template in relay_templates if each_relay_template[:-5] == each_relay.relay_type %} {% include 'pages/output_options/'+each_relay_template %} {% endfor %}
{{form_mod_relay.amps.label(class_='control-label')}}
{{form_mod_relay.amps(class_='form-control', value=each_relay.amps, **{'title':_('The number of amps the output device draws (at 120/240 VAC)')})}}
{% if each_relay.relay_type in ['wired', 'wireless_433MHz_pi_switch', 'command'] %}
{% elif each_relay.relay_type == 'pwm' %}
{% endif %}
{%- endfor -%} {%- endfor -%} {%- endif -%}
{% endblock %}