DDM845R

Материал из Wiren Board
Версия от 19:35, 11 июня 2019; RomanKulibaba (обсуждение | вклад) (Новая страница: «<syntaxhighlight lang="ecmascript"> Template config-ddm845r.json to work with the device:»)

(разн.) ← Предыдущая | Подтверждённая версия (разн.) | Текущая версия (разн.) | Следующая → (разн.)


DDM845R Dimmer made by "razumdom"

Description

Full description of the device can be found on the websitewww.razumdom.ru

Initializing registers

Dimmer control in the Web interface

First set the basic parameters:

Set address HR0=34

Speed and port settings HR1=0 (set to 0 by default)

Set hr30=1 operating mode (set to 1 by default)

Set the overall brightness HR44=100 (default 100)

Additional parameters: HR31, 33,34,35,36,37,60,61,62,63 = 0

Frequency period HR32 = 10000 ... 10500


Set values that will change constantly.

Set channel brightness 1 HR40= (0-1023) (default 0)

Set channel brightness 2 HR41= (0-1023) (set to default 0)

Set channel brightness 3 HR42= (0-1023) (set to default 0)

Set channel brightness 4 HR43= (0-1023) (set to default 0)


Inputs.

For 1 input IR4 = -25000 (switch open -- there can be another number, for example 0x9ff6); ~50 — (switch closed)

For 2 input IR5

For 3 input IR6

For 4 input IR7

For 5 input IR8

For 6 input IR9

For 7 input IR10

For 8 input IR11


You can convert these values to intelligible values:

Create script: HR100=2, HR101=4, HR102=8, HR103= -1000, HR104=1

Create script: HR200=2, HR201=5, HR202=8, HR203= -1000, HR204=1

Create script: HR300=2, HR301=6, HR302=8, HR303= -1000, HR304=1

Create script: HR400=2, HR401=7, HR402=8, HR403= -1000, HR404=1

Create script: HR500=2, HR501=8, HR502=8, HR503= -1000, HR504=1

Create script: HR600=2, HR601=9, HR602=8, HR603= -1000, HR604=1

Create script: HR700=2, HR701=10, HR702=8, HR703=-1000, HR704=1

Create script: HR800=2, HR801=11, HR802=8, HR803=-1000, HR804=1


Now the result can be in registers:

For 1 input IR100 = 0 (switch open) 1 (switch closed)

For 2 input IR100 = 0 (switch open) 1 (switch closed)

For 3 input IR102 = 0 (switch open) 1 (switch closed)

For 4 input IR103 = 0 (switch open) 1 (switch closed)

For 5 input IR104 = 0 (switch open) 1 (switch closed)

For 6 input IR105 = 0 (switch open) 1 (switch closed)

For 7 input IR106 = 0 (switch open) 1 (switch closed)

For 8 input IR107 = 0 (switch open) 1 (switch closed)



A set of commands to create scripts for non-programmed the dimmer (address 34):

modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r100 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r101 0x4
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r102 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r103 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r104 0x1


modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r200 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r201 0x5
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r202 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r203 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r204 0x1


modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r300 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r301 0x6
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r302 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r303 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r304 0x1


modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r400 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r401 0x7
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r402 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r403 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r404 0x1

modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r500 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r501 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r502 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r503 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r504 0x1

modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r600 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r601 0x9
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r602 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r603 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r604 0x1

modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r700 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r701 0xa
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r702 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r703 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r704 0x1

modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r800 0x2
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r801 0xb
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r802 0x8
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r803 0x9fff
modbus_client --debug -mrtu -pnone -s2 /dev/ttyAPP1 -a34 -t0x06 -r804 0x1
Template config-ddm845r.json to work with the device:

// Configuration options
{
    "device_type": "DDM845R",
    "device": {
        "name": "DDM845R",
        "id": "ddm845r",
        "delay_ms": 200,
        "enabled": true,
        "setup": [


            {
                "title": "Operational mode",
                "reg_type": "holding",
                "address": "30",
                "value": "1"
            }

        ],

        "channels": [

            {
                "name": "Channel 1",
                "reg_type": "holding",
                "address": "0x28",
                "type": "range",
                "max": "0x3ff"
            },
            {
                "name": "Channel 2",
                "reg_type": "holding",
                "address": "0x29",
                "type": "range",
                "max": "0x3ff"
            },
            {
                "name": "Channel 3",
                "reg_type": "holding",
                "address": "0x2A",
                "type": "range",
                "max": "0x3ff"
            },
            {
                "name": "Channel 4",
                "reg_type": "holding",
                "address": "0x2B",
                "type": "range",
                "max": "0x3ff"
            },
            {
                "name": "All channels",
                "reg_type": "holding",
                "address": "0x2C",
                "type": "range",
                "max": "0x64"
            },

            {
                "name": "Channel mode 0-3",
                "reg_type": "holding",
                "address": "0x1E",
                "type": "range",
                "max": "0x03"
            },

            {
                "name": "PWM Freq",
                "reg_type": "holding",
                "address": "32",
                "type": "range",
                "max": "10500",
                "min": "10000"
            },

              {
                "name" : "Input 1 state",
                "reg_type" : "input",
                "address" : 100,
                "type" : "value"
            },

            {
                "name" : "Input 2 state",
                "reg_type" : "input",
                "address" : 101,
                "type" : "value"
            },
            {
                "name" : "Input 3 state",
                "reg_type" : "input",
                "address" : 102,
                "type" : "value"
            },
            {
                "name" : "Input 4 state",
                "reg_type" : "input",
                "address" : 103,
                "type" : "value"
            },
            {
                "name" : "Input 5 state",
                "reg_type" : "input",
                "address" : 104,
                "type" : "value"
            },
            {
                "name" : "Input 6 state",
                "reg_type" : "input",
                "address" : 105,
                "type" : "value"
            },
            {
                "name" : "Input 7 state",
                "reg_type" : "input",
                "address" : 106,
                "type" : "value"
            },
            {
                "name" : "Input 8 state",
                "reg_type" : "input",
                "address" : 107,
                "type" : "value"
            }


        ]
    }
}