Translations:Using Wiren Board with pulsed output devices/5/en: различия между версиями

Материал из Wiren Board
(Новая страница: «Next, in the web interface, you must configure universal input A1 as a counter. In the '''Configs''' menu, select '''GPIO Driver Configuration'''. On the panel c…»)
 
м (FuzzyBot переименовал страницу Translations:Wiren Board 5: Подключение устройств с импульсными выходами/5/en в Translations:Using Wiren Board with pulsed output devices/5/en без оставления перенаправления: Часть переводимой страницы Wiren Board 5: Подключение устройств с импульсными выходами.)
 
(нет различий)

Текущая версия на 18:23, 21 апреля 2021

Определение сообщения (Using Wiren Board with pulsed output devices)
Далее в веб-интерфейсе необходимо настроить универсальный вход A1 как счетчик. 
В меню '''Configs''' выбираем раздел '''GPIO Driver Configuration'''.
На панели выбираем настройки входа A1_IN, нажимаем кнопку '''Properties''' и отмечаем все флажки. Еще раз нажимаем кнопку '''Properties'''.
Теперь  в свойствах входа A1_IN появились дополнительные поля.
[[File:GPIO6_WaterMeter.png|thumb|center|800px|Вид интерфейса настройки счетчика]]
В списке поля '''Pulse counter type (if any)''' выбираете тип ''water_meter''. 
В поле '''Number of pulses per unit (kWh or m^3)''' указываете, сколько импульсов приходится на кубометр (например, если 1 импульс счетчика соответствует 10 литрам, то указываете 100; если 1 литру — 1000.)
Значение полей '''Number of decimal places...''' задает, сколько знаков после запятой будет отображаться в интерфейсе Wiren Board.
Сохраняем настройки, нажав кнопку '''Save''' вверху страницы и переходим к списку устройств на страницу '''Devices'''.
[[File:DiscreteIO.png|thumb|center|200px|Данные от счетчика]]
Находим устройство '''Discrete I/O''' и видим, что у него появились новые свойства: ''A1_IN_current'' и ''A1_IN_total''. Поле ''A1_IN_current'' показывает текущий расход воды, а ''A1_IN_total'' — какой объем был израсходован с момента подключения. В mqtt этим полям соответствуют топики '''/devices/wb-gpio/controls/A1_IN_current''' и '''/devices/wb-gpio/controls/A1_IN_total'''.

Next, in the web interface, you must configure universal input A1 as a counter. In the Configs menu, select GPIO Driver Configuration. On the panel choose A1_IN login settings, click Properties and mark all the checkboxes. Then click Properties again. Now there are additional fields in the A1_IN input properties.

Counter configuration interface view

In the list of fields Pulse counter type (if any) choose the type water_meter. In the field Number of pulses per unit (kWh or m^3) specify how many pulses per cubic meter (for example, if 1 pulse of the counter corresponds to 10 liters, then specify 100; if 1 liter — 1000.) Field value Number of decimal places... specifies how many decimal places will be displayed in the Wiren Board interface. Save the settings by clicking the Save button at the top of the page and go to the list of devices on the Devices page.

Counter data

Find the device Discrete I/O and see that it has new properties: "A1_IN_current" and "A1_IN_total". The field "A1_IN_current" shows the current water consumption, and "A1_IN_total" — what amount was spent from the moment of connection. In mqtt, these fields correspond to the topics /devices/wb-gpio/controls/A1_IN_current and /devices/wb-gpio/controls/A1_IN_total.