iobroker.megad 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,225 +1,143 @@
1
- ![Logo](admin/megad.png)
2
- ioBroker MegaD-328 adapter
3
- =================
4
-
5
- [![NPM version](http://img.shields.io/npm/v/iobroker.megad.svg)](https://www.npmjs.com/package/iobroker.megad)
6
- [![Downloads](https://img.shields.io/npm/dm/iobroker.megad.svg)](https://www.npmjs.com/package/iobroker.megad)
7
- [![Tests](https://travis-ci.org/ioBroker/ioBroker.megad.svg?branch=master)](https://travis-ci.org/ioBroker/ioBroker.megad)
8
-
9
- [![NPM](https://nodei.co/npm/iobroker.megad.png?downloads=true)](https://nodei.co/npm/iobroker.megad/)
10
-
11
- Lets control the [MegaD-328](http://www.ab-log.ru/smart-house/ethernet/megad-328) over ethernet.
12
- ## English
13
- [по русски](#Русский)
14
-
15
- ## Install
16
-
17
- ```node iobroker.js add megad```
18
-
19
- ### Information
20
- The device has 14 ports, 0-7 inputs and 8-13 outputs.
21
- To read the state of the port call
22
- ```http://mega_ip/sec/?pt=4&cmd=get``` , where sec is password (max 3 chars), 4 is port number
23
- The result will come as "ON", "OFF" or analog value for analog ports
24
-
25
- To set the state call:
26
- ```http://mega_ip/sec/?cmd=2:1``` , where sec is password (max 3 chars), 2 is port number, and 1 is the value
27
- For digital ports only 0, 1 and 2 (toggle) are allowed, for analog ports the values from 0 to 255 are allowed
28
-
29
- The device can report the changes of ports to some web server in form
30
- ```http://ioBroker:80/?pt=6``` , where 6 is the port number
31
-
32
- MegaD-328 cannot report on other port than 80.
33
-
34
- ### Configuration
35
-
36
- - IP: IP address of MegaD-328;
37
- - 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;
38
- - Port: Listening port on ioBroker. MegaD-328 cannot send to ports other than 80. Default value: 80.
39
- - Poll interval: poll interval in seconds. All configured input ports will be polled in defined interval;
40
- - Password: password to access the device (max 3 characters). Default value "sec";
41
-
42
- MegaD-328 can report about changes on some ports if configured.
43
- 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.
44
- That means the button on port 7 was pressed. ioBroker expects 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/".
45
-
46
- ### Ports
47
- All ports, that are desired to be used must be configured in right order. Following settings must be set for every port:
48
-
49
- - Name: name of the port. Used by ioBroker;
50
- - Input: Is the port INPUT(true) or output(false);
51
- - 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);
52
- - Digital: Analog or digital port. ioBroker expects analog ports with range from 0 to 255.
53
- - Offset: offset for the **analog** port.
54
- - Factor: multiply factor for **anaolog** port.
55
- - Long press: detect long press on digital port (port have to be SWITCH type)
56
- - Double click ms: interval for detection of double click
57
-
58
- For input:
59
- ```
60
- ioBrokerValue = MegaValue * factor + offset;
61
- ```
62
-
63
- For output:
64
- ```
65
- MegaValue = (ioBrokerValue - offset) / factor;
66
- ```
67
-
68
- To get the range of the analog value from 100 to 500 set the factor as 400 and offset = 100.
69
-
70
- **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.**
71
-
72
- -------------------
73
- ## Русский
74
- Подробную документацию можно найти здесь: [http://www.ab-log.ru/smart-house/ethernet/MegaD-328](http://www.ab-log.ru/smart-house/ethernet/MegaD-328)
75
-
76
- ### Настройки
77
-
78
- - IP Адрес устройства: IP адрес MegaD-328;
79
- - MegaD Имя: Имя MegaD-328 устройства для идентификации сообщений о смене состояния порта от MegaD-328, например "DevA". Если имя не задано, то для этих целей будет использоватся номер инстанции драйвера.;
80
- - ioBroker веб-порт: Порт на котором ioBroker разворачивает веб сервер для приёма сообщений от MegaD-328. MegaD-328 не поддерживает на данный момент порты отличные от 80. Значение по умолчанию: 80.
81
- - Интервал опроса (сек): инетрвал опроса портов в секундах;
82
- - MegaD-328 Пароль: пароль для доступа на MegaD-328 (максимально 3 символа). Значение по умолчанию: "sec";
83
- - Интервал для длинного нажатия (мс): если отжатие после нажатия кнопки произошло позже указанного интервала, то сгенерируется длинное нажатие;
84
- - Интервал двойного нажатия (мс): если между нажатиями пройдет меньше указанного времени, то сгенерируется двойное нажатие;
85
-
86
- В сетевых настройках MegaD-328 можно сконфигуририровать IP-адрес ioBroker. При каждом нажатии на кнопку MegaD-328 сообщает ioBroker (restAPI) номер сработавшего входа.
87
-
88
- Выглядит запрос примерно следующим образом:
89
- ´´´http://192.168.0.250/0/?pt=7´´´
90
-
91
- ### Порты
92
- Необходимо сконфигурироваь все порты, которые должны быть видимы в ioBorker. Для каждого порта необходимо настроить следующее:
93
-
94
- - Имя: имя порта. Исползуется в ioBroker для создание объектов;
95
- - Вход: является ли порт входом (true) или выходом(false);
96
- - Переключатель: Может ли порт быть в положениях ВКЛ и ВЫКЛ (в этом случае значение TRUE) или он просто используется для сигнализирования нажатия на кнопку (FALSE);
97
- - Цифровой: Цифровой или аналоговый порт. ioBroker ожидает значени с аналогового порта в промежутке от 0 до 255.
98
- - Множитель: множитель для значения **аналогового** порта.
99
- - Сдвиг: сдвиг для значения **аналогового** порта.
100
- - Длинное нажатие: если активировано, то порт будет генерировать событие "длинное нажатие" в объекте port_long (Порт должен быть цифровым и иметь тип "Переключатель")
101
- - Двойное нажатие: если активировано, то порт будет генерировать событие "double click" в объекте port_double
102
-
103
- Для выхода:
104
-
105
- ```
106
- MegaЗначение = (ioBrokerЗначение - Сдвиг) / Множитель;
107
- ```
108
-
109
- Для входа:
110
-
111
- ```
112
- ioBrokerЗначение = MegaЗначение * Множитель + Сдвиг;
113
- ```
114
-
115
- Например, что бы получить интервал значений от 100 до 500 нужно установить сдиг 100 и множитель 400.
116
-
117
- Только аналоговые порты принимают во внимание Множитель и Сдвиг.
118
-
119
- **Порядок портов очень важен. Порт в первой колонке таблицы ассоциируется с портом P0 на MegaD-328. Порт в колонке 14 с P13.**
120
-
121
-
122
- ## Changelog
123
- ### 1.2.0 (2016-05-03)
124
- * (bluefox) add info.connection state
125
- * (bluefox) fix error if more ports in megad than configured
126
-
127
- ### 1.1.0 (2015-12-22)
128
- * (bluefox) make counters writeable
129
-
130
- ### 1.1.0 (2015-12-17)
131
- * (bluefox) add counter for digital inputs
132
- * (bluefox) fix the internal temperature sensor monitor
133
-
134
- ### 1.0.6 (2015-11-13)
135
- * (bluefox) fix short press
136
-
137
- ### 1.0.5 (2015-11-11)
138
- * (bluefox) fix small errors
139
-
140
- ### 1.0.4 (2015-11-10)
141
- * (bluefox) fix errors after optimization
142
-
143
- ### 1.0.3 (2015-11-06)
144
- * (bluefox) if 1wire sensor not connected, NA value will be received
145
-
146
- ### 1.0.2 (2015-11-04)
147
- * (bluefox) fix using of more than one megad
148
-
149
- ### 1.0.1 (2015-10-03)
150
- * (bluefox) support of iButton
151
-
152
- ### 1.0.0 (2015-10-03)
153
- * (bluefox) Fix small error with 1-Wire and threshold mode
154
-
155
- ### 0.2.14 (2015-09-30)
156
- * (bluefox) fix discover function
157
-
158
- ### 0.2.13 (2015-09-29)
159
- * (bluefox) add link to admin (only with admin version >= 0.5.14)
160
- * (bluefox) use misc flag
161
- * (bluefox) enable pwm only for ports 10,12,13
162
- * (bluefox) disable action for DHT11/22
163
-
164
- ### 0.2.12 (2015-09-29)
165
- * (bluefox) fix discover function
166
- * (bluefox) generate true and false for simple clicks
167
-
168
- ### 0.2.11 (2015-09-28)
169
- * (bluefox) disable discover button if adapter disabled
170
- * (bluefox) fix discover function
171
- * (bluefox) write for inputs misc=1 and add de-bounce parameter
172
-
173
- ### 0.2.10 (2015-09-26)
174
- * (bluefox) return "OK" and not "OK->" to other than 0 instances
175
-
176
- ### 0.2.9 (2015-09-20)
177
- * (bluefox) change server script from "/0/" to "0/"
178
-
179
- ### 0.2.8 (2015-09-19)
180
- * (bluefox) fix PWM output
181
-
182
- ### 0.2.6 (2015-09-18)
183
- * (bluefox) tuning on settings for ports: Ports 14 and 15 are always ADC. Threshold are shown only for 1-wire if digital sensor.
184
-
185
- ### 0.2.5 (2015-09-17)
186
- * (bluefox) fix settings for digital sensors
187
-
188
- ### 0.2.4 (2015-09-11)
189
- * (bluefox) fix read of analog inputs (0-1023)
190
-
191
- ### 0.2.3 (2015-09-09)
192
- * (bluefox) fix read of PWM values
193
-
194
- ### 0.2.2 (2015-09-07)
195
- * (bluefox) fix write outputs
196
- * (bluefox) implement discover function
197
-
198
- ### 0.2.1 (2015-08-27)
199
- * (bluefox) works only with latest firmware.
200
- For Digital Sensor the meaning of attribute m was changed from "sensor type" to "threshold detection"
201
- Sensor type is "d"
202
- * (bluefox) support of digital sensors 1W and iB
203
-
204
- ### 0.2.0 (2015-08-19)
205
- * (bluefox) completely rewrite adapter
206
-
207
- ### 0.1.2 (2015-06-29)
208
- * (bluefox) add tests
209
-
210
- ### 0.1.1 (2015-05-24)
211
- * (bluefox) add 14,15 ports
212
- * (bluefox) add settings for port 3
213
-
214
- ### 0.1.0 (2015-05-22)
215
- * (bluefox) fix error if no configuration for ports
216
-
217
- ### 0.0.3 (2015-03-14)
218
- * (bluefox) double click&long click
219
- * (bluefox) fix error with read all ports together
220
-
221
- ### 0.0.2 (2015-03-14)
222
- * (bluefox) read status off all ports together
223
-
224
- ### 0.0.1 (2015-03-05)
225
- * (bluefox) make socket usable as module
1
+ ![Logo](admin/megad.png)
2
+ ioBroker MegaD-328 adapter
3
+ =================
4
+
5
+ ![Number of Installations](http://iobroker.live/badges/megad-installed.svg) ![Number of Installations](http://iobroker.live/badges/megad-stable.svg) [![NPM version](http://img.shields.io/npm/v/iobroker.megad.svg)](https://www.npmjs.com/package/iobroker.megad)
6
+ [![Downloads](https://img.shields.io/npm/dm/iobroker.megad.svg)](https://www.npmjs.com/package/iobroker.megad)
7
+ [![Tests](https://travis-ci.org/ioBroker/ioBroker.megad.svg?branch=master)](https://travis-ci.org/ioBroker/ioBroker.megad)
8
+
9
+ [![NPM](https://nodei.co/npm/iobroker.megad.png?downloads=true)](https://nodei.co/npm/iobroker.megad/)
10
+
11
+ Lets control the [MegaD-328](http://www.ab-log.ru/smart-house/ethernet/megad-328) over ethernet.
12
+ ## English
13
+ [по русски](#Русский)
14
+
15
+ ## Install
16
+
17
+ ```node iobroker.js add megad```
18
+
19
+ ### Information
20
+ The device has 14 ports, 0-7 inputs and 8-13 outputs.
21
+ To read the state of the port call
22
+ ```http://mega_ip/sec/?pt=4&cmd=get``` , where sec is password (max 3 chars), 4 is port number
23
+ The result will come as "ON", "OFF" or analog value for analog ports
24
+
25
+ To set the state call:
26
+ ```http://mega_ip/sec/?cmd=2:1``` , where sec is password (max 3 chars), 2 is port number, and 1 is the value
27
+ For digital ports only 0, 1 and 2 (toggle) are allowed, for analog ports the values from 0 to 255 are allowed
28
+
29
+ The device can report the changes of ports to some web server in form
30
+ ```http://ioBroker:80/?pt=6``` , where 6 is the port number
31
+
32
+ MegaD-328 cannot report on other port than 80.
33
+
34
+ ### Configuration
35
+
36
+ - IP: IP address of MegaD-328;
37
+ - 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;
38
+ - Port: Listening port on ioBroker. MegaD-328 cannot send to ports other than 80. Default value: 80.
39
+ - Poll interval: poll interval in seconds. All configured input ports will be polled in defined interval;
40
+ - Password: password to access the device (max 3 characters). Default value "sec";
41
+
42
+ MegaD-328 can report about changes on some ports if configured.
43
+ 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.
44
+ That means the button on port 7 was pressed. ioBroker expects 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/".
45
+
46
+ ### Ports
47
+ All ports, that are desired to be used must be configured in right order. Following settings must be set for every port:
48
+
49
+ - Name: name of the port. Used by ioBroker;
50
+ - Input: Is the port INPUT(true) or output(false);
51
+ - 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);
52
+ - Digital: Analog or digital port. ioBroker expects analog ports with range from 0 to 255.
53
+ - Offset: offset for the **analog** port.
54
+ - Factor: multiply factor for **anaolog** port.
55
+ - Long press: detect long press on digital port (port have to be SWITCH type)
56
+ - Double click ms: interval for detection of double click
57
+
58
+ For input:
59
+ ```
60
+ ioBrokerValue = MegaValue * factor + offset;
61
+ ```
62
+
63
+ For output:
64
+ ```
65
+ MegaValue = (ioBrokerValue - offset) / factor;
66
+ ```
67
+
68
+ To get the range of the analog value from 100 to 500 set the factor as 400 and offset = 100.
69
+
70
+ **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.**
71
+
72
+ -------------------
73
+ ## Русский
74
+ Подробную документацию можно найти здесь: [http://www.ab-log.ru/smart-house/ethernet/MegaD-328](http://www.ab-log.ru/smart-house/ethernet/MegaD-328)
75
+
76
+ ### Настройки
77
+
78
+ - IP Адрес устройства: IP адрес MegaD-328;
79
+ - MegaD Имя: Имя MegaD-328 устройства для идентификации сообщений о смене состояния порта от MegaD-328, например "DevA". Если имя не задано, то для этих целей будет использоватся номер инстанции драйвера.;
80
+ - ioBroker веб-порт: Порт на котором ioBroker разворачивает веб сервер для приёма сообщений от MegaD-328. MegaD-328 не поддерживает на данный момент порты отличные от 80. Значение по умолчанию: 80.
81
+ - Интервал опроса (сек): инетрвал опроса портов в секундах;
82
+ - MegaD-328 Пароль: пароль для доступа на MegaD-328 (максимально 3 символа). Значение по умолчанию: "sec";
83
+ - Интервал для длинного нажатия (мс): если отжатие после нажатия кнопки произошло позже указанного интервала, то сгенерируется длинное нажатие;
84
+ - Интервал двойного нажатия (мс): если между нажатиями пройдет меньше указанного времени, то сгенерируется двойное нажатие;
85
+
86
+ В сетевых настройках MegaD-328 можно сконфигуририровать IP-адрес ioBroker. При каждом нажатии на кнопку MegaD-328 сообщает ioBroker (restAPI) номер сработавшего входа.
87
+
88
+ Выглядит запрос примерно следующим образом:
89
+ ´´´http://192.168.0.250/0/?pt=7´´´
90
+
91
+ ### Порты
92
+ Необходимо сконфигурироваь все порты, которые должны быть видимы в ioBorker. Для каждого порта необходимо настроить следующее:
93
+
94
+ - Имя: имя порта. Исползуется в ioBroker для создание объектов;
95
+ - Вход: является ли порт входом (true) или выходом(false);
96
+ - Переключатель: Может ли порт быть в положениях ВКЛ и ВЫКЛ (в этом случае значение TRUE) или он просто используется для сигнализирования нажатия на кнопку (FALSE);
97
+ - Цифровой: Цифровой или аналоговый порт. ioBroker ожидает значени с аналогового порта в промежутке от 0 до 255.
98
+ - Множитель: множитель для значения **аналогового** порта.
99
+ - Сдвиг: сдвиг для значения **аналогового** порта.
100
+ - Длинное нажатие: если активировано, то порт будет генерировать событие "длинное нажатие" в объекте port_long (Порт должен быть цифровым и иметь тип "Переключатель")
101
+ - Двойное нажатие: если активировано, то порт будет генерировать событие "double click" в объекте port_double
102
+
103
+ Для выхода:
104
+
105
+ ```
106
+ MegaЗначение = (ioBrokerЗначение - Сдвиг) / Множитель;
107
+ ```
108
+
109
+ Для входа:
110
+
111
+ ```
112
+ ioBrokerЗначение = MegaЗначение * Множитель + Сдвиг;
113
+ ```
114
+
115
+ Например, что бы получить интервал значений от 100 до 500 нужно установить сдиг 100 и множитель 400.
116
+
117
+ Только аналоговые порты принимают во внимание Множитель и Сдвиг.
118
+
119
+ **Порядок портов очень важен. Порт в первой колонке таблицы ассоциируется с портом P0 на MegaD-328. Порт в колонке 14 с P13.**
120
+
121
+
122
+ ## Changelog
123
+ ### 1.4.0 (2026-12-05)
124
+ * (@GermanBluefox) The used port is reported to js-controller 8, which warns when a port is used twice
125
+ * (@GermanBluefox) The adapter starts again with current js-controller versions and no longer deletes the state info.connection
126
+
127
+ ### 1.3.0 (2017-11-23)
128
+ * (ausHaus) Removed support DHT11 sensors
129
+ * (ausHaus) Added hysteresis function (ADC ports and DS18B20 sensors)
130
+ * (ausHaus) Deleted team tget (request for internal temperature sensor value) is not yet done
131
+ * (ausHaus) Added the ability to Smooth to control smooth speed PWM control.
132
+
133
+ ### 1.2.1 (2016-08-14)
134
+ * (bluefox) extend digital temperature sensor with new type
135
+
136
+ ### 1.2.0 (2016-05-03)
137
+ * (bluefox) add info.connection state
138
+ * (bluefox) fix error if more ports in megad than configured
139
+
140
+ ### 1.1.0 (2015-12-22)
141
+ * (bluefox) make counters writeable
142
+
143
+ [Older changelogs can be found there](CHANGELOG_OLD.md)