You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets control the [MegaD-328](http://www.ab-log.ru/smart-house/ethernet/MegaD-328) over ethernet.
5
+
## English
6
+
[по русски](#Русский)
7
+
8
+
## Install
9
+
10
+
```node iobroker.js add megad```
11
+
12
+
### Information
13
+
The device has 14 ports, 0-7 inputs and 8-13 outputs.
14
+
To read the state of the port call
15
+
```http://mega_ip/sec/?pt=4&cmd=get``` , where sec is password (max 3 chars), 4 is port number
16
+
The result will come as "ON", "OFF" or analog value for analog ports
17
+
18
+
To set the state call:
19
+
```http://mega_ip/sec/?cmd=2:1``` , where sec is password (max 3 chars), 2 is port number, and 1 is the value
20
+
For digital ports only 0, 1 and 2 (toggle) are allowed, for analog ports the values from 0 to 255 are allowed
21
+
22
+
The device can report the changes of ports to some web server in form
23
+
```http://ioBroker:80/?pt=6``` , where 6 is the port number
24
+
25
+
MegaD-328 cannot report on other port than 80.
26
+
27
+
### Configuration
28
+
29
+
- IP: IP address of MegaD-328;
30
+
- MegaD-328 Name: Name of the MegaD-328 to assign the port changes, e.g. "DevA". If no name set the adapter instance will be used for that;
31
+
- Port: Listening port on ioBroker. MegaD-328 cannot send to ports other than 80. Default value: 80.
32
+
- Poll interval: poll interval in seconds. All configured input ports will be polled in defined interval;
33
+
- Password: password to access the device (max 3 characters). Default value "sec";
34
+
35
+
MegaD-328 can report about changes on some ports if configured.
36
+
You can configure something like that "http://ioBrokerIP/instance" on MegaD-328 in "Net"-Field and MegaD-328 will send reports like this one "http://ioBrokerIP/instance/?pt=7" to ioBroker.
37
+
That means the button on port 7 was pressed. ioBroker expectes instance number (e.g. "0") or defined name of MegaD-328 (e.g. "DevA"). The "Net" field will look like: "http://192.168.0.8/0/".
38
+
39
+
### Ports
40
+
All ports, that are desired to be used must be configured in right order. Following settings must be set for every port:
41
+
42
+
- name: name of the port. Used by ioBroker;
43
+
- input: Is the port INPUT(true) or output(false);
44
+
- switch: Is the port can be ON or OFF (in this case value = TRUE) or just used to send the reports about button press (FALSE);
45
+
- digital: Analog or digital port. ioBroker expects analog ports with range from 0 to 255.
To get the range of the analog value from 100 to 500 set the factor as 400 and offset = 100.
52
+
53
+
**The order of the ports is very important. The port in first row will be associated with P0 in MegaD-328. In row number 14 with P13.**
54
+
55
+
-------------------
56
+
## Русский
57
+
Подробную документацию можно найти здесь: [http://www.ab-log.ru/smart-house/ethernet/MegaD-328](http://www.ab-log.ru/smart-house/ethernet/MegaD-328)
58
+
59
+
### Настройки
60
+
61
+
- IP Адрес устройства: IP адрес MegaD-328;
62
+
- MegaD Имя: Имя MegaD-328 устройства для идентификации сообщений о смене состояния порта от MegaD-328, например "DevA". Если имя не задано, то для этих целей будет использоватся номер инстанции драйвера.;
63
+
- ioBroker веб-порт: Порт на котором ioBroker развертывает веб сервер для приёма сообщений от MegaD-328. MegaD-328 не поддерживает на данный момент порты отличные от 80. Значение по умолчанию: 80.
64
+
- Интервал опроса (сек): инетрвал опроса портов в секундах;
65
+
- MegaD-328 Пароль: пароль для доступа на MegaD-328 (максимально 3 символа). Значение по умолчанию: "sec";
66
+
67
+
В сетевых настройках MegaD-328 можно сконфигуририровать IP-адрес ioBroker. При каждом нажатии на кнопку MegaD-328 сообщает ioBroker (restAPI) номер сработавшего входа.
68
+
69
+
Выглядит запрос примерно следующим образом:
70
+
´´´http://192.168.0.250/0/?pt=7´´´
71
+
72
+
Необходимо прописать в настройках MegaD-328 в поле "Net" ´´´http://192.168.0.250/0/´´´, если адрес ioBroker "192.168.0.250" и инстанция адаптера 0.
73
+
74
+
### Порты
75
+
Необходимо сконфигурироваь все порты, которые должны быть видимы в ioBorker. Для каждого порта необходимо настроить следующее:
76
+
77
+
- Имя: имя порта. Исползуется в ioBroker для создание объектов;
78
+
- Вход: является ли порт входом (true) или выходом(false);
79
+
- Переключатель: Может ли порт быть в положениях ВКЛ и ВЫКЛ (в этом случае значение TRUE) или он просто используется для сигнализирования нажатия на кнопку (FALSE);
80
+
- Цифровой: Цифровой или аналоговый порт. ioBroker ожидает значени с аналогового порта в промежутке от 0 до 255.
81
+
- Множитель: множитель для значения **аналогового** порта.
82
+
- Сдвиг: сдвиг для значения **аналогового** порта.
0 commit comments