ioBroker / ioBroker.megad

Connect MegaD-328 device to ioBroker
MIT License
5 stars 5 forks source link
home-automation iobroker megad smarthome

Logo ioBroker MegaD-328 adapter

Number of Installations Number of Installations NPM version Downloads Tests

NPM

Lets control the MegaD-328 over ethernet.

English

по русски

Install

node iobroker.js add megad

Information

The device has 14 ports, 0-7 inputs and 8-13 outputs. To read the state of the port call http://mega_ip/sec/?pt=4&cmd=get , where sec is password (max 3 chars), 4 is port number The result will come as "ON", "OFF" or analog value for analog ports

To set the state call: http://mega_ip/sec/?cmd=2:1 , where sec is password (max 3 chars), 2 is port number, and 1 is the value For digital ports only 0, 1 and 2 (toggle) are allowed, for analog ports the values from 0 to 255 are allowed

The device can report the changes of ports to some web server in form http://ioBroker:80/?pt=6 , where 6 is the port number

MegaD-328 cannot report on other port than 80.

Configuration

MegaD-328 can report about changes on some ports if configured. 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. 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/".

Ports

All ports, that are desired to be used must be configured in right order. Following settings must be set for every port:

For input:

ioBrokerValue = MegaValue * factor + offset;

For output:

MegaValue = (ioBrokerValue - offset) / factor;

To get the range of the analog value from 100 to 500 set the factor as 400 and offset = 100.

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.


Русский

Подробную документацию можно найти здесь: http://www.ab-log.ru/smart-house/ethernet/MegaD-328

Настройки

В сетевых настройках MegaD-328 можно сконфигуририровать IP-адрес ioBroker. При каждом нажатии на кнопку MegaD-328 сообщает ioBroker (restAPI) номер сработавшего входа.

Выглядит запрос примерно следующим образом: ´´´http://192.168.0.250/0/?pt=7´´´

Порты

Необходимо сконфигурироваь все порты, которые должны быть видимы в ioBorker. Для каждого порта необходимо настроить следующее:

Для выхода:

MegaЗначение = (ioBrokerЗначение - Сдвиг) / Множитель;

Для входа:

ioBrokerЗначение = MegaЗначение * Множитель + Сдвиг;

Например, что бы получить интервал значений от 100 до 500 нужно установить сдиг 100 и множитель 400.

Только аналоговые порты принимают во внимание Множитель и Сдвиг.

Порядок портов очень важен. Порт в первой колонке таблицы ассоциируется с портом P0 на MegaD-328. Порт в колонке 14 с P13.

Changelog

1.3.0 (2017-11-23)

1.2.1 (2016-08-14)

1.2.0 (2016-05-03)

1.1.0 (2015-12-22)

1.1.0 (2015-12-17)

1.0.6 (2015-11-13)

1.0.5 (2015-11-11)

1.0.4 (2015-11-10)

1.0.3 (2015-11-06)

1.0.2 (2015-11-04)

1.0.1 (2015-10-03)

1.0.0 (2015-10-03)

0.2.14 (2015-09-30)

0.2.13 (2015-09-29)

0.2.12 (2015-09-29)

0.2.11 (2015-09-28)

0.2.10 (2015-09-26)

0.2.9 (2015-09-20)

0.2.8 (2015-09-19)

0.2.6 (2015-09-18)

0.2.5 (2015-09-17)

0.2.4 (2015-09-11)

0.2.3 (2015-09-09)

0.2.2 (2015-09-07)

0.2.1 (2015-08-27)

0.2.0 (2015-08-19)

0.1.2 (2015-06-29)

0.1.1 (2015-05-24)

0.1.0 (2015-05-22)

0.0.3 (2015-03-14)

0.0.2 (2015-03-14)

0.0.1 (2015-03-05)