{ "type": "object", "title": "GPIO Driver Configuration Type", "description": "Controller discrete inputs and outputs configuration", "configFile": { "path": "/etc/wb-mqtt-gpio.conf", "service": "wb-mqtt-gpio", "toJSON": [ "wb-mqtt-gpio", "-j" ], "fromJSON": [ "wb-mqtt-gpio", "-J" ] }, "definitions": { "output_properties": { "properties": { "open_drain": { "type": "boolean", "title": "Open drain", "default": false, "_format": "checkbox", "propertyOrder": 7 }, "open_source": { "type": "boolean", "title": "Open source", "default": false, "_format": "checkbox", "propertyOrder": 8 }, "initial_state": { "type": "boolean", "title": "Output initial state", "default": false, "_format": "checkbox", "propertyOrder": 13 }, "load_previous_state": { "type": "boolean", "title": "Load output previous state after restart", "default": true, "_format": "checkbox", "propertyOrder": 14 } }, "defaultProperties": [ "inverted", "open_drain", "open_source", "initial_state", "load_previous_state" ] }, "input_properties": { "properties": { "type": { "type": "string", "title": "Pulse counter type", "enum": [ "", "watt_meter", "water_meter" ], "default": "", "propertyOrder": 6, "options": { "enum_titles": [ "without pulse counting", "watt meter", "water meter" ] } }, "edge": { "type": "string", "_format": "slWb", "title": "Pulse counter interrupt edge", "enum": [ "rising", "falling", "both" ], "default": "both", "propertyOrder": 9, "options": { "dependencies": { "type": [ "watt_meter", "water_meter" ] }, "enum_titles": [ "rising", "falling", "both" ], "show_opt_in": true, "wb": { "disabledEditorText": "autodetect" } } }, "multiplier": { "type": "number", "title": "Number of pulses per unit (kWh or m^3)", "default": 1, "propertyOrder": 10, "options": { "dependencies": { "type": [ "watt_meter", "water_meter" ] } } }, "decimal_points_current": { "type": "number", "title": "Number of decimal places in _current topic", "default": 2, "min": 0, "propertyOrder": 11, "options": { "dependencies": { "type": [ "watt_meter", "water_meter" ] } } }, "decimal_points_total": { "type": "number", "title": "Number of decimal places in _total topic", "default": 2, "min": 0, "propertyOrder": 12, "options": { "dependencies": { "type": [ "watt_meter", "water_meter" ] } } } } }, "gpio_channel": { "title": "Custom GPIO", "type": "object", "not": { "properties": { "name": { "type": "string", "enum": [ "5V_OUT", "A1_IN", "A1_OUT", "A2_IN", "A2_OUT", "A3_IN", "A3_OUT", "A4_IN", "A4_OUT", "V_OUT" ] } } }, "properties": { "name": { "type": "string", "title": "MQTT id", "minLength": 1, "propertyOrder": 1 }, "gpio": { "title": "GPIO", "propertyOrder": 2, "oneOf": [ { "type": "object", "title": "GPIO chip character device and line offset", "properties": { "chip": { "type": "string", "title": "Path to chip character device", "minLength": 1, "propertyOrder": 2, "description": "example: \"/dev/gpiochip0\"" }, "offset": { "type": "integer", "title": "GPIO line offset", "minimum": 0, "propertyOrder": 3 } }, "required": [ "chip", "offset" ], "_format": "grid", "options": { "disable_collapse": true } }, { "type": "integer", "title": "(deprecated) GPIO number", "minimum": 0, "propertyOrder": 2 } ], "options": { "keep_oneof_values": false, "disable_edit_json": true, "disable_properties": true } }, "direction": { "type": "string", "title": "Direction", "enum": [ "input", "output" ], "default": "input", "propertyOrder": 4, "options": { "enum_titles": [ "Input", "Output" ] } }, "inverted": { "type": "boolean", "title": "Invert polarity", "default": false, "_format": "checkbox", "propertyOrder": 5 } }, "allOf": [ { "$ref": "#/definitions/input_properties" }, { "$ref": "#/definitions/output_properties" } ], "required": [ "name", "gpio", "direction" ], "defaultProperties": [ "name", "gpio", "direction" ], "options": { "wb": { "controls_on_top": true } } }, "system_input": { "title": "System input", "type": "object", "_format": "merge-default", "properties": { "name": { "type": "string", "options": { "hidden": true }, "enum": [ "A1_IN", "A2_IN", "A3_IN", "A4_IN" ] }, "gpio": { "options": { "hidden": true } }, "direction": { "type": "string", "options": { "hidden": true } }, "inverted": { "type": "boolean", "options": { "hidden": true } } }, "required": [ "name" ], "allOf": [ { "$ref": "#/definitions/input_properties" } ], "default": { "inverted": false, "type": "", "multiplier": 1, "decimal_points_current": 2, "decimal_points_total": 2 }, "options": { "disable_properties": true } }, "system_output": { "title": "System output", "type": "object", "_format": "merge-default", "properties": { "initial_state": { "type": "boolean", "title": "Output initial state", "default": false, "_format": "checkbox", "propertyOrder": 13 }, "load_previous_state": { "type": "boolean", "title": "Load output previous state after restart", "default": true, "_format": "checkbox", "propertyOrder": 14 }, "name": { "type": "string", "options": { "hidden": true }, "enum": [ "5V_OUT", "A1_OUT", "A2_OUT", "A3_OUT", "A4_OUT", "V_OUT" ] }, "gpio": { "options": { "hidden": true } }, "direction": { "type": "string", "options": { "hidden": true } }, "inverted": { "type": "boolean", "options": { "hidden": true } }, "open_drain": { "type": "boolean", "options": { "hidden": true } }, "open_source": { "type": "boolean", "options": { "hidden": true } } }, "required": [ "name" ], "default": { "initial_state": false, "load_previous_state": true }, "options": { "disable_properties": true } }, "undefined_channel": { "type": "object", "not": { "properties": { "name": { "type": "string", "enum": [ "5V_OUT", "A1_IN", "A1_OUT", "A2_IN", "A2_OUT", "A3_IN", "A3_OUT", "A4_IN", "A4_OUT", "V_OUT" ] } } }, "properties": { "gpio": { "not": {} }, "direction": { "not": {} } } } }, "properties": { "debug": { "type": "boolean", "title": "Enable debug logging", "default": false, "_format": "checkbox", "propertyOrder": 1 }, "device_name": { "type": "string", "title": "MQTT device name", "default": "GPIOs", "propertyOrder": 2 }, "max_unchanged_interval": { "type": "integer", "title": "Unchanged value posting interval", "description": "max_unchanged_interval_description", "default": -1, "propertyOrder": 3 }, "channels": { "type": "array", "title": "List of GPIO channels", "items": { "_format": "roMultiple", "title": "GPIO channel", "headerTemplate": "{{self.name}}", "remove_empty_properties": true, "options": { "disable_edit_json": true }, "oneOf": [ { "$ref": "#/definitions/gpio_channel" }, { "$ref": "#/definitions/system_input" }, { "$ref": "#/definitions/system_output" }, { "$ref": "#/definitions/undefined_channel" } ] }, "propertyOrder": 4, "options": { "disable_array_reorder": true, "disable_collapse": true, "disable_array_add": true, "disable_array_delete_all_rows": true, "disable_array_delete_last_row": true, "wb": { "disable_panel": true, "disable_array_item_panel": true } } } }, "defaultProperties": [ "debug" ], "required": [ "device_name", "channels" ], "_format": "merge-default", "default": { "max_unchanged_interval": -1, "debug": false }, "options": { "disable_collapse": true, "disable_edit_json": true, "disable_properties": true }, "translations": { "en": { "max_unchanged_interval_description": "Specifies the maximum interval in seconds between posting the same values to MQTT. Negative value (default) - update on change. Zero - update after every read from the device." }, "ru": { "GPIO Driver Configuration Type": "Дискретные входы и выходы (GPIO)", "Controller discrete inputs and outputs configuration": "Конфигурация дискретных входов и выходов контроллера и модулей расширения", "Open drain": "Открытый коллектор", "Open source": "Открытый эмиттер", "Output initial state": "Начальное состояние выхода", "Load output previous state after restart": "Восстанавливать состояние выхода после перезапуска", "without pulse counting": "Без счета импульсов", "watt meter": "Счетчик электрической энергии", "water meter": "Счетчик расхода воды", "Pulse counter interrupt edge": "Фронт срабатывания счетчика импульсов", "rising": "Передний фронт", "falling": "Задний фронт", "both": "Передний и задний фронт", "autodetect": "Автоматически определить фронт", "Number of pulses per unit (kWh or m^3)": "Количество импульсов на единицу измерения (кВт*ч или м^3)", "Number of decimal places in _current topic": "Число десятичных знаков канала с текущим показанием", "Number of decimal places in _total topic": "Число десятичных знаков канала с суммарным показанием", "Custom GPIO": "Пользовательские настройки GPIO", "MQTT id": "Название канала MQTT", "MQTT device name": "Имя устройства MQTT", "GPIO chip character device and line offset": "Символьное устройство GPIO и смещение линии", "Path to chip character device": "Путь к устройству", "example: \"/dev/gpiochip0\"": "например: \"/dev/gpiochip0\"", "GPIO line offset": "Смещении линии GPIO", "(deprecated) GPIO number": "Номер GPIO (устаревшее)", "Input": "Вход", "Output": "Выход", "Invert polarity": "Инвертировать сигнал", "System input": "Системный вход", "System output": "Системный выход", "Unchanged value posting interval": "Интервал публикации неизменившегося состояния (с)", "max_unchanged_interval_description": "Задает интервал публикации состояния, если оно не изменилось. Ноль задает публикацию после каждого чтения данных из устройства. По умолчанию публикация происходит по изменению состояния. Отрицательное число задает поведение по умолчанию", "List of GPIO channels": "Список каналов GPIO", "GPIO channel": "Канал GPIO", "Direction": "Режим канала", "Pulse counter type": "Тип счетчика импульсов", "Enable debug logging": "Включить отладочные сообщения" } } }