DALI lighting system integration

Hello Francesco,

I have the ADF DALI/MQTT Converter (HD67941) but didn’t have any luck getting it to work.
When trying to connect to the mosquitto server on my home assistant instance I get the following error:
“Client disconnected due to protocol error”

This is my MQTT Configuration that i synched to the DALI/MQTT Module:

Any help is greatly appreciated.

Thanks.
Akio

Hello @wolfmar80

here my configuration page.
It’s strange that you are not able to connect.
Did you try with another connection like MQTT explorer?

Dali console port is the same, 10001

Hello Francesco,

I see that you have a Client ID defined and have checked the “Clean Session”.

For the client ID, did you add any additional config to the Mosquitto Broker in HA?
What is the reason behind the “Clean Session” checkmark?

Oh my god. That was it.
I added a Client ID and now I get a connection.

Now I have to find out how to configure the “MQTT Set Topic” & the “DALI Access” Section so that my DALI Device will show up in HA…

Hello Francesco,

I managed to connect to the Mosquitto Broker but I am not able to see my device in Home Assistant.

I posted my configuration here:

If it is not too much hassle, could you review it?

Thank you.

Hi,
I will check this evening, unfortunately I’m very busy in these days …
But I’ll let you know

Her am I,
First you have to activate the dali addresses that you want to scan (The converter scan the dali bus continuously in order to know the devices status).


After this, you have to set the MQTT Set Topic:
Here my example
For each address, you need to specify the topic (in my case : dali2mqtt/name of the light)
retained
the type of command that trigger the comunication with the broker (in my case on_change)
And the address

Than double click in the in the template column to set the JSON output (this output will be send to the brocker.
in my case : { “channel”: $CHANNEL$, “adv”: $ADV$ }
and here you see how will be on the broker :

Immagine 2023-08-24 212823

you can choose also to send others parameters, see the table below in the template page.

Now you should have a correct writing of the parameters in the broker.

If you want to change the light parameter, you have to subscrive the Converter to a topic (in my case : dali2mqtt)

After that, you can send information to the broker as you prefer, in my case I use NODERED:

Immagine 2023-08-24 213305

Hope that will help you.

If you need more assistance, let me know.

That helped quite a lot thank you. I now can control the light.
However, now I have a problem syncing the light state (on/off, brightness) with the light entity in home assistant.
I have created a topic with the following payload:

{"state": "$STATUS$", "brightness": $ADV$}

and the brightness is updated fine.
However for ON/OFF the ADF Module sends 4/0 but HASS is expecting “ON”/“OFF”.
How can I substitute the 0 with OFF and the 4 with ON?

Thanks for your help.
Akio

You have to use template

Hi,
I use this workaround, with a custom template sensor:

- name: "SENSOR-NAME"
  state_topic: "ADF-MODULE_topic"
  value_template: >
    {% if value_json.state == 0 %}
      Off
    {% elif value_json.state == 4 %}
      On
    {% else %}
      Unknown
    {% endif %}

hope this can help you! :upside_down_face:

Hi Francesco,
thanks to your post I’ve been able to get the device to publish to MQTT, but only OnTimer, it never publish the values when they change (I’ve ticked the “OnChange” option).
Also, I can’t change the values with MQTT messages. You’re publishing the JSON {"channel":41,"value":144} to the topic dali2mqtt, but where did you set that topic?
Thanks!

Edit: ops, I’ve missed the MQTT Subscribe section. Half a problem solved!

Hi @andrex ,
Now you can see the topic for each light?
The value (brightness) of the light can be changed by publishing {“channel”:41,“value”:144} on the main topic (not into the light topic).
I can’t help you so much because I removed this device and I have switched to another system.

@flayy73 Does the lunatone work better? I got the ADF and it sucks as the support for Dali2, specifically DT8 lights is non existent :-/

Thanks. I’ve bypassed the value not updating on change using a 500ms for the timer.
@lhoracek does the “OnChange” work for you?

@lhoracek , the lunatone works great. Very easy to connect to HA (I use node red). For the DTS8, I just have DT6 on my system, but from the supplier specs seems it works. (Digital Illumination Interface Alliance).

1 Like

@andrex Did not get to test it properly. I’ve disabled the scan etc to avoid congestion on the bus. At least until I figure out if the DT8 gear is controllable to some extend (I put CCT gear to every light in my house :smiley: ). But if not, I’m going to be switching to Lunatone and leaving this for garage use where I’ll be most likely using single color lighting.:slight_smile:

What are those?

Controlled Color Temperature

This sounds interesting. I had also gotten the ADF and didn’t get it to work, since it congested the bus.

Which Lunatone device are you using? Are you able to control single addresses (i.e. control several lights individually on the same Dali bus)? Is the status of the lights updated in HA when the light is controlled by a different device on the Dali bus, e. g. a dimmer? Is the lunatone without Dali power supply?