{% extends "layout-settings.html" %} {% set active_page = "settings" %} {% set active_settings = "pi" %} {% set help_page = ["https://kizniche.github.io/Mycodo/Configuration-Settings/#pi-settings", dict_translation['settings']['title'] + ': ' + _('Raspberry Pi')] %} {% block title %} - {{dict_translation['settings']['title'] + ': ' + _('Raspberry Pi')}}{% endblock %} {% block settings %}

{{_('Raspberry Pi Settings')}}

{{form_settings_pi.csrf_token}}
The following settings are configured through the non-interactive version of raspi-config. Changes here often require a system reboot before they take effect, which may be executed from the menu at the top-right (Configuration -> Restart System).
I2C is {% if pi_settings['i2c_enabled'] %}Enabled{% else %}Disabled{% endif %}
{% if pi_settings['i2c_enabled'] %} {{form_settings_pi.disable_i2c(class_='btn btn-primary')}} {% else %} {{form_settings_pi.enable_i2c(class_='btn btn-primary')}} {% endif %}
1-Wire is {% if pi_settings['one_wire_enabled'] %}Enabled{% else %}Disabled{% endif %}
{% if pi_settings['one_wire_enabled'] %} {{form_settings_pi.disable_one_wire(class_='btn btn-primary')}} {% else %} {{form_settings_pi.enable_one_wire(class_='btn btn-primary')}} {% endif %}
Serial is {% if pi_settings['serial_enabled'] %}Enabled{% else %}Disabled{% endif %}
{% if pi_settings['serial_enabled'] %} {{form_settings_pi.disable_serial(class_='btn btn-primary')}} {% else %} {{form_settings_pi.enable_serial(class_='btn btn-primary')}} {% endif %}
SPI is {% if pi_settings['spi_enabled'] %}Enabled{% else %}Disabled{% endif %}
{% if pi_settings['spi_enabled'] %} {{form_settings_pi.disable_spi(class_='btn btn-primary')}} {% else %} {{form_settings_pi.enable_spi(class_='btn btn-primary')}} {% endif %}
SSH is {% if pi_settings['ssh_enabled'] %}Enabled{% else %}Disabled{% endif %}
{% if pi_settings['ssh_enabled'] %} {{form_settings_pi.disable_ssh(class_='btn btn-primary')}} {% else %} {{form_settings_pi.enable_ssh(class_='btn btn-primary')}} {% endif %}
{{form_settings_pi.hostname(class_='form-control', value=pi_settings['hostname'])}}
{{form_settings_pi.change_hostname(class_='btn btn-primary')}}
Service options:
{{form_settings_pi.pigpiod_sample_rate.label(class_='control-label')}}
{{form_settings_pi.change_pigpiod_sample_rate(class_='btn btn-primary',**{'onclick':'return confirm("Changing the sample rate of pigpiod requires restarting both pigpiod and the mycodo daemon. Please confirm this is what you wish to do.")'})}}
{% endblock %}