DALI, двойная посылка команд, как послать значение?

Подскажите, пожалуйста. У меня связка EcoDIM 2 и Wiren Board 7.

Как отправить команду в светильник (Device 0 Command) со значением? Например, команду 257 со значением 11?

Как увидеть результаты выполнения команд типа QUERY? Куда записывается результат?

В DALI хитро реализовано подтверждение изменений. Для ряда команд нужно послать ее повторно в течение 100 мс. Есть ли возможность делать такие подтверждения через WB?

Добрый день.

Команды могут быть 0-255, всего 8 бит.
Насколько я понимаю - описано в документации на страницах 23-26.

26 регистр. После получения ответа в 24 выставится 1 а в 26 - будет значение.

Да, можно отправить несколько раз, конечно.

Нет :slight_smile: Команда в DALI - 16 бит. Они просто взяли еще один бит от полезной нрагузки, которая теперь 7-битная, и передается только брадкастом. Это называется - специальные команды. По мониторингу видно, что они активно используются при конфигурации сети.

Special Commands (above 255)

Command 257, DTR
DTR value is set to the value of the second byte of the command.

Command 258 Initialize
Depending on the second byte of the command as per the IEC62386-102 spec, the initialize timer is started at 15 minutes when this command is received twice within 100ms.

Command 256 Terminate
The initialize timer is cleared and the withdrawn flag is cleared.

Command 272 Enable Device Type
The enabled device type is set according to the second byte of the command.

The following commands (259 to 270) are only accepted while the initialize timer is running (command 258)

Command 259, Randomize
Needs to be repeated twice within 100ms to take effect. A 24 bit random number is chosen using a combination of internal timer values and the PIR analogue value. It is immediately stored in EEPROM.

Command 260, Compare
If the random address is less than or equal to the search address and the withdrawn flag is clear, the reply is YES.

Command 261, Withdraw
If the random address equals the search address, the withdraw flag is set. It is not cleared if there is no match, there is no action.

Command 264, Search Address H
High byte of the 24 bit search address is set.

Command 265, Search Address M
Mid byte of the 24 bit search address is set.

Command 266, Search Address L
Low byte of the 24 bit search address is set.

Command 267, Program Short Address
If the random address equals the search address, the short address is set and immediately written to EEPROM. If the second byte is 0xFF, the short address is deleted (missing).

Command 268, Verify Short Address
If the short address matches the second byte (shifted right one bit) then the reply is Yes.

Query 269, Query Short Address
If the random address equals the search address, the short address is returned shifted left one bit and bitwise or’ed with 0x01.

А в штатном шаблоне он есть? Или самому надо добавить?

С гарантированной паузой менее 100 мс?

Да. wb-mqtt-serial/templates/config-ecodim-dali-gw2.json.jinja at 47e3540eaea8095f7900f3c9c1f6ce2f18b15421 · wirenboard/wb-mqtt-serial · GitHub

Если дожидаться ответа в 24 - то в зависимости от типа интерфейса, если RS-485 и скорость 9600 - то можно не успеть дождаться.
Если не дожидаться ответа - то да, точно можно успеть отправить.